Comment 41 for bug 173652

Revision history for this message
Petr Menšík (pihhan) wrote : Re: unable to adjust screen brightness on recent Sony Vaio notebooks

Before changing it like this, make sure nvclock does handle decrementing below zero and does not crash, if you request descreasing -S -10 when on 0, if that does ignore it. If it is, it is safe make it very simple. I recommend backup of original files. It should be safe making entire new files, maybe appending 2 to its name :) But havent tried it.

# /etc/acpi/events/sony-brightness-up

event=sony/hotkey (SPIC|SNC) 00000001 00000011
action=/usr/sbin/nvclock -S +10

# /etc/acpi/events/sony-brightness-down

event=sony/hotkey (SPIC|SNC) 00000001 00000010
action=/usr/sbin/nvclock -S -10

then reload acpid configuration, and it should work:
sudo invoke-rc.d acpid reload

Check also /var/log/acpid, if it does not report some interesting errors after key pressed. Should work after that, but who knows. Try and see.

If it does not handle border values, you try to find way to get value of current backlight from nvclock (maybe nvclock -S without number?). It should be needed to make script then.

But it is obvious we should make some detection script, maybe run at startup. It should guess which type of backlight control would work for our model, and set some variable to some file. At keypress of backlight, we may be able to use right method using that variable. I dont think it is wise to autodetect it at each keypress again and again. This would be needed especially on laptops with two GPUs, speed and stamina, as they could be always different on each boot (or does it support hotswap at windows?). We should make some wiki pageand write table, for what laptops with what GPU what method of backlight control did work. Because i dont believe one script will simply work for all vaios this way. And i want always working method, if possible :)