3

I have an old laptop, oldtimer linux fellow, and updated it to xubuntu 18.04.

After some sleep/resume problems with the proprietary nvidia-340 driver, I decided to try the nouveau. Sleep/resume ok. But there is a new problem: the brightness.

Using the proprietary driver, with Option "RegistryDwords" "EnableBrightnessControl=1" in the xorg.conf, the Fn-bright-up and Fn-bright-down keys work out of the box.

With the nouveau driver they don't.

$ ls /sys/class/backlight/

returns acpi_video0 and nv_backlight.

As expected nothing can be done using acpi_video0.

But, surprise! The nv_backlight is working:

$ echo 20 | sudo tee /sys/class/backlight/nv_backlight/brightness

works!

But I don't know how to make my friend xfce knows that the Fn-bright-up and Fn-bright-down should talk with /sys/class/backlight/nv_backlight/brightness instead of /sys/class/backlight/acpi_video0/brightness.

Thank you.

1
  • I modified the xfce4-power-manager_1.6.1 source code, changing xfpm-backlight-helper.c -> backlight_helper_get_best_backlight(), making it choose the raw backlight type instead of firmware or platform. It's a work for me only fix... Would be nice to have an option to change the preference order.
    – dedalu
    May 28, 2018 at 15:05

2 Answers 2

2

The nouveau driver now (some time ago it didn't) creates the /sys/class/backlight/nv_backlight and it works. So passing acpi_backlight=vendor to the kernel disables the /sys/class/backlight/acpi_video0. Without acpi_video0, the backlight_helper_get_best_backlight() will return the nv_backlight out of the box.

So, open /etc/default/grub, edit:

GRUB_CMDLINE_LINUX_DEFAULT="[...] acpi_backlight=vendor"

Save and sudo update-grub.

1
1

In case somebody still has issues with Xubuntu 18.04 backlight keys, which enable Brightness popup however don't increase/decrease brightness bar, here is the way which helped me. It appears that brightness keys were simply disabled in XFCE4 power manager configuration:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/handle-brightness-keys
=> false

Therefore this fixed the situation:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/handle-brightness-keys --create -t bool -s true

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .