Lubuntu brightness/backlight issue

6,080

Solution 1

I had the same issue in Lubuntu 20.04. Solution:

  1. In terminal run: lxqt-config-globalkeyshortcuts and change:
    lxqt-config-brightness -d => lxqt-backlight_backend --dec
    lxqt-config-brightness -i => lxqt-backlight_backend --inc
  2. 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:

  1. Install the xbacklight package with:

    sudo apt-get install xbacklight
    
  2. Add the following command to your favourite shortcut keys to increase brightness:

    xbacklight -inc 10 -time 0
    
  3. Add the following command to your favourite shortcut keys to decrease brightness:

    xbacklight -dec 10 -time 0
    
  4. If the commands don't work, this might be the solution: https://askubuntu.com/a/1060843

References:

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.

Share:
6,080

Related videos on Youtube

ReSpir3
Author by

ReSpir3

Updated on September 18, 2022

Comments

  • ReSpir3
    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 :

    lxqt-config-brightness menu

    ^ the slider controls backlight (usual brightness) and the knob messes with contrast..

    Here is the shortcut config menu :

    lxqt shortcuts

    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 :c

    Teach me some unix please :)

    • Admin
      Admin over 5 years
      I 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
      Admin over 5 years
      Well my shortcut button affects the knob indeed, but not the slider..
    • Admin
      Admin over 5 years
      I 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
      Admin over 5 years
      I 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
    guiverc over 5 years
    ps: 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
    ReSpir3 over 5 years
    oh 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
    ReSpir3 over 5 years
    oh 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
    guiverc over 5 years
    Yeah (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
    guiverc over 5 years
    I removed the sudo from my command, but also ran sudo 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 the chmod 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
    guiverc over 5 years
    ps: it's I hope obvious; but the command I added to my .profile was chmod 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
    guiverc over 5 years
    ps: 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
    colorful-shirts over 3 years
    This 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
    colorful-shirts over 3 years
    Spoke 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
    ReSpir3 over 3 years
    i'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
    ReSpir3 over 3 years
    probably the cleanest solution, gives better results than xbacklight. xbacklight changes backlight and gamma at the same time
  • ReSpir3
    ReSpir3 over 3 years
    definitely 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
    ReSpir3 over 3 years
    and survives reboot ! bravo !