Laptop Brightness Function Key Issues? Here's a Workaround

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
Cadejo
Posts: 75
Joined: Tue 30 Jun 2009, 02:55

Laptop Brightness Function Key Issues? Here's a Workaround

#1 Post by Cadejo »

My screen brightness function keys stopped working in precise 5.7.1 so here's a workaround. It essentially builds a pop-up menu to control brightness in JWM.

Take a good look at https://wiki.archlinux.org/index.php/Backlight, it provided the workaround used below.

Don't forget to restart JWM after saving the edits.

Copy below into /etc/xdg/templates/_root_.jwmrc and /root/.jwmrc , add it before the first <RootMenu> entries

Code: Select all

<RootMenu label="" labeled="false" height="24" onroot="6">
<Program label="1" icon=""> echo 1 > /sys/class/backlight/acpi_video0/brightness</Program>
<Program label="2" icon=""> echo 2 > /sys/class/backlight/acpi_video0/brightness</Program>
<Program label="3" icon=""> echo 3 > /sys/class/backlight/acpi_video0/brightness</Program>
<Program label="4" icon=""> echo 4 > /sys/class/backlight/acpi_video0/brightness</Program>
<Program label="5" icon=""> echo 5 > /sys/class/backlight/acpi_video0/brightness</Program>
<Program label="6" icon=""> echo 6 > /sys/class/backlight/acpi_video0/brightness</Program>
<Program label="7" icon=""> echo 7 > /sys/class/backlight/acpi_video0/brightness</Program>
</RootMenu>
And add the following into /root/.jwmrc-tray after the "<TaskList/>" entry

Code: Select all

<TrayButton label="" icon="/usr/local/lib/X11/mini-icons/idea16.xpm">root:6</TrayButton>
Please see the attached image for the cool pop-up brightness control!
Attachments
capture29500.jpg
(81.05 KiB) Downloaded 2523 times

tmihai
Posts: 11
Joined: Fri 09 Aug 2013, 08:15

#2 Post by tmihai »

Solved
"Somehow I can't make it work.
It worked once but then it replaced my main menu, and then the icon appears but does not work.
What am I doing wrong?"

It works now. No idea why now and not before.

User avatar
fm1st
Posts: 30
Joined: Mon 28 Sep 2009, 19:58
Location: Rio de Janeiro

Re: Laptop Brightness Function Key Issues? Here's a Workaround

#3 Post by fm1st »

Cadejo wrote:My screen brightness function keys stopped working in precise 5.7.1 so here's a workaround. It essentially builds a pop-up menu to control brightness in JWM.
Cadejo, thank you VERY VERY much for presenting this brilliant workaround :lol: , which enabled me to put back in use a "useless" but still very powerful laptop (Sony VAIO, with Intel Core2 Duo P9500 @2.53Gh, 4 Gb Ram and Scratch resistant XBRITE-Duravaview LCD).
The previous owner at least once spanked :cry: the poor laptop, probably due to its OS (Ruindows) in a broken HD, and sadly its whole keyboard, touch-pad and all function keys went all completely dead broken, with the screen locked at its highest possible brightness, causing a lot of eye strain after a little while of use.

... and after I found your workaround, I managed to follow it correctly and now the "useless" laptop is brought back to life and working beautifully - without any HDs but with external keyboard and mouse -, running Lucid Puppy 5.2.8 with your brightness control implemented.

Again, THANK YOU VERY MUCH!

gcmartin

#4 Post by gcmartin »

Which key will cause the pop-up for selection as shown in the OP's attached pic?

User avatar
fm1st
Posts: 30
Joined: Mon 28 Sep 2009, 19:58
Location: Rio de Janeiro

#5 Post by fm1st »

gcmartin wrote:Which key will cause the pop-up for selection as shown in the OP's attached pic?
It is not a key, it is the button with the tiny "lamp" icon that is created in the task bar after you have done the three edits described by Cadejo, saved them and restarted JWM. Once clicked, it generates the popup to select the brightness of the laptop screen, from "1" (darkest) to "7" (brightest).
It was not clear to me :( where exactly to add the code lines in the edits but after some trial and errors I managed to get the brightness control to work. :lol: If you wish I can send some screenshots of my files before and after the edits.

gampr01
Posts: 9
Joined: Sun 03 Nov 2013, 10:38

Re: Laptop Brightness Function Key Issues? Here's a Workaround

#6 Post by gampr01 »

Found this solution on archlinux forum - this made the default screen brightness adjustment keys work on my acer 4830TG:

just add "acpi_osi=Linux" (without "") to the menu.lst of grub/grub4dos, line kernel. Such, my menu.lst now looks like this, and the screen adjustment works as it should :-)

title Puppy Linux 5.6.0 Slacko
find --set-root --ignore-floppies /Puppy/initrd.gz
kernel /Puppy/vmlinuz pmedia=atahd psubdir=Puppy pcie_aspm=force acpi_osi=Linux
initrd /Puppy/initrd.gz

User avatar
fm1st
Posts: 30
Joined: Mon 28 Sep 2009, 19:58
Location: Rio de Janeiro

#7 Post by fm1st »

@ gampr01: thanks for sharing!

tsc
Posts: 1
Joined: Sat 11 Oct 2014, 10:09

Worked for me

#8 Post by tsc »

Thanks for this suggestion. It allowed me to reduce the glare from the screen to a pleasant level depending on the light. I am new to Puppy Linux (Slacko 5.7) and it took a moment for me to realise that JWM is restarted by clicking on Shutdown and selecting 'Restart Windows Manager'.

Post Reply