1*4882a593Smuzhiyun================== 2*4882a593SmuzhiyunAsus Laptop Extras 3*4882a593Smuzhiyun================== 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunVersion 0.1 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunAugust 6, 2009 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunCorentin Chary <corentincj@iksaif.net> 10*4882a593Smuzhiyunhttp://acpi4asus.sf.net/ 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun This driver provides support for extra features of ACPI-compatible ASUS laptops. 13*4882a593Smuzhiyun It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or 14*4882a593Smuzhiyun VICTOR XP7210 for example). It makes all the extra buttons generate input 15*4882a593Smuzhiyun events (like keyboards). 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun On some models adds support for changing the display brightness and output, 18*4882a593Smuzhiyun switching the LCD backlight on and off, and most importantly, allows you to 19*4882a593Smuzhiyun blink those fancy LEDs intended for reporting mail and wireless status. 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunThis driver supersedes the old asus_acpi driver. 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunRequirements 24*4882a593Smuzhiyun------------ 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun Kernel 2.6.X sources, configured for your computer, with ACPI support. 27*4882a593Smuzhiyun You also need CONFIG_INPUT and CONFIG_ACPI. 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunStatus 30*4882a593Smuzhiyun------ 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun The features currently supported are the following (see below for 33*4882a593Smuzhiyun detailed description): 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun - Fn key combinations 36*4882a593Smuzhiyun - Bluetooth enable and disable 37*4882a593Smuzhiyun - Wlan enable and disable 38*4882a593Smuzhiyun - GPS enable and disable 39*4882a593Smuzhiyun - Video output switching 40*4882a593Smuzhiyun - Ambient Light Sensor on and off 41*4882a593Smuzhiyun - LED control 42*4882a593Smuzhiyun - LED Display control 43*4882a593Smuzhiyun - LCD brightness control 44*4882a593Smuzhiyun - LCD on and off 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun A compatibility table by model and feature is maintained on the web 47*4882a593Smuzhiyun site, http://acpi4asus.sf.net/. 48*4882a593Smuzhiyun 49*4882a593SmuzhiyunUsage 50*4882a593Smuzhiyun----- 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun Try "modprobe asus-laptop". Check your dmesg (simply type dmesg). You should 53*4882a593Smuzhiyun see some lines like this : 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun Asus Laptop Extras version 0.42 56*4882a593Smuzhiyun - L2D model detected. 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun If it is not the output you have on your laptop, send it (and the laptop's 59*4882a593Smuzhiyun DSDT) to me. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun That's all, now, all the events generated by the hotkeys of your laptop 62*4882a593Smuzhiyun should be reported via netlink events. You can check with 63*4882a593Smuzhiyun "acpi_genl monitor" (part of the acpica project). 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun Hotkeys are also reported as input keys (like keyboards) you can check 66*4882a593Smuzhiyun which key are supported using "xev" under X11. 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun You can get information on the version of your DSDT table by reading the 69*4882a593Smuzhiyun /sys/devices/platform/asus-laptop/infos entry. If you have a question or a 70*4882a593Smuzhiyun bug report to do, please include the output of this entry. 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunLEDs 73*4882a593Smuzhiyun---- 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun You can modify LEDs be echoing values to `/sys/class/leds/asus/*/brightness`:: 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun echo 1 > /sys/class/leds/asus::mail/brightness 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun will switch the mail LED on. 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun You can also know if they are on/off by reading their content and use 82*4882a593Smuzhiyun kernel triggers like disk-activity or heartbeat. 83*4882a593Smuzhiyun 84*4882a593SmuzhiyunBacklight 85*4882a593Smuzhiyun--------- 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun You can control lcd backlight power and brightness with 88*4882a593Smuzhiyun /sys/class/backlight/asus-laptop/. Brightness Values are between 0 and 15. 89*4882a593Smuzhiyun 90*4882a593SmuzhiyunWireless devices 91*4882a593Smuzhiyun---------------- 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun You can turn the internal Bluetooth adapter on/off with the bluetooth entry 94*4882a593Smuzhiyun (only on models with Bluetooth). This usually controls the associated LED. 95*4882a593Smuzhiyun Same for Wlan adapter. 96*4882a593Smuzhiyun 97*4882a593SmuzhiyunDisplay switching 98*4882a593Smuzhiyun----------------- 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun Note: the display switching code is currently considered EXPERIMENTAL. 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun Switching works for the following models: 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun - L3800C 105*4882a593Smuzhiyun - A2500H 106*4882a593Smuzhiyun - L5800C 107*4882a593Smuzhiyun - M5200N 108*4882a593Smuzhiyun - W1000N (albeit with some glitches) 109*4882a593Smuzhiyun - M6700R 110*4882a593Smuzhiyun - A6JC 111*4882a593Smuzhiyun - F3J 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun Switching doesn't work for the following: 114*4882a593Smuzhiyun 115*4882a593Smuzhiyun - M3700N 116*4882a593Smuzhiyun - L2X00D (locks the laptop under certain conditions) 117*4882a593Smuzhiyun 118*4882a593Smuzhiyun To switch the displays, echo values from 0 to 15 to 119*4882a593Smuzhiyun /sys/devices/platform/asus-laptop/display. The significance of those values 120*4882a593Smuzhiyun is as follows: 121*4882a593Smuzhiyun 122*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 123*4882a593Smuzhiyun | Bin | Val | DVI | TV | CRT | LCD | 124*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 125*4882a593Smuzhiyun | 0000 | 0 | | | | | 126*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 127*4882a593Smuzhiyun | 0001 | 1 | | | | X | 128*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 129*4882a593Smuzhiyun | 0010 | 2 | | | X | | 130*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 131*4882a593Smuzhiyun | 0011 | 3 | | | X | X | 132*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 133*4882a593Smuzhiyun | 0100 | 4 | | X | | | 134*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 135*4882a593Smuzhiyun | 0101 | 5 | | X | | X | 136*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 137*4882a593Smuzhiyun | 0110 | 6 | | X | X | | 138*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 139*4882a593Smuzhiyun | 0111 | 7 | | X | X | X | 140*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 141*4882a593Smuzhiyun | 1000 | 8 | X | | | | 142*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 143*4882a593Smuzhiyun | 1001 | 9 | X | | | X | 144*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 145*4882a593Smuzhiyun | 1010 | 10 | X | | X | | 146*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 147*4882a593Smuzhiyun | 1011 | 11 | X | | X | X | 148*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 149*4882a593Smuzhiyun | 1100 | 12 | X | X | | | 150*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 151*4882a593Smuzhiyun | 1101 | 13 | X | X | | X | 152*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 153*4882a593Smuzhiyun | 1110 | 14 | X | X | X | | 154*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 155*4882a593Smuzhiyun | 1111 | 15 | X | X | X | X | 156*4882a593Smuzhiyun +-------+-----+-----+-----+-----+-----+ 157*4882a593Smuzhiyun 158*4882a593Smuzhiyun In most cases, the appropriate displays must be plugged in for the above 159*4882a593Smuzhiyun combinations to work. TV-Out may need to be initialized at boot time. 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun Debugging: 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun 1) Check whether the Fn+F8 key: 164*4882a593Smuzhiyun 165*4882a593Smuzhiyun a) does not lock the laptop (try a boot with noapic / nolapic if it does) 166*4882a593Smuzhiyun b) generates events (0x6n, where n is the value corresponding to the 167*4882a593Smuzhiyun configuration above) 168*4882a593Smuzhiyun c) actually works 169*4882a593Smuzhiyun 170*4882a593Smuzhiyun Record the disp value at every configuration. 171*4882a593Smuzhiyun 2) Echo values from 0 to 15 to /sys/devices/platform/asus-laptop/display. 172*4882a593Smuzhiyun Record its value, note any change. If nothing changes, try a broader range, 173*4882a593Smuzhiyun up to 65535. 174*4882a593Smuzhiyun 3) Send ANY output (both positive and negative reports are needed, unless your 175*4882a593Smuzhiyun machine is already listed above) to the acpi4asus-user mailing list. 176*4882a593Smuzhiyun 177*4882a593Smuzhiyun Note: on some machines (e.g. L3C), after the module has been loaded, only 0x6n 178*4882a593Smuzhiyun events are generated and no actual switching occurs. In such a case, a line 179*4882a593Smuzhiyun like:: 180*4882a593Smuzhiyun 181*4882a593Smuzhiyun echo $((10#$arg-60)) > /sys/devices/platform/asus-laptop/display 182*4882a593Smuzhiyun 183*4882a593Smuzhiyun will usually do the trick ($arg is the 0000006n-like event passed to acpid). 184*4882a593Smuzhiyun 185*4882a593Smuzhiyun Note: there is currently no reliable way to read display status on xxN 186*4882a593Smuzhiyun (Centrino) models. 187*4882a593Smuzhiyun 188*4882a593SmuzhiyunLED display 189*4882a593Smuzhiyun----------- 190*4882a593Smuzhiyun 191*4882a593Smuzhiyun Some models like the W1N have a LED display that can be used to display 192*4882a593Smuzhiyun several items of information. 193*4882a593Smuzhiyun 194*4882a593Smuzhiyun LED display works for the following models: 195*4882a593Smuzhiyun 196*4882a593Smuzhiyun - W1000N 197*4882a593Smuzhiyun - W1J 198*4882a593Smuzhiyun 199*4882a593Smuzhiyun To control the LED display, use the following:: 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun echo 0x0T000DDD > /sys/devices/platform/asus-laptop/ 202*4882a593Smuzhiyun 203*4882a593Smuzhiyun where T control the 3 letters display, and DDD the 3 digits display, 204*4882a593Smuzhiyun according to the tables below:: 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun DDD (digits) 207*4882a593Smuzhiyun 000 to 999 = display digits 208*4882a593Smuzhiyun AAA = --- 209*4882a593Smuzhiyun BBB to FFF = turn-off 210*4882a593Smuzhiyun 211*4882a593Smuzhiyun T (type) 212*4882a593Smuzhiyun 0 = off 213*4882a593Smuzhiyun 1 = dvd 214*4882a593Smuzhiyun 2 = vcd 215*4882a593Smuzhiyun 3 = mp3 216*4882a593Smuzhiyun 4 = cd 217*4882a593Smuzhiyun 5 = tv 218*4882a593Smuzhiyun 6 = cpu 219*4882a593Smuzhiyun 7 = vol 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun For example "echo 0x01000001 >/sys/devices/platform/asus-laptop/ledd" 222*4882a593Smuzhiyun would display "DVD001". 223*4882a593Smuzhiyun 224*4882a593SmuzhiyunDriver options 225*4882a593Smuzhiyun-------------- 226*4882a593Smuzhiyun 227*4882a593Smuzhiyun Options can be passed to the asus-laptop driver using the standard 228*4882a593Smuzhiyun module argument syntax (<param>=<value> when passing the option to the 229*4882a593Smuzhiyun module or asus-laptop.<param>=<value> on the kernel boot line when 230*4882a593Smuzhiyun asus-laptop is statically linked into the kernel). 231*4882a593Smuzhiyun 232*4882a593Smuzhiyun wapf: WAPF defines the behavior of the Fn+Fx wlan key 233*4882a593Smuzhiyun The significance of values is yet to be found, but 234*4882a593Smuzhiyun most of the time: 235*4882a593Smuzhiyun 236*4882a593Smuzhiyun - 0x0 should do nothing 237*4882a593Smuzhiyun - 0x1 should allow to control the device with Fn+Fx key. 238*4882a593Smuzhiyun - 0x4 should send an ACPI event (0x88) while pressing the Fn+Fx key 239*4882a593Smuzhiyun - 0x5 like 0x1 or 0x4 240*4882a593Smuzhiyun 241*4882a593Smuzhiyun The default value is 0x1. 242*4882a593Smuzhiyun 243*4882a593SmuzhiyunUnsupported models 244*4882a593Smuzhiyun------------------ 245*4882a593Smuzhiyun 246*4882a593Smuzhiyun These models will never be supported by this module, as they use a completely 247*4882a593Smuzhiyun different mechanism to handle LEDs and extra stuff (meaning we have no clue 248*4882a593Smuzhiyun how it works): 249*4882a593Smuzhiyun 250*4882a593Smuzhiyun - ASUS A1300 (A1B), A1370D 251*4882a593Smuzhiyun - ASUS L7300G 252*4882a593Smuzhiyun - ASUS L8400 253*4882a593Smuzhiyun 254*4882a593SmuzhiyunPatches, Errors, Questions 255*4882a593Smuzhiyun-------------------------- 256*4882a593Smuzhiyun 257*4882a593Smuzhiyun I appreciate any success or failure 258*4882a593Smuzhiyun reports, especially if they add to or correct the compatibility table. 259*4882a593Smuzhiyun Please include the following information in your report: 260*4882a593Smuzhiyun 261*4882a593Smuzhiyun - Asus model name 262*4882a593Smuzhiyun - a copy of your ACPI tables, using the "acpidump" utility 263*4882a593Smuzhiyun - a copy of /sys/devices/platform/asus-laptop/infos 264*4882a593Smuzhiyun - which driver features work and which don't 265*4882a593Smuzhiyun - the observed behavior of non-working features 266*4882a593Smuzhiyun 267*4882a593Smuzhiyun Any other comments or patches are also more than welcome. 268*4882a593Smuzhiyun 269*4882a593Smuzhiyun acpi4asus-user@lists.sourceforge.net 270*4882a593Smuzhiyun 271*4882a593Smuzhiyun http://sourceforge.net/projects/acpi4asus 272