Quote:
Originally Posted by o8x8
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:
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. One last thing I wanted to share with you was a patch to libv4l to flip the built-in camera output to get correct orientation:
Code:
--- libv4lcontrol.c.orig 2009-12-20 16:19:46.000000000 +0100
+++ libv4lcontrol.c 2009-12-25 16:01:11.000000000 +0100
@@ -111,6 +111,8 @@ static const struct v4lcontrol_flags_inf
V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED },
{ 0x04f2, 0xb036, 0, "ASUSTeK Computer Inc. ", "UL30A ",
V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED },
+ { 0x04f2, 0xb036, 0, "ASUSTeK Computer Inc. ", "UL30VT ",
+ V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED },
{ 0x04f2, 0xb071, 0, "ASUSTeK Computer Inc. ", "K40IJ ",
V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED },
{ 0x04f2, 0xb071, 0, "ASUSTeK Computer Inc. ", "K40IN ",
It applies to libv4lconvert/control/libv4lcontrol.c in 0.6.4-test version dated December 20, 2009 taken from
here. I sent it to the author and I just heard back that it will be included in the next release.
This should correct the orientation with any software that uses libv4l, which, as I write this, excludes Skype. A workaround for Skype is to LD_PRELOAD the v4l2convert.so object; if you need more info, Google is your friend.