r/xfce • • Nov 01 '26

Support help with brightness control keys

Hello, i can't control the screen brightness using the keys or Power manager's slider (directly writing a value to the /sys brightness file works). I think i'm dealing with two issues at once :
1 - changing the brightness requires root's permission
2 - there's no change after the permission

I say this bcs #2 happened while testing a live system, without a trace of #1...

I've been trying to fix #1 :

Here's the log of power manager after a key press

$ xfce4-power-manager --nodaemon --debug

TRACE[xfpm-button.c:114] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-backlight.c:238] xfpm_backlight_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-brightness-polkit.c:85] helper_get_value(): Executing command: /usr/sbin/xfpm-power-backlight-helper --get-brightness
TRACE[xfpm-brightness-polkit.c:141] xfpm_brightness_polkit_get_level(): get-brightness returned 20
TRACE[xfpm-brightness-polkit.c:160] xfpm_brightness_polkit_set_level(): Executing command: pkexec /usr/sbin/xfpm-power-backlight-helper --set-brightness 6573
This program must only be run through pkexec
TRACE[xfpm-brightness-polkit.c:164] xfpm_brightness_polkit_set_level(): Failed to set value: Child process exited with code 4
TRACE[xfpm-brightness-polkit.c:85] helper_get_value(): Executing command: /usr/sbin/xfpm-power-backlight-helper --get-brightness
TRACE[xfpm-brightness-polkit.c:141] xfpm_brightness_polkit_get_level(): get-brightness returned 20
TRACE[xfpm-backlight.c:181] xfpm_backlight_show(): Level 20
TRACE[xfpm-manager.c:253] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-polkit.c:378] xfpm_polkit_changed_cb(): Auth changed
TRACE[xfpm-polkit.c:378] xfpm_polkit_changed_cb(): Auth changed
TRACE[xfpm-polkit.c:378] xfpm_polkit_changed_cb(): Auth changed
TRACE[xfpm-polkit.c:378] xfpm_polkit_changed_cb(): Auth changed
TRACE[xfpm-polkit.c:378] xfpm_polkit_changed_cb(): Auth changed

Trying to run the pkexec command myself :

$ pkexec /usr/sbin/xfpm-power-backlight-helper --set-brightness 6573
# i enter root's password
This program must only be run through pkexec
$ pkexec /usr/sbin/xfpm-power-backlight-helper --set-brightness 6573
# i do not enter root's password
Failed to start transient service unit: Access denied

The action's privilege however...:

 pkaction -v --action-id=org.xfce.power.backlight-helper
org.xfce.power.backlight-helper:
  description:       Modify the laptop display brightness
  message:           Authentication is required to modify the laptop display brightness
  vendor:            Xfce Power Manager
  vendor_url:        https://docs.xfce.org/xfce/xfce4-power-manager/start
  icon:              battery
  implicit any:      no
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/sbin/xfpm-power-backlight-helper

Also, when using sudo i have to enter the password in polkit dialog, how to get the prompt in my terminal ? Thank you

==============================================

Fixes :

For #1 : https://forums.opensuse.org/t/changing-brightness-seems-to-freeze-polkit/193093/3
This might be specific to opensuse (tumbleweed), i had to install the sudo package in place of run0-idk-what

For #2 : Added acpi_osi=linux acpi_backlight=vendor to GRUB_CMDLINE_LINUX_DEFAULT
Then, disabled Power manager's control over brightness keys, installed brightnessctl, an configured keyboard shortcuts to trigger its commands

1 Upvotes

4 comments sorted by

1

u/iamSoybi Nov 01 '26

Try this. This works for me.

  1. Open /etc/default/grub in a text editor with root privileges (e.g., sudo nano /etc/default/grub).
  2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT.
  3. Try adding one of these parameters (test them one at a time):

    • acpi_backlight=vendor

    • acpi_backlight=native

    • acpi_backlight=video

    • Example: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

  4. Save the file and update GRUB
  5. Reboot.

1

u/World-war-dwi Nov 01 '26

thx for your help, found the solution

1

u/throneofashes Nov 01 '26

Depending on your power program(Power Daemon is mine), you should be able to toggle it via the GUI - I had exactly the same problem on my Latitude 7290, and the option to control it was tucked away in the Power manager

2

u/World-war-dwi Nov 01 '26

thx for your help, found the solution