Changing Screen Brightness Through Keyboard Functions on My Notebook
Solution 1
It seems quite common for brightness Fn keys to not work on Asus machines. On my Asus X205TA the brightness function keys don't work natively but I can use xbacklight as a workaround:
sudo apt install xbacklight
commands:
get current brightness:
xbacklight -get
set brightness to 50%
xbacklight -set 50
increase brightness by 10%
xbacklight -inc 10
decrease by 10%
xbacklight -dec 10
If these work, you can get the function keys to change brightness by assigning them as shortcuts to the commands.
In keyboard settings click Custom Shortcuts and click the + button to add a new one
Name: Brighter
Command: xbacklight -inc 15
Click OK, then click where it says 'Disabled' next to the new shortcut and press the key combination you want (Fn will probably not work) for example ctrl+F6 or just F6
Name: Dimmer
Command: xbacklight -dec 15
And make this one F5 or whatever combination you want.
Solution 2
I am on 20.04 and I used dconf-editor to adjust the screen brightness from keyboard shortcuts.
Open dconf-editor and search for screen-brightness-up
and screen-brightness-down
, and under custom-value change the value to the shortcut you want to set (will tell later how to know what to enter).
I don't know the exact syntax followed by dconf-editor, but I will tell you how to find the syntax. Head over to settings > Keyboard shortcuts. Now search for volume up
, and choose the shortcut which you want to use for screen brightness up. Then head over to dconf editor and search for volume-up
, and now see the string in the custom value for volume-up, and now copy paste this string to the screen-brightness-up
> custom value
field. We have to do this as we can access the shortcuts for volume and not for brightness.
So we manipulate the value for volume from settings and then use that value for screen-brightness-up in the dconf editor. And then remove that custom value from dconf-edtor for volume-up (or set it back to its previous value).
Hope this helps. I was finding this for a very long time and the other answer didn't work for me, but I was finally able to figure this hack out, and hopes this helps many other people.
youtube.com/watch?v=rZl2PJ8Vt1w. I made a video to do this. If it is difficult to follow.
Related videos on Youtube
Mek Vala
Updated on September 18, 2022Comments
-
Mek Vala over 1 year
I've installed Ubuntu 16.04 on my Asus X555LJ.
But I don't know how to install drivers or how to enable function keys to controls screen backlight brightness.
-
Admin almost 8 yearsany news? I would be interested to know if you found anything as it might work for me too :)
-
Admin almost 8 yearsNo, Now News On That. Currently I Using Solution Suggested By You :)
-
Admin almost 8 years:) I'll remember to come back here and let you know if I hear of a better way!
-
Admin almost 3 yearsyoutube.com/watch?v=rZl2PJ8Vt1w. I made a video to do this.
-
-
Scimonster over 7 yearsFor me, i was able to
xbacklight -dec
until the screen went off, so i wrote a small bash script to run instead that adds a lower limit of 10%. -
Zanna over 7 yearsNice work @Scimonster I decided I want to be able to reduce brightness until screen goes off, but many people will not want this. Share your script somewhere? Q&A? Shall I write a question for you ti answer?
-
Scimonster over 7 years
a=$(xbacklight);printf -v a %.0f "$a";b=10;if [ "$a" -gt "$b" ];then xbacklight -dec 5;fi;
It limits it at 10 (b=10
) and decrements by 5% each time. -
Porcupine almost 6 yearsdoesn't work in 18.04
-
Pablo Bianchi almost 3 yearsOn GNOME instead of xbacklight you can use D-Bus
-
Admin almost 2 yearssmoothly worked. I have Thinkpad T15 laptop with Ubuntu 22.04. For unknown reason, the screen brightness up/down was not working. Now I set it back to F5 and F6.