Podsvícení LCD [Ubuntu 10.04]

3125-27185 http://forum.notebookreview.com/5665108-post1246.html

Re: *Official UL30VT-X1 Owners Lounge*
Quote:
Originally Posted by o8x8 View Post
based on mil2’s code, I added post hibernate support
Nice work, o8x8! So there’s no need to re-disable Nvidia after suspend, only after hibernation? Cool… I should also mention that I expect this whole approach to work with UL50VT as well.

Anyway, here’s the promised info on the LCD brightness under Linux:

The most straightforward solution is to add:

Code:

nomodeset acpi_backlight=vendor

to the kernel command line in grub (GRUB_CMD_LINUX_DEFAULT in /etc/default/grub on Ubuntu). This is sufficient to enable backlight control via the hotkeys and the standard Linux API (xbacklight et al).

But this approach is not without problems. It is not future-proof: „nomodeset“ will not be supported in the next version of the Intel driver (2.10). Also, as I mentioned in my previous message, once Nvidia is disabled, ACPI video events are no longer generated when pressing the hotkeys, so one must use software solutions (xbacklight and friends) to change the backlight level, and it seems that at least Gnome has a tendency to fight these changes, but maybe there’s a workaround for that (disabling auto-dimming in Gnome power manager did not seem sufficient).

Also, I had the impression that the range of backlight settings was limited, particularly on the bright side. Changing the backlight control method to „legacy“ (I think) seemed to help. To list the available methods, invoke:

Code:

xrandr –prop

To change the method, invoke:

Code:

xrandr –output LVDS –set BACKLIGHT_CONTROL legacy

So this was the system-friendly method of backlight control on UL30VT under Linux. Here’s another one, that does not integrate with Linux APIs, but it works more reliably and does not require adjusting the kernel commandline (it actually works better without nomodeset and friends). It works by changing a hardware register on the Intel card directly:

Code:

setpci -s 00:02.0 F4.B=XX

where „XX“ is the brightness level in hexadecimal, 00 for no backlight and FF for the maximum.

You can forget about xbacklight and friends when using this method, but using the hotkeys is still possible with a few modifications in /etc/acpi. Add „%e“ to the end of the „action“ line in /etc/acpi/events/asus-brightness-{up,down}, and add the following lines at the end of /etc/acpi/asus-brn-{up,down}.sh:

Code:

brightness=`echo $3 | sed ‚s/0000001//’`
setpci -s 00:02.0 F4.B=${brightness}f

(the lines above are for asus-brn-up.sh; for asus-brn-down.sh, change „1“ to „2“). There is some latency when using the hotkeys with this method; I suggest to wait two seconds or so between subsequent presses.

Incidentally, one could make analogous changes to /etc/acpi/asus-brn-{up,down}.sh to invoke „xbacklight“ when using the first solution I described with Nvidia disabled. I’m leaving it as an exercise for the dedicated .

OK, that’s all the info I have on brightness.

Podsvícení LCD [Ubuntu 10.04]