You are not logged in.
Can anyone help with lowering the display brightness is XFCE below the minimum of the slider? (Using GUI not command line)
The slider has a settings section, but no MIN limit setting. Is it possible to get this added?
I've tried modifying the code and re-compiling libxfce4powermanager.so to change the MIN Limit, but for some reason it causes the slider to disappear completely from the power panel. Even a straight compile without modifications causes the slider to disappear.
./configure runs fine though, this is my output: https://pastebin.com/pWsL0RL9
Any ideas what I might be missing to make the slider show when compiling from source? I'm thinking it's not detecting that the display has adjustable brightness and I may be missing a dependency.
Thanks.
Offline
Can anyone help with lowering the display brightness is XFCE below the minimum of the slider?
See: https://docs.xfce.org/xfce/xfce4-power- … es#buttons - specifically the xfconf-query command to set a minimum brightness level. However, I'm not sure this will help you, as the minimum and maximum values are being extracted from what xrandr (X11) is reporting - and I believe minimum always returns 0.
I've tried modifying the code and re-compiling libxfce4powermanager.so to change the MIN Limit, but for some reason it causes the slider to disappear completely from the power panel. Even a straight compile without modifications causes the slider to disappear.
./configure runs fine though, this is my output: https://pastebin.com/pWsL0RL9
Any ideas what I might be missing to make the slider show when compiling from source? I'm thinking it's not detecting that the display has adjustable brightness and I may be missing a dependency.
Be careful what ./configure command you are running. According to your output, everything is being installed to /usr/local which may not be what you want. You'd want to at least specify:
./configure --prefix=/usr
...but there may be more based on the distro you are using.
Which distro and version of xfce4-power-manager are you running? And also, if you don't mind, what video card and driver you are using an the applicable values in /sys/class/backlight/*.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
sailplane wrote:Can anyone help with lowering the display brightness is XFCE below the minimum of the slider?
See: https://docs.xfce.org/xfce/xfce4-power- … es#buttons - specifically the xfconf-query command to set a minimum brightness level. However, I'm not sure this will help you, as the minimum and maximum values are being extracted from what xrandr (X11) is reporting - and I believe minimum always returns 0.
Using onboard Intel, it's a laptop with switchable, but I didn't install the Nvidia driver.
root@fedora:/sys/class/backlight/intel_backlight# ls -ltr
total 0
-rw-r--r--. 1 root root 4096 Dec 27 14:35 uevent
lrwxrwxrwx. 1 root root 0 Dec 27 14:35 subsystem -> ../../../../../../../class/backlight
-r--r--r--. 1 root root 4096 Dec 27 14:35 type
-r--r--r--. 1 root root 4096 Dec 27 14:35 max_brightness
-rw-r--r--. 1 root root 4096 Dec 27 14:35 brightness
-r--r--r--. 1 root root 4096 Dec 27 14:39 scale
drwxr-xr-x. 2 root root 0 Dec 27 14:39 power
lrwxrwxrwx. 1 root root 0 Dec 27 14:39 device -> ../../card1-eDP-1
-rw-r--r--. 1 root root 4096 Dec 27 14:39 bl_power
-r--r--r--. 1 root root 4096 Dec 27 14:39 actual_brightness
I managed to compile with -DXFCE_PLUGIN instead of -UXFCE_PLUGIN and get the brightness slider to show up, but now I get a permission denied error for running the backlight helper when I move the bar.
The lowest value from XFCE is 1920 which peculiar because that's the width of the resolution.
root@fedora:/sys/class/backlight/intel_backlight# cat actual_brightness
1920
In KDE it goes down way more, I believe around 500, I could check.
Adding the "/xfce4-power-manager/brightness-slider-min-level" as an Integer with 500 did not work, the slider still only goes down to 1920. Is it supposed to be an Integer?
The command "xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -s 5" does not work because the value doesn't exist, so I added it with the GUI.
Thanks for all the help. I'd rather not have to recompile and somehow allow permissions for the new library to run the backlight helped if possible.. I'm looking into the policies now, I'm not sure how it knows I replaced the library file. It's in the same place with the same name.
Offline
Using onboard Intel, it's a laptop with switchable, but I didn't install the Nvidia driver.
I wonder if your system is exposing and using a backlight interface for the nvidia card as well. What does the following return:
ls /sys/class/backlight
root@fedora:/sys/class/backlight/intel_backlight# ls -ltr
total 0
-rw-r--r--. 1 root root 4096 Dec 27 14:35 uevent
lrwxrwxrwx. 1 root root 0 Dec 27 14:35 subsystem -> ../../../../../../../class/backlight
-r--r--r--. 1 root root 4096 Dec 27 14:35 type
-r--r--r--. 1 root root 4096 Dec 27 14:35 max_brightness
-rw-r--r--. 1 root root 4096 Dec 27 14:35 brightness
-r--r--r--. 1 root root 4096 Dec 27 14:39 scale
drwxr-xr-x. 2 root root 0 Dec 27 14:39 power
lrwxrwxrwx. 1 root root 0 Dec 27 14:39 device -> ../../card1-eDP-1
-rw-r--r--. 1 root root 4096 Dec 27 14:39 bl_power
-r--r--r--. 1 root root 4096 Dec 27 14:39 actual_brightness
If you manually echo in a value of 500 (as root) to the actual_brightness file, does the brightness change?
echo "500" > /sys/class/backlight/intel_backlight/actual_brightness
I managed to compile with -DXFCE_PLUGIN instead of -UXFCE_PLUGIN and get the brightness slider to show up, but now I get a permission denied error for running the backlight helper when I move the bar.
If you haven't uninstalled the repository version of xfce4-power-manager you may be running into conflicting files. Did you use the "--prefix=/usr" paramter to configure? Here is the fedora build log for xfce4-power-manager 4.20, the configure parameters it appears to be using are:
./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
The lowest value from XFCE is 1920 which peculiar because that's the width of the resolution.
root@fedora:/sys/class/backlight/intel_backlight# cat actual_brightness
1920
That's actually the current brightness value - the minimum should be 0.
Adding the "/xfce4-power-manager/brightness-slider-min-level" as an Integer with 500 did not work, the slider still only goes down to 1920. Is it supposed to be an Integer?
The command "xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -s 5" does not work because the value doesn't exist, so I added it with the GUI.
I think its because its not finding the right backlight interface. Post back the results from above and lets see what you have.
Also, what kind of laptop (make/model) is this?
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
If you manually echo in a value of 500 (as root) to the actual_brightness file, does the brightness change?
echo "500" > /sys/class/backlight/intel_backlight/actual_brightness
Yes, manually changing the brightness works, with "echo "500" | tee /sys/class/backlight/intel_backlight/brightness"
If you haven't uninstalled the repository version of xfce4-power-manager you may be running into conflicting files. Did you use the "--prefix=/usr" paramter to configure? Here is the fedora build log for xfce4-power-manager 4.20, the configure parameters it appears to be using are:
./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
Thanks for the command, I re-configured with that command, removed xfce4-power-manager, and re-installed with make install, but the same issue happens. No permission to run the backlight helper.
As soon as /usr/lib64/xfce4/panel/plugins/libxfce4powermanager.so is replaced, permission is denied for running the backlight helper.
The source code I'm using is Xfce Power Manager 4.18.4 . I downloaded it to match the Fedora 41 package
Name : xfce4-power-manager
Epoch : 0
Version : 4.18.4
Release : 2.fc41
Architecture : x86_64
Installed size : 4.5 MiB
Source : xfce4-power-manager-4.18.4-2.fc41.src.rpm
Should I try 4.20 ?
The lowest value from XFCE is 1920 which peculiar because that's the width of the resolution.
root@fedora:/sys/class/backlight/intel_backlight# cat actual_brightness
1920That's actually the current brightness value - the minimum should be 0.
Yes the lowest actual brightness I can set is 1920. Here is a tail of /var/log/secure while moving the slider to max and back to min. 19200 Max, 1920 Min.
[COMMAND=/usr/sbin/xfpm-power-backlight-helper --set-brightness 19200]
[COMMAND=/usr/sbin/xfpm-power-backlight-helper --set-brightness 14384]
[COMMAND=/usr/sbin/xfpm-power-backlight-helper --set-brightness 1920]
Also, what kind of laptop (make/model) is this?
Acer Nitro AN517 with a 3050Ti .
I wonder if your system is exposing and using a backlight interface for the nvidia card as well. What does the following return:
ls /sys/class/backlight
root@fedora:~# ls /sys/class/backlight
intel_backlight
Only one backlight in there. But there is no "min_brightness" defined. I'm guessing that's the problem.
Maybe it's picking up the width of the screen since there's no minimum brightness?
rw-r--r--. 1 root root 4096 Dec 27 18:02 uevent
lrwxrwxrwx. 1 root root 0 Dec 27 18:02 subsystem -> ../../../../../../../class/backlight
-r--r--r--. 1 root root 4096 Dec 27 18:02 type
-r--r--r--. 1 root root 4096 Dec 27 18:02 max_brightness
-rw-r--r--. 1 root root 4096 Dec 27 18:02 brightness
drwxr-xr-x. 2 root root 0 Dec 27 18:31 power
lrwxrwxrwx. 1 root root 0 Dec 27 18:31 device -> ../../card1-eDP-1
-rw-r--r--. 1 root root 4096 Dec 27 18:31 bl_power
-r--r--r--. 1 root root 4096 Dec 27 18:31 actual_brightness
-r--r--r--. 1 root root 4096 Dec 27 18:31 scale
One more thing to note, when I am prompted for Root Permission to execute the backlight helper, XFCE freezes completely. I have to terminate xfce4powermanager.so to continue. Seems like my compiled version is not interacting with the polkit agent properly. The command it's calling looks exactly the same though, same path and parameters.
Let me know if you have any other ideas.
Thanks.
Added later 10 min 28 s:
Ok, I figured out one thing, The MAX Brightness is 19200, so it looks like the MIN is being derived from the MAX by dividing it in 10, although that's not a low enough value for me.
root@fedora:/sys/class/backlight/intel_backlight# cat max_brightness
19200
Added later 29 min 58 s:
I also tried setting a different step size, and it makes no difference.
Ran xfce-settings-editor as both root and user, and set /xfce4-power-manager/brightness-step-count to 30 instead of 10 , but the minimum is still 1920.
Last edited by sailplane (2024-12-28 00:11:55)
Offline
Acer Nitro AN517 with a 3050Ti
Any chance you can try the "acpi_backlight=native" kernel parameter? See: https://forums.linuxmint.com/viewtopic.php?t=400894.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
sailplane wrote:Acer Nitro AN517 with a 3050Ti
Any chance you can try the "acpi_backlight=native" kernel parameter? See: https://forums.linuxmint.com/viewtopic.php?t=400894.
I tried it, but it didn't make any difference. 1920 is still the minimum it goes down to.
cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.12.6-200.fc41.x86_64 root=UUID=180e3428 ro rootflags=subvol=root rhgb quiet acpi_backlight=native
Any ideas what could be causing my custom version to be denied by pkexec? I could easily fix the MIN limit if I can get it to call the backlight-helper. You gave me the exact configure command, so that should technically build a similar package, however, there is a fairly big difference in file size (78K vs. 301K)
-rwxr-xr-x. 1 root root 301312 Dec 27 18:01 libxfce4powermanager.so (Compiled)
-rwxr-xr-x. 1 root root 78144 Jul 19 20:00 libxfce4powermanager.so (Fedora Package)
Thanks.
Last edited by sailplane (2024-12-28 05:55:45)
Offline
Where did the xfpm-power-backlight-helper executable get installed? Search you system in case there are multiple copies. Then check against the org.xfce.power.policy file (looks like /usr/share/polkit-1/actions) to make sure the executable locations match.
As for the size difference, I don't know. On Arch, the file size is 354216. Maybe fedora is compressing the file?
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
Where did the xfpm-power-backlight-helper executable get installed? Search you system in case there are multiple copies. Then check against the org.xfce.power.policy file (looks like /usr/share/polkit-1/actions) to make sure the executable locations match.
As for the size difference, I don't know. On Arch, the file size is 354216. Maybe fedora is compressing the file?
Ok I got it. The newly installed /usr/share/polkit-1/actions/org.xfce.power.policy was not matching the previous one. It was using /usr/local/sbin instead of /usr/sbin . Changed it to /usr/sbin and it's fixed.
<description>Modify the laptop display brightness</description>
<message>Authentication is required to modify the laptop display brightness</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/xfpm-power-backlight-helper</annotate>
</action>
Was "Step Size" supposed adjust the number that the MAX limit is divided by, or is step size the "increment/decrement by" value ?
It seems the divide by value is 10, since 19200 / 10 = 1920 . If the 10 was adjustable with a property, it would solve this problem. I will try to find and change the 10 to 100 in my version.
Last edited by sailplane (2024-12-28 15:25:04)
Offline
Ok, I got it figured out. Here's the debug log. For some reason xrandr is not available, and it gets 1920 as min using 19200/10.
TRACE[xfpm-brightness.c:240] xfpm_brightness_setup_xrandr():
No outputs have backlight property
TRACE[xfpm-brightness.c:301] xfpm_brightness_helper_get_value():
Executing command: /usr/sbin/xfpm-power-backlight-helper --get-max-brightness
TRACE[xfpm-brightness.c:333] xfpm_brightness_setup_helper():
xfpm_brightness_setup_helper: get-max-brightness returned 19200
TRACE[xfpm-brightness.c:500] xfpm_brightness_setup():
xrandr not available, brightness controlled by sysfs helper; min_level=0 max_level=19200
TRACE[xfpm-brightness.c:551] xfpm_brightness_set_min_level():
Setting default min brightness (1920) above hardware min (0)
I believe here's where it happens xfpm-brightness.c:549
brightness->priv->min_level = brightness->priv->hw_min_level
+ MAX (brightness->priv->step, (brightness->priv->max_level - brightness->priv->hw_min_level) / 10);
The STEP was already calculated as max/10 (line 270) and the value is 1920 .
Also MAX-MIN/10 is also 1920 .. So this is why it ends up as 1920.
So when the step is changed in the settings, even if it's lower, it will pick up the MAX of the two, and still end up at 1920 no matter what the step is.
Not sure if this was the intended behavior. KDE goes down a bit more than 10%, I'd say to around 5%.
Fortunately, I tried "/xfce4-power-manager/brightness-slider-min-level" again, as Integer of 500 again with debug on, and it's picking it up and working. I must've done something wrong when I set it before. I tried it on another fresh install of Fedora 41 and it works.
Thanks!
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 631.66 KiB (Peak: 664.94 KiB) ]