Xubuntu 18.04: make Fn brightness keys work with /sys/class/backlight/nv_backlight/

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












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.







share|improve this question






















  • 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 at 15:05















up vote
1
down vote

favorite












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.







share|improve this question






















  • 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 at 15:05













up vote
1
down vote

favorite









up vote
1
down vote

favorite











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.







share|improve this question














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.









share|improve this question













share|improve this question




share|improve this question








edited Jun 14 at 23:19









WinEunuuchs2Unix

34.2k756130




34.2k756130










asked May 28 at 1:03









dedalu

13816




13816











  • 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 at 15:05

















  • 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 at 15:05
















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 at 15:05





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 at 15:05











1 Answer
1






active

oldest

votes

















up vote
1
down vote













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.






share|improve this answer






















  • Of particular interest to you is this question where acpi_backlight=vendor didn't work and a custom script was the solution: askubuntu.com/questions/1045624/…
    – WinEunuuchs2Unix
    Jun 14 at 23:16










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1041051%2fxubuntu-18-04-make-fn-brightness-keys-work-with-sys-class-backlight-nv-backlig%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













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.






share|improve this answer






















  • Of particular interest to you is this question where acpi_backlight=vendor didn't work and a custom script was the solution: askubuntu.com/questions/1045624/…
    – WinEunuuchs2Unix
    Jun 14 at 23:16














up vote
1
down vote













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.






share|improve this answer






















  • Of particular interest to you is this question where acpi_backlight=vendor didn't work and a custom script was the solution: askubuntu.com/questions/1045624/…
    – WinEunuuchs2Unix
    Jun 14 at 23:16












up vote
1
down vote










up vote
1
down vote









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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 29 at 14:38









Stephen Rauch

1,1545716




1,1545716










answered May 29 at 13:26









dedalu

13816




13816











  • Of particular interest to you is this question where acpi_backlight=vendor didn't work and a custom script was the solution: askubuntu.com/questions/1045624/…
    – WinEunuuchs2Unix
    Jun 14 at 23:16
















  • Of particular interest to you is this question where acpi_backlight=vendor didn't work and a custom script was the solution: askubuntu.com/questions/1045624/…
    – WinEunuuchs2Unix
    Jun 14 at 23:16















Of particular interest to you is this question where acpi_backlight=vendor didn't work and a custom script was the solution: askubuntu.com/questions/1045624/…
– WinEunuuchs2Unix
Jun 14 at 23:16




Of particular interest to you is this question where acpi_backlight=vendor didn't work and a custom script was the solution: askubuntu.com/questions/1045624/…
– WinEunuuchs2Unix
Jun 14 at 23:16












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1041051%2fxubuntu-18-04-make-fn-brightness-keys-work-with-sys-class-backlight-nv-backlig%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491