Page 1 of 1

Laptop Brightness Function Key Issues? Here's a Workaround

Posted: Tue 06 Aug 2013, 16:35
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!

Posted: Fri 09 Aug 2013, 22:40
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.

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

Posted: Wed 02 Oct 2013, 20:16
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!

Posted: Thu 03 Oct 2013, 03:04
by gcmartin
Which key will cause the pop-up for selection as shown in the OP's attached pic?

Posted: Thu 03 Oct 2013, 03:46
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.

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

Posted: Sun 03 Nov 2013, 10:48
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

Posted: Fri 22 Nov 2013, 04:08
by fm1st
@ gampr01: thanks for sharing!

Worked for me

Posted: Sun 12 Oct 2014, 00:31
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'.