Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-05-17 06:11:21

Antis Lathoi
Member
Registered: 2013-04-26
Posts: 7

Bug introduced through xfce4-power-manager update

Hi,

I'm using xfce with arch linux on an Asus Zenbook Prime (UX21A) and noticed that by upgrading from xfce4-power-manager-1.2.0-3-x86_64 to
xfce4-power-manager-1.2.0-4-x86_64 a faulty setting is introduced: whenever the screen returns from a blankd out state the program xfpm-power-backlight-helper sets screen backlight to max; here is the journalctl output:

archlinux pkexec[1939]:: Executing command [USER=root] [TTY=unknown] [CWD=/] [COMMAND=/usr/bin/xfpm-power-backlight-helper --set-brightness 10]

This is annoying because you have to readjust backlight every time manually.

Can anyone shed some light on this? Where can I configure these settings?

Thanks.

Antis

Offline

#2 2018-02-14 12:40:04

hellogoo
Member
Registered: 2017-07-14
Posts: 9

Re: Bug introduced through xfce4-power-manager update

Sorry for posting in this 5 years later but I have more or less the same problem. Whenever I wake up from suspend, my screen brightness is not restored properly to what it was, and I have to set it back manually.

Here is what I keep seeing in journalctl:

Feb 14 12:49:13 clevo pkexec[24675]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Feb 14 12:49:13 clevo pkexec[24675]: hellogoo: Executing command [USER=root] [TTY=unknown] [CWD=/] [COMMAND=/usr/bin/xfpm-power-backlight-helper --set-brightness 1]
Feb 14 12:49:13 clevo pkexec[24683]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Feb 14 12:49:13 clevo pkexec[24683]: hellogoo: Executing command [USER=root] [TTY=unknown] [CWD=/] [COMMAND=/usr/bin/xfpm-power-backlight-helper --set-brightness 0]
Feb 14 12:49:14 clevo pkexec[24691]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Feb 14 12:49:14 clevo pkexec[24691]: hellogoo: Executing command [USER=root] [TTY=unknown] [CWD=/] [COMMAND=/usr/bin/xfpm-power-backlight-helper --set-brightness 1]
Feb 14 12:49:14 clevo pkexec[24698]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Feb 14 12:49:14 clevo pkexec[24698]: hellogoo: Executing command [USER=root] [TTY=unknown] [CWD=/] [COMMAND=/usr/bin/xfpm-power-backlight-helper --set-brightness 2]

Strange thing is, after manually setting back the brightness (with the brightness up/down on my keyboard), I still get:

$> xfpm-power-backlight-helper --get-brightness
2

I'm running i3 window manager (no DE), with xfsettingsd and xfce4-power-manager running alongside.

Here are some more diagnosis attempts:

$> xfconf-query -c xfce4-power-manager -lv
/xfce4-power-manager/brightness-level-on-ac             30
/xfce4-power-manager/brightness-level-on-battery        15
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  1
/xfce4-power-manager/critical-power-action              3
/xfce4-power-manager/dpms-on-battery-off                30
/xfce4-power-manager/dpms-on-battery-sleep              10
/xfce4-power-manager/general-notification               true
/xfce4-power-manager/inactivity-on-battery              14
/xfce4-power-manager/inactivity-sleep-mode-on-battery   1
/xfce4-power-manager/lock-screen-suspend-hibernate      false
/xfce4-power-manager/logind-handle-lid-switch           false
/xfce4-power-manager/show-tray-icon                     true
$> xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 1.6.1
With policykit support
Without network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True

I'm not sure what sends these 4 brightness commands on resume yet... Still investigating.

SPECS: Antergos (Arch Linux based), kernel 4.14.18-LTS, i3

Offline

#3 2018-02-14 20:55:16

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: Bug introduced through xfce4-power-manager update

It kind of looks like there are two separate brightness control mechanisms. What does the following return:

ls /sys/class/backlight

Does running "xfpm-power-backlight-helper --set-brightness X" work to actually change the brightness?

And finally, try quitting the power manager "xfce4-power-manager -q" and see if you can still change the brightness.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2018-02-15 03:11:34

hellogoo
Member
Registered: 2017-07-14
Posts: 9

Re: Bug introduced through xfce4-power-manager update

Thanks ToZ smile

$ ls /sys/class/backlight
acpi_video0  acpi_video1  acpi_video2  acpi_video3
$ sudo xfpm-power-backlight-helper --set-brightness 1
This program must only be run through pkexec

But then it works with pkexec, until value 8

$ sudo pkexec xfpm-power-backlight-helper --set-brightness 7

$ sudo pkexec xfpm-power-backlight-helper --set-brightness 8
Could not set the value of the backlight: writing '8' to /sys/class/backlight/acpi_video3/brightness failed

But it seems that setting brightness from the xfce4-power-manager applet in the system tray works independently and has its own brightness values? I might be mistaken.

I'll post a terminal output from running xfce4-power-manager --no-daemon --debug and rebooting next.

Offline

#5 2018-02-15 11:36:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: Bug introduced through xfce4-power-manager update

So the backlight-helper is writing to /sys/class/backlight/acpi_video3/brightness. When you use the keyboards keys, which of those 4 interfaces (acpi_video0, 1, 2, 3) have their brightness value changed?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2018-02-15 15:29:04

hellogoo
Member
Registered: 2017-07-14
Posts: 9

Re: Bug introduced through xfce4-power-manager update

Nevermind, I finally found out why I got these messages in system logs in the first place: that was me when using the keyboard keys to adjust the brightness down!
I still don't know why the brightness level is not preserved across suspend/resume (or why it's reset) but maybe the xfce power manager is not supposed to do that in the first place? Or maybe it's not playing along well with i3, since it's not the full "xfce session" running... I can easily script the manual adjustment for myself if that's the case.

Anyway, for the sake of completion I answer the question: using the keyboard keys, they write to /sys/class/backlight/acpi_video3/brightness as well.

cat /sys/class/backlight/acpi_video{0..3}/brightness
10
2
10
7

The slider in the power-manager applet is also updated correctly when using keyboard keys after all.

I have to note that I have redshift running all the time as well. Also, I use xrandr to set the brightness to 0.50 on i3 startup, and it's always set to that even after I use the brightness controls with the keyboard, so I don't think it's interfering in any way.

Here is a log output for xfce4-power-manager --no-daemon --debug where you can see me fiddling with the brightness up/down keys on the keyboard: https://pastebin.com/raw/3hCdHWBq

Anyway, sorry for the trouble. Case closed I guess. ;)

Last edited by hellogoo (2018-02-15 15:33:29)

Offline

#7 2018-02-15 15:38:52

hellogoo
Member
Registered: 2017-07-14
Posts: 9

Re: Bug introduced through xfce4-power-manager update

Nevermind again, I killed xfce4-power-manager, the brightness went all up, and using the keyboard keys now changes the brightness values in acpi_video0 and acpi_video1 for some reason! acpi_video2 and acpi_video3 are not affected at all.

cat /sys/class/backlight/acpi_video{0..3}/brightness
10
7
10
2

The brightness was all the way up after I killed xfce-power-manager because the values in acpi_video0 was 10. Not sure what's up with acpi_video1 yet, but its value can only go up to 7, contrary to acpi_video0 which goes up to 10.
It seems only acpi_video0 affects my monitor (I'm using a laptop, there is an unused HDMI output, perhaps that's what it is).

$ xrandr --query --properties 
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
LVDS-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
	CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0 
	EDID: 
		00ffffffffffff000daf201700000000
		02150103802615780ad895a3554d9d27
		0f505400000001010101010101010101
		0101010101012e3680a070381f403020
		35007ed710000018000000fe004e3137
		334847452d4c31310a20000000fe0043
		4d4f0a202020202020202020000000fe
		004e3137334847452d4c31310a20006e
	BorderDimensions: 4 
		supported: 4
	Border: 0 0 0 0 
		range: (0, 65535)
	SignalFormat: LVDS 
		supported: LVDS
	ConnectorType: Panel 
	ConnectorNumber: 0 
	_ConnectorLocation: 0 
   1920x1080     60.02*+
HDMI-0 disconnected (normal left inverted right x axis y axis)
	CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0 
	BorderDimensions: 4 
		supported: 4
	Border: 0 0 0 0 
		range: (0, 65535)
	SignalFormat: TMDS 
		supported: TMDS
	ConnectorType: HDMI 
	ConnectorNumber: 7 
	_ConnectorLocation: 7 
DP-0 disconnected (normal left inverted right x axis y axis)
	CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0 
	BorderDimensions: 4 
		supported: 4
	Border: 0 0 0 0 
		range: (0, 65535)
	SignalFormat: TMDS 
		supported: TMDS
	ConnectorType: DisplayPort 
	ConnectorNumber: 4 
	_ConnectorLocation: 4 
DP-1 disconnected (normal left inverted right x axis y axis)
	CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0 
	BorderDimensions: 4 
		supported: 4
	Border: 0 0 0 0 
		range: (0, 65535)
	SignalFormat: DisplayPort 
		supported: DisplayPort
	ConnectorType: Panel 
	ConnectorNumber: 8 
	_ConnectorLocation: 8 
DP-2 disconnected (normal left inverted right x axis y axis)
	CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0 
	BorderDimensions: 4 
		supported: 4
	Border: 0 0 0 0 
		range: (0, 65535)
	SignalFormat: DisplayPort 
		supported: DisplayPort
	ConnectorType: DisplayPort 
	ConnectorNumber: 4 
	_ConnectorLocation: 4 

I don't know what are the DP-X outputs...

Anyway, that sort of explains why it's so bright on resume from suspend somehow. I'm not sure what is handling the brightness keys when power-manager is not running... perhaps upowerd? Pretty sure there's a conflict between two programs somewhere.

Edit: looks like upowerd is related to the issue: https://bbs.archlinux.org/viewtopic.php?id=182262

Sorry for adding noise. It's not a problem with xfce4-power-manager after all. ;-)

Thanks~

Last edited by hellogoo (2018-02-15 15:56:00)

Offline

#8 2018-02-15 17:48:09

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: Bug introduced through xfce4-power-manager update

Not noise! Makes the thread more useful, thanks.

Tip: You can edit the title and prepend [CLOSED], [SOLVED], or any such informative tag.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 586.83 KiB (Peak: 603.67 KiB) ]