On Fri, 2007-07-06 at 18:44 -0300, Henrique de Moraes Holschuh wrote: > Please test the attached patch, and try the three possible values for > brightness_mode. One of them should fix the X60. > > (note: untested patch, I am in a big hurry. Will test it on the T43 later). > > Apply on top of thinkpad-acpi 20070701, it will have some line differences, > but it will work. > Hi. Tested on the ubuntu 2.6.22 flavor. Works with modprobe thinkpad_acpi experimental=1 brightness_mode=2 (the nvram stuff). The proc interface shows the correct values, and the g-p-m osd works beautifully in sync. Just a few questions: + if (brightness_mode & 1) { + if (!acpi_ec_read(brightness_offset, &level)) + return -EIO; + lnvram &= 7; + level = lnvram; + }; Shouldn't the previous be something like: + if (brightness_mode & 1) { + if (!acpi_ec_read(brightness_offset, &lnvram)) + return -EIO; + lnvram &= 7; + level = lnvram; + } And maybe exchange the names ? Brightness mode 1 is performing the ec_read from cmos, while lnvram looks at 0x5e from /dev/nvram right ? + if (brightness_mode & 1) { + if (!acpi_ec_read(brightness_offset, &lcmos)) + return -EIO; + lcmos &= 7; + level = lcmos; + } + if (brightness_mode & 2) { + lnvram = (nvram_read_byte(TP_NVRAM_ADDR_BRIGHTNESS) + & TP_NVRAM_MASK_LEVEL_BRIGHTNESS) + >> TP_NVRAM_POS_LEVEL_BRIGHTNESS; + level = lnvram; + } Thanks, for the patch, works ok. Meanwhile i'm raising a red flag on the fan support in 2.6.22. It doesn't allow writing to proc anymore. But i'll raise this on another thread. Alfredo. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ ibm-acpi-devel mailing list ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel