Lubuntu brightness/backlight issue
Solution 1
I had the same issue in Lubuntu 20.04. Solution:
- In terminal run:
lxqt-config-globalkeyshortcuts
and change:
lxqt-config-brightness -d
=>lxqt-backlight_backend --dec
lxqt-config-brightness -i
=>lxqt-backlight_backend --inc
- In terminal run:
sudo chmod u+s /usr/bin/lxqt-backlight_backend
to resolve root permission problem.
Solution 2
The simplest way I have discovered that doesn't require sudo is to use
pkexec lxqt-backlight_backend --inc
to increase the backlight brightness and pkexec lxqt-backlight_backend --dec
to decrease it.
You can add keyboard shortcuts for these commands in LXQt. I hope this will be fixed soon and it will become the default action for brightness adjustement keyboard combinations instead of the rather useless contrast regulation.
Solution 3
I had the same issue for a very long time, but I finally solved it! I was searching for a solution when I found this: https://help.ubuntu.com/community/Lubuntu/Keyboard#Keyboard_shortcuts . And it says:
Control+F10
Laptop screen dim
Control+F11
Laptop screen brighten
I was curious about this shortcut key, because I used a different one to change my brightness. And as soon as I tried, an error popped up saying that xbacklight could not be found. This leaded me to the solution of our problem:
First, I installed xbacklight with the command sudo apt-get install xbacklight
. Only this should've worked for me, but my xbacklight was always returning the following error when executed through the terminal:
No outputs have backlight property
So I googled it and found a solution: https://askubuntu.com/a/1060843 This answer solved the error for me. With xbacklight working, I just created shortcut keys for the following commands:
To increase brightness (-time 0 is optional, just for it to change instantly):
xbacklight -inc 10 -time 0
To decrease brightness (-time 0 is optional, just for it to change instantly):
xbacklight -dec 10 -time 0
This is incredibly practical as it doesn't require root to work, so it will work as soon as you add these shortcuts and will last forever (no sudo after reboot for it to work again :D ).
To summarize:
-
Install the
xbacklight
package with:sudo apt-get install xbacklight
-
Add the following command to your favourite shortcut keys to increase brightness:
xbacklight -inc 10 -time 0
-
Add the following command to your favourite shortcut keys to decrease brightness:
xbacklight -dec 10 -time 0
If the commands don't work, this might be the solution: https://askubuntu.com/a/1060843
References:
- https://help.ubuntu.com/community/Lubuntu/Keyboard#Keyboard_shortcuts
- https://elias.praciano.com/2014/07/xbacklight-comando-para-alterar-o-brilho-do-monitor-lcd-no-linux/ (This tutorial isn't in English)
- xbacklight: No outputs have backlight property - No /sys/class/backlight folder
Solution 4
I find a fix in the most unusual way (am running lubuntu 20). Launch button >> preferences >> lxqt settings >> brightness settings. Change the brightness slide button...then click YES in the next popup! Now uncheck the button near the "require confirmation after settings change." Now the brightness shortcuts works perfectly.
Solution 5
You can add the command lxqt-backlight_backend --dec
to the 'shortcut config menu' to decrease the brightness and the command lxqt-backlight_backend --inc
to increase it.
However, the commands need root permissions to run. One way to overcome this is to manually change the permissions of /sys/class/backlight/intel_backlight/brightness
, but the change isn't permanent, since it will be reset after reboot. If I find a way to make the change permanent I will post it here.
Related videos on Youtube
ReSpir3
Updated on September 18, 2022Comments
-
ReSpir3 over 1 year
I freshly installed Lubuntu 18.10 with LXQT environment and here's my issue : I want to dim the backlight of my laptop with the keyboard shortcut (XF86) but when i press it, it changes the brightness(which seems to be a software change because it messes with gamma and contrast)
So i went to the keyboard shortcuts bindings to find the menu that changes what i want :
^ the slider controls backlight (usual brightness) and the knob messes with contrast..
Here is the shortcut config menu :
However, there is no way i can find to inc or dec the slider instead of the knob, to have control over backlight. xbacklight and xrandr doesn't work as they output "no output with backlight property" but i can change backlight with
echo 700 | sudo tee /sys/class/backlight/intel_backlignt/brightness
which sets backlight to 700, but i don't know how to implement inc or dec on a shortcut with this :cTeach me some unix please :)
-
Admin over 5 yearsI guess all this is rather buggy. My shortcuts work as I expect them to, but changes made with the shortcuts are not reflected in the brightness settings, as both the slider and the knob seem unaffected by the shortcut actions. It is as if separate tools overlap here.
-
Admin over 5 yearsWell my shortcut button affects the knob indeed, but not the slider..
-
Admin over 5 yearsI booted Lubuntu 18.10 on a thumb-drive (I only have it installed on a desktop), and like clpricus, the shortcut keys on my lenovo sl510 only dimmed the brightness (moving only slider, having no impact on 'knob' setting).
-
Admin over 5 yearsI have an acer aspire one cloudbook AO1-431-C89V (ref doesn't matter xD) and is 3 years old, booting lubuntu from ram before installing had the same issue :c
-
-
guiverc over 5 yearsps: this involves no error checking, eventually you'll get negative values if you keep trying to reduce the brightness, or values beyond what your screen can handle. I didn't test the effects of this (nor would my lenovo possibly respond the same as your hardware)
-
ReSpir3 over 5 yearsoh wow you nailed it ! I just tested the effects of this and it does not go below 300, just returns "invalid argument". but it required password when i tried it on qterminal
-
ReSpir3 over 5 yearsoh wow thanks ! this command is much more elegant, i wonder why it required root, where did you find this command exists ? I would like to know if there are more things that i can shortcut
-
guiverc over 5 yearsYeah (re: password) I used
sudo
so it does require elevated permissions (unless already elevated due to use in prior 5 mins or whatever your threshold is). This wasn't a problem with me as i tested using 'live' and thus didn't notice it as a problem, and I'd not suggest using NOPASSWD.... -
guiverc over 5 yearsI removed the
sudo
from my command, but also ransudo chmod a+rw /sys/class/backlight/intel_backlight/brightness
that gets written to (in my answer). This worked for me on my tested older version, but alas did not survive reboot. To get around that, I added thechmod a+rw /sys/..
command to a login script (I used~/.profile
) so it gets run on login... It's a hack, and I didn't test on 18.10, but worked on a eeepc that was handy.. -
guiverc over 5 yearsps: it's I hope obvious; but the command I added to my
.profile
waschmod a+rw /sys/class/backlight/intel_backlight/brightness
(not an abbreviated version I typed before). Also I'd suggest checking for typos, thjs is typed into a 19.04 desktop & not the eeepc I tested with.. -
guiverc over 5 yearsps: the
chmod
may also help with user3140225's answer (I haven't tried or thought about it) .. My answer was largely based on the "teach me some unix" request, so I used what you'd created or found yourself, with hope you'd learn some more *nix and achieve what you want... -
colorful-shirts over 3 yearsThis works great for me. Shortcuts for the brightness keys were set to
lxqt-config-brightness -d
by default which wasn't working properly for me when Redshift was active (they actually worked fine by default if I fully disabled it). Regardless, this change gave me back hardware key backlight control so thanks for this. -
colorful-shirts over 3 yearsSpoke too soon. While the commands work in the terminal, somehow adding them to the shortcut key list does not. I'm stumped as to why.
-
ReSpir3 over 3 yearsi'm back two years later with the same pc and lubuntu 20.04, and yes it only works in the terminal somehow... i also installed lubuntu on an old dell pc and followed instructions below with xbacklight and it worked fine. i'm going to try them on my acer pc.
-
ReSpir3 over 3 yearsprobably the cleanest solution, gives better results than xbacklight. xbacklight changes backlight and gamma at the same time
-
ReSpir3 over 3 yearsdefinitely works but xbacklight has the drawback to be able to shut brightness to 0 and doesn't change backlight independently of brightness, you like it or not. also the fix for the "no outputs have backlight propriety" requires sudo to be able to create a file in X11. sudo touch to create the file then sudo chmod to be able to write something inside, that's how i figured it out, but there may be a cleaner way to do so, as proposed below or above
-
ReSpir3 over 3 yearsand survives reboot ! bravo !