diff options
Diffstat (limited to 'Documentation/laptops')
-rw-r--r-- | Documentation/laptops/00-INDEX | 6 | ||||
-rw-r--r-- | Documentation/laptops/Makefile | 8 | ||||
-rw-r--r-- | Documentation/laptops/acer-wmi.txt | 2 | ||||
-rw-r--r-- | Documentation/laptops/dslm.c | 166 | ||||
-rw-r--r-- | Documentation/laptops/laptop-mode.txt | 172 | ||||
-rw-r--r-- | Documentation/laptops/thinkpad-acpi.txt | 145 |
6 files changed, 251 insertions, 248 deletions
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX index ee5692b26dd4..fa688538e757 100644 --- a/Documentation/laptops/00-INDEX +++ b/Documentation/laptops/00-INDEX | |||
@@ -2,6 +2,12 @@ | |||
2 | - This file | 2 | - This file |
3 | acer-wmi.txt | 3 | acer-wmi.txt |
4 | - information on the Acer Laptop WMI Extras driver. | 4 | - information on the Acer Laptop WMI Extras driver. |
5 | asus-laptop.txt | ||
6 | - information on the Asus Laptop Extras driver. | ||
7 | disk-shock-protection.txt | ||
8 | - information on hard disk shock protection. | ||
9 | dslm.c | ||
10 | - Simple Disk Sleep Monitor program | ||
5 | laptop-mode.txt | 11 | laptop-mode.txt |
6 | - how to conserve battery power using laptop-mode. | 12 | - how to conserve battery power using laptop-mode. |
7 | sony-laptop.txt | 13 | sony-laptop.txt |
diff --git a/Documentation/laptops/Makefile b/Documentation/laptops/Makefile new file mode 100644 index 000000000000..5cb144af3c09 --- /dev/null +++ b/Documentation/laptops/Makefile | |||
@@ -0,0 +1,8 @@ | |||
1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. | ||
2 | obj- := dummy.o | ||
3 | |||
4 | # List of programs to build | ||
5 | hostprogs-y := dslm | ||
6 | |||
7 | # Tell kbuild to always build the programs | ||
8 | always := $(hostprogs-y) | ||
diff --git a/Documentation/laptops/acer-wmi.txt b/Documentation/laptops/acer-wmi.txt index 0768fcc3ba3e..4beafa663dd6 100644 --- a/Documentation/laptops/acer-wmi.txt +++ b/Documentation/laptops/acer-wmi.txt | |||
@@ -173,7 +173,7 @@ Credits | |||
173 | ******* | 173 | ******* |
174 | 174 | ||
175 | Olaf Tauber, who did the real hard work when he developed acerhk | 175 | Olaf Tauber, who did the real hard work when he developed acerhk |
176 | http://www.informatik.hu-berlin.de/~tauber/acerhk | 176 | http://www.cakey.de/acerhk/ |
177 | All the authors of laptop ACPI modules in the kernel, whose work | 177 | All the authors of laptop ACPI modules in the kernel, whose work |
178 | was an inspiration in the early days of acer_acpi | 178 | was an inspiration in the early days of acer_acpi |
179 | Mathieu Segaud, who solved the problem with having to modprobe the driver | 179 | Mathieu Segaud, who solved the problem with having to modprobe the driver |
diff --git a/Documentation/laptops/dslm.c b/Documentation/laptops/dslm.c new file mode 100644 index 000000000000..72ff290c5fc6 --- /dev/null +++ b/Documentation/laptops/dslm.c | |||
@@ -0,0 +1,166 @@ | |||
1 | /* | ||
2 | * dslm.c | ||
3 | * Simple Disk Sleep Monitor | ||
4 | * by Bartek Kania | ||
5 | * Licenced under the GPL | ||
6 | */ | ||
7 | #include <unistd.h> | ||
8 | #include <stdlib.h> | ||
9 | #include <stdio.h> | ||
10 | #include <fcntl.h> | ||
11 | #include <errno.h> | ||
12 | #include <time.h> | ||
13 | #include <string.h> | ||
14 | #include <signal.h> | ||
15 | #include <sys/ioctl.h> | ||
16 | #include <linux/hdreg.h> | ||
17 | |||
18 | #ifdef DEBUG | ||
19 | #define D(x) x | ||
20 | #else | ||
21 | #define D(x) | ||
22 | #endif | ||
23 | |||
24 | int endit = 0; | ||
25 | |||
26 | /* Check if the disk is in powersave-mode | ||
27 | * Most of the code is stolen from hdparm. | ||
28 | * 1 = active, 0 = standby/sleep, -1 = unknown */ | ||
29 | static int check_powermode(int fd) | ||
30 | { | ||
31 | unsigned char args[4] = {WIN_CHECKPOWERMODE1,0,0,0}; | ||
32 | int state; | ||
33 | |||
34 | if (ioctl(fd, HDIO_DRIVE_CMD, &args) | ||
35 | && (args[0] = WIN_CHECKPOWERMODE2) /* try again with 0x98 */ | ||
36 | && ioctl(fd, HDIO_DRIVE_CMD, &args)) { | ||
37 | if (errno != EIO || args[0] != 0 || args[1] != 0) { | ||
38 | state = -1; /* "unknown"; */ | ||
39 | } else | ||
40 | state = 0; /* "sleeping"; */ | ||
41 | } else { | ||
42 | state = (args[2] == 255) ? 1 : 0; | ||
43 | } | ||
44 | D(printf(" drive state is: %d\n", state)); | ||
45 | |||
46 | return state; | ||
47 | } | ||
48 | |||
49 | static char *state_name(int i) | ||
50 | { | ||
51 | if (i == -1) return "unknown"; | ||
52 | if (i == 0) return "sleeping"; | ||
53 | if (i == 1) return "active"; | ||
54 | |||
55 | return "internal error"; | ||
56 | } | ||
57 | |||
58 | static char *myctime(time_t time) | ||
59 | { | ||
60 | char *ts = ctime(&time); | ||
61 | ts[strlen(ts) - 1] = 0; | ||
62 | |||
63 | return ts; | ||
64 | } | ||
65 | |||
66 | static void measure(int fd) | ||
67 | { | ||
68 | time_t start_time; | ||
69 | int last_state; | ||
70 | time_t last_time; | ||
71 | int curr_state; | ||
72 | time_t curr_time = 0; | ||
73 | time_t time_diff; | ||
74 | time_t active_time = 0; | ||
75 | time_t sleep_time = 0; | ||
76 | time_t unknown_time = 0; | ||
77 | time_t total_time = 0; | ||
78 | int changes = 0; | ||
79 | float tmp; | ||
80 | |||
81 | printf("Starting measurements\n"); | ||
82 | |||
83 | last_state = check_powermode(fd); | ||
84 | start_time = last_time = time(0); | ||
85 | printf(" System is in state %s\n\n", state_name(last_state)); | ||
86 | |||
87 | while(!endit) { | ||
88 | sleep(1); | ||
89 | curr_state = check_powermode(fd); | ||
90 | |||
91 | if (curr_state != last_state || endit) { | ||
92 | changes++; | ||
93 | curr_time = time(0); | ||
94 | time_diff = curr_time - last_time; | ||
95 | |||
96 | if (last_state == 1) active_time += time_diff; | ||
97 | else if (last_state == 0) sleep_time += time_diff; | ||
98 | else unknown_time += time_diff; | ||
99 | |||
100 | last_state = curr_state; | ||
101 | last_time = curr_time; | ||
102 | |||
103 | printf("%s: State-change to %s\n", myctime(curr_time), | ||
104 | state_name(curr_state)); | ||
105 | } | ||
106 | } | ||
107 | changes--; /* Compensate for SIGINT */ | ||
108 | |||
109 | total_time = time(0) - start_time; | ||
110 | printf("\nTotal running time: %lus\n", curr_time - start_time); | ||
111 | printf(" State changed %d times\n", changes); | ||
112 | |||
113 | tmp = (float)sleep_time / (float)total_time * 100; | ||
114 | printf(" Time in sleep state: %lus (%.2f%%)\n", sleep_time, tmp); | ||
115 | tmp = (float)active_time / (float)total_time * 100; | ||
116 | printf(" Time in active state: %lus (%.2f%%)\n", active_time, tmp); | ||
117 | tmp = (float)unknown_time / (float)total_time * 100; | ||
118 | printf(" Time in unknown state: %lus (%.2f%%)\n", unknown_time, tmp); | ||
119 | } | ||
120 | |||
121 | static void ender(int s) | ||
122 | { | ||
123 | endit = 1; | ||
124 | } | ||
125 | |||
126 | static void usage(void) | ||
127 | { | ||
128 | puts("usage: dslm [-w <time>] <disk>"); | ||
129 | exit(0); | ||
130 | } | ||
131 | |||
132 | int main(int argc, char **argv) | ||
133 | { | ||
134 | int fd; | ||
135 | char *disk = 0; | ||
136 | int settle_time = 60; | ||
137 | |||
138 | /* Parse the simple command-line */ | ||
139 | if (argc == 2) | ||
140 | disk = argv[1]; | ||
141 | else if (argc == 4) { | ||
142 | settle_time = atoi(argv[2]); | ||
143 | disk = argv[3]; | ||
144 | } else | ||
145 | usage(); | ||
146 | |||
147 | if (!(fd = open(disk, O_RDONLY|O_NONBLOCK))) { | ||
148 | printf("Can't open %s, because: %s\n", disk, strerror(errno)); | ||
149 | exit(-1); | ||
150 | } | ||
151 | |||
152 | if (settle_time) { | ||
153 | printf("Waiting %d seconds for the system to settle down to " | ||
154 | "'normal'\n", settle_time); | ||
155 | sleep(settle_time); | ||
156 | } else | ||
157 | puts("Not waiting for system to settle down"); | ||
158 | |||
159 | signal(SIGINT, ender); | ||
160 | |||
161 | measure(fd); | ||
162 | |||
163 | close(fd); | ||
164 | |||
165 | return 0; | ||
166 | } | ||
diff --git a/Documentation/laptops/laptop-mode.txt b/Documentation/laptops/laptop-mode.txt index eeedee11c8c2..0bf25eebce94 100644 --- a/Documentation/laptops/laptop-mode.txt +++ b/Documentation/laptops/laptop-mode.txt | |||
@@ -207,7 +207,7 @@ Tips & Tricks | |||
207 | * Drew Scott Daniels observed: "I don't know why, but when I decrease the number | 207 | * Drew Scott Daniels observed: "I don't know why, but when I decrease the number |
208 | of colours that my display uses it consumes less battery power. I've seen | 208 | of colours that my display uses it consumes less battery power. I've seen |
209 | this on powerbooks too. I hope that this is a piece of information that | 209 | this on powerbooks too. I hope that this is a piece of information that |
210 | might be useful to the Laptop Mode patch or it's users." | 210 | might be useful to the Laptop Mode patch or its users." |
211 | 211 | ||
212 | * In syslog.conf, you can prefix entries with a dash ``-'' to omit syncing the | 212 | * In syslog.conf, you can prefix entries with a dash ``-'' to omit syncing the |
213 | file after every logging. When you're using laptop-mode and your disk doesn't | 213 | file after every logging. When you're using laptop-mode and your disk doesn't |
@@ -779,172 +779,4 @@ Monitoring tool | |||
779 | --------------- | 779 | --------------- |
780 | 780 | ||
781 | Bartek Kania submitted this, it can be used to measure how much time your disk | 781 | Bartek Kania submitted this, it can be used to measure how much time your disk |
782 | spends spun up/down. | 782 | spends spun up/down. See Documentation/laptops/dslm.c |
783 | |||
784 | ---------------------------dslm.c BEGIN----------------------------------------- | ||
785 | /* | ||
786 | * Simple Disk Sleep Monitor | ||
787 | * by Bartek Kania | ||
788 | * Licenced under the GPL | ||
789 | */ | ||
790 | #include <unistd.h> | ||
791 | #include <stdlib.h> | ||
792 | #include <stdio.h> | ||
793 | #include <fcntl.h> | ||
794 | #include <errno.h> | ||
795 | #include <time.h> | ||
796 | #include <string.h> | ||
797 | #include <signal.h> | ||
798 | #include <sys/ioctl.h> | ||
799 | #include <linux/hdreg.h> | ||
800 | |||
801 | #ifdef DEBUG | ||
802 | #define D(x) x | ||
803 | #else | ||
804 | #define D(x) | ||
805 | #endif | ||
806 | |||
807 | int endit = 0; | ||
808 | |||
809 | /* Check if the disk is in powersave-mode | ||
810 | * Most of the code is stolen from hdparm. | ||
811 | * 1 = active, 0 = standby/sleep, -1 = unknown */ | ||
812 | int check_powermode(int fd) | ||
813 | { | ||
814 | unsigned char args[4] = {WIN_CHECKPOWERMODE1,0,0,0}; | ||
815 | int state; | ||
816 | |||
817 | if (ioctl(fd, HDIO_DRIVE_CMD, &args) | ||
818 | && (args[0] = WIN_CHECKPOWERMODE2) /* try again with 0x98 */ | ||
819 | && ioctl(fd, HDIO_DRIVE_CMD, &args)) { | ||
820 | if (errno != EIO || args[0] != 0 || args[1] != 0) { | ||
821 | state = -1; /* "unknown"; */ | ||
822 | } else | ||
823 | state = 0; /* "sleeping"; */ | ||
824 | } else { | ||
825 | state = (args[2] == 255) ? 1 : 0; | ||
826 | } | ||
827 | D(printf(" drive state is: %d\n", state)); | ||
828 | |||
829 | return state; | ||
830 | } | ||
831 | |||
832 | char *state_name(int i) | ||
833 | { | ||
834 | if (i == -1) return "unknown"; | ||
835 | if (i == 0) return "sleeping"; | ||
836 | if (i == 1) return "active"; | ||
837 | |||
838 | return "internal error"; | ||
839 | } | ||
840 | |||
841 | char *myctime(time_t time) | ||
842 | { | ||
843 | char *ts = ctime(&time); | ||
844 | ts[strlen(ts) - 1] = 0; | ||
845 | |||
846 | return ts; | ||
847 | } | ||
848 | |||
849 | void measure(int fd) | ||
850 | { | ||
851 | time_t start_time; | ||
852 | int last_state; | ||
853 | time_t last_time; | ||
854 | int curr_state; | ||
855 | time_t curr_time = 0; | ||
856 | time_t time_diff; | ||
857 | time_t active_time = 0; | ||
858 | time_t sleep_time = 0; | ||
859 | time_t unknown_time = 0; | ||
860 | time_t total_time = 0; | ||
861 | int changes = 0; | ||
862 | float tmp; | ||
863 | |||
864 | printf("Starting measurements\n"); | ||
865 | |||
866 | last_state = check_powermode(fd); | ||
867 | start_time = last_time = time(0); | ||
868 | printf(" System is in state %s\n\n", state_name(last_state)); | ||
869 | |||
870 | while(!endit) { | ||
871 | sleep(1); | ||
872 | curr_state = check_powermode(fd); | ||
873 | |||
874 | if (curr_state != last_state || endit) { | ||
875 | changes++; | ||
876 | curr_time = time(0); | ||
877 | time_diff = curr_time - last_time; | ||
878 | |||
879 | if (last_state == 1) active_time += time_diff; | ||
880 | else if (last_state == 0) sleep_time += time_diff; | ||
881 | else unknown_time += time_diff; | ||
882 | |||
883 | last_state = curr_state; | ||
884 | last_time = curr_time; | ||
885 | |||
886 | printf("%s: State-change to %s\n", myctime(curr_time), | ||
887 | state_name(curr_state)); | ||
888 | } | ||
889 | } | ||
890 | changes--; /* Compensate for SIGINT */ | ||
891 | |||
892 | total_time = time(0) - start_time; | ||
893 | printf("\nTotal running time: %lus\n", curr_time - start_time); | ||
894 | printf(" State changed %d times\n", changes); | ||
895 | |||
896 | tmp = (float)sleep_time / (float)total_time * 100; | ||
897 | printf(" Time in sleep state: %lus (%.2f%%)\n", sleep_time, tmp); | ||
898 | tmp = (float)active_time / (float)total_time * 100; | ||
899 | printf(" Time in active state: %lus (%.2f%%)\n", active_time, tmp); | ||
900 | tmp = (float)unknown_time / (float)total_time * 100; | ||
901 | printf(" Time in unknown state: %lus (%.2f%%)\n", unknown_time, tmp); | ||
902 | } | ||
903 | |||
904 | void ender(int s) | ||
905 | { | ||
906 | endit = 1; | ||
907 | } | ||
908 | |||
909 | void usage() | ||
910 | { | ||
911 | puts("usage: dslm [-w <time>] <disk>"); | ||
912 | exit(0); | ||
913 | } | ||
914 | |||
915 | int main(int argc, char **argv) | ||
916 | { | ||
917 | int fd; | ||
918 | char *disk = 0; | ||
919 | int settle_time = 60; | ||
920 | |||
921 | /* Parse the simple command-line */ | ||
922 | if (argc == 2) | ||
923 | disk = argv[1]; | ||
924 | else if (argc == 4) { | ||
925 | settle_time = atoi(argv[2]); | ||
926 | disk = argv[3]; | ||
927 | } else | ||
928 | usage(); | ||
929 | |||
930 | if (!(fd = open(disk, O_RDONLY|O_NONBLOCK))) { | ||
931 | printf("Can't open %s, because: %s\n", disk, strerror(errno)); | ||
932 | exit(-1); | ||
933 | } | ||
934 | |||
935 | if (settle_time) { | ||
936 | printf("Waiting %d seconds for the system to settle down to " | ||
937 | "'normal'\n", settle_time); | ||
938 | sleep(settle_time); | ||
939 | } else | ||
940 | puts("Not waiting for system to settle down"); | ||
941 | |||
942 | signal(SIGINT, ender); | ||
943 | |||
944 | measure(fd); | ||
945 | |||
946 | close(fd); | ||
947 | |||
948 | return 0; | ||
949 | } | ||
950 | ---------------------------dslm.c END------------------------------------------- | ||
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt index 75afa1229fd7..1565eefd6fd5 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/laptops/thinkpad-acpi.txt | |||
@@ -292,13 +292,13 @@ sysfs notes: | |||
292 | 292 | ||
293 | Warning: when in NVRAM mode, the volume up/down/mute | 293 | Warning: when in NVRAM mode, the volume up/down/mute |
294 | keys are synthesized according to changes in the mixer, | 294 | keys are synthesized according to changes in the mixer, |
295 | so you have to use volume up or volume down to unmute, | 295 | which uses a single volume up or volume down hotkey |
296 | as per the ThinkPad volume mixer user interface. When | 296 | press to unmute, as per the ThinkPad volume mixer user |
297 | in ACPI event mode, volume up/down/mute are reported as | 297 | interface. When in ACPI event mode, volume up/down/mute |
298 | separate events, but this behaviour may be corrected in | 298 | events are reported by the firmware and can behave |
299 | future releases of this driver, in which case the | 299 | differently (and that behaviour changes with firmware |
300 | ThinkPad volume mixer user interface semantics will be | 300 | version -- not just with firmware models -- as well as |
301 | enforced. | 301 | OSI(Linux) state). |
302 | 302 | ||
303 | hotkey_poll_freq: | 303 | hotkey_poll_freq: |
304 | frequency in Hz for hot key polling. It must be between | 304 | frequency in Hz for hot key polling. It must be between |
@@ -309,7 +309,7 @@ sysfs notes: | |||
309 | will cause hot key presses that require NVRAM polling | 309 | will cause hot key presses that require NVRAM polling |
310 | to never be reported. | 310 | to never be reported. |
311 | 311 | ||
312 | Setting hotkey_poll_freq too low will cause repeated | 312 | Setting hotkey_poll_freq too low may cause repeated |
313 | pressings of the same hot key to be misreported as a | 313 | pressings of the same hot key to be misreported as a |
314 | single key press, or to not even be detected at all. | 314 | single key press, or to not even be detected at all. |
315 | The recommended polling frequency is 10Hz. | 315 | The recommended polling frequency is 10Hz. |
@@ -397,6 +397,7 @@ ACPI Scan | |||
397 | event code Key Notes | 397 | event code Key Notes |
398 | 398 | ||
399 | 0x1001 0x00 FN+F1 - | 399 | 0x1001 0x00 FN+F1 - |
400 | |||
400 | 0x1002 0x01 FN+F2 IBM: battery (rare) | 401 | 0x1002 0x01 FN+F2 IBM: battery (rare) |
401 | Lenovo: Screen lock | 402 | Lenovo: Screen lock |
402 | 403 | ||
@@ -404,7 +405,8 @@ event code Key Notes | |||
404 | this hot key, even with hot keys | 405 | this hot key, even with hot keys |
405 | disabled or with Fn+F3 masked | 406 | disabled or with Fn+F3 masked |
406 | off | 407 | off |
407 | IBM: screen lock | 408 | IBM: screen lock, often turns |
409 | off the ThinkLight as side-effect | ||
408 | Lenovo: battery | 410 | Lenovo: battery |
409 | 411 | ||
410 | 0x1004 0x03 FN+F4 Sleep button (ACPI sleep button | 412 | 0x1004 0x03 FN+F4 Sleep button (ACPI sleep button |
@@ -433,7 +435,8 @@ event code Key Notes | |||
433 | Do you feel lucky today? | 435 | Do you feel lucky today? |
434 | 436 | ||
435 | 0x1008 0x07 FN+F8 IBM: toggle screen expand | 437 | 0x1008 0x07 FN+F8 IBM: toggle screen expand |
436 | Lenovo: configure UltraNav | 438 | Lenovo: configure UltraNav, |
439 | or toggle screen expand | ||
437 | 440 | ||
438 | 0x1009 0x08 FN+F9 - | 441 | 0x1009 0x08 FN+F9 - |
439 | .. .. .. | 442 | .. .. .. |
@@ -444,7 +447,7 @@ event code Key Notes | |||
444 | either through the ACPI event, | 447 | either through the ACPI event, |
445 | or through a hotkey event. | 448 | or through a hotkey event. |
446 | The firmware may refuse to | 449 | The firmware may refuse to |
447 | generate further FN+F4 key | 450 | generate further FN+F12 key |
448 | press events until a S3 or S4 | 451 | press events until a S3 or S4 |
449 | ACPI sleep cycle is performed, | 452 | ACPI sleep cycle is performed, |
450 | or some time passes. | 453 | or some time passes. |
@@ -512,15 +515,19 @@ events for switches: | |||
512 | SW_RFKILL_ALL T60 and later hardware rfkill rocker switch | 515 | SW_RFKILL_ALL T60 and later hardware rfkill rocker switch |
513 | SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A | 516 | SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A |
514 | 517 | ||
515 | Non hot-key ACPI HKEY event map: | 518 | Non hotkey ACPI HKEY event map: |
519 | ------------------------------- | ||
520 | |||
521 | Events that are not propagated by the driver, except for legacy | ||
522 | compatibility purposes when hotkey_report_mode is set to 1: | ||
523 | |||
516 | 0x5001 Lid closed | 524 | 0x5001 Lid closed |
517 | 0x5002 Lid opened | 525 | 0x5002 Lid opened |
518 | 0x5009 Tablet swivel: switched to tablet mode | 526 | 0x5009 Tablet swivel: switched to tablet mode |
519 | 0x500A Tablet swivel: switched to normal mode | 527 | 0x500A Tablet swivel: switched to normal mode |
520 | 0x7000 Radio Switch may have changed state | 528 | 0x7000 Radio Switch may have changed state |
521 | 529 | ||
522 | The above events are not propagated by the driver, except for legacy | 530 | Events that are never propagated by the driver: |
523 | compatibility purposes when hotkey_report_mode is set to 1. | ||
524 | 531 | ||
525 | 0x2304 System is waking up from suspend to undock | 532 | 0x2304 System is waking up from suspend to undock |
526 | 0x2305 System is waking up from suspend to eject bay | 533 | 0x2305 System is waking up from suspend to eject bay |
@@ -528,14 +535,39 @@ compatibility purposes when hotkey_report_mode is set to 1. | |||
528 | 0x2405 System is waking up from hibernation to eject bay | 535 | 0x2405 System is waking up from hibernation to eject bay |
529 | 0x5010 Brightness level changed/control event | 536 | 0x5010 Brightness level changed/control event |
530 | 537 | ||
531 | The above events are never propagated by the driver. | 538 | Events that are propagated by the driver to userspace: |
532 | 539 | ||
540 | 0x2313 ALARM: System is waking up from suspend because | ||
541 | the battery is nearly empty | ||
542 | 0x2413 ALARM: System is waking up from hibernation because | ||
543 | the battery is nearly empty | ||
533 | 0x3003 Bay ejection (see 0x2x05) complete, can sleep again | 544 | 0x3003 Bay ejection (see 0x2x05) complete, can sleep again |
545 | 0x3006 Bay hotplug request (hint to power up SATA link when | ||
546 | the optical drive tray is ejected) | ||
534 | 0x4003 Undocked (see 0x2x04), can sleep again | 547 | 0x4003 Undocked (see 0x2x04), can sleep again |
535 | 0x500B Tablet pen inserted into its storage bay | 548 | 0x500B Tablet pen inserted into its storage bay |
536 | 0x500C Tablet pen removed from its storage bay | 549 | 0x500C Tablet pen removed from its storage bay |
537 | 550 | 0x6011 ALARM: battery is too hot | |
538 | The above events are propagated by the driver. | 551 | 0x6012 ALARM: battery is extremely hot |
552 | 0x6021 ALARM: a sensor is too hot | ||
553 | 0x6022 ALARM: a sensor is extremely hot | ||
554 | 0x6030 System thermal table changed | ||
555 | |||
556 | Battery nearly empty alarms are a last resort attempt to get the | ||
557 | operating system to hibernate or shutdown cleanly (0x2313), or shutdown | ||
558 | cleanly (0x2413) before power is lost. They must be acted upon, as the | ||
559 | wake up caused by the firmware will have negated most safety nets... | ||
560 | |||
561 | When any of the "too hot" alarms happen, according to Lenovo the user | ||
562 | should suspend or hibernate the laptop (and in the case of battery | ||
563 | alarms, unplug the AC adapter) to let it cool down. These alarms do | ||
564 | signal that something is wrong, they should never happen on normal | ||
565 | operating conditions. | ||
566 | |||
567 | The "extremely hot" alarms are emergencies. According to Lenovo, the | ||
568 | operating system is to force either an immediate suspend or hibernate | ||
569 | cycle, or a system shutdown. Obviously, something is very wrong if this | ||
570 | happens. | ||
539 | 571 | ||
540 | Compatibility notes: | 572 | Compatibility notes: |
541 | 573 | ||
@@ -650,6 +682,10 @@ LCD, CRT or DVI (if available). The following commands are available: | |||
650 | echo expand_toggle > /proc/acpi/ibm/video | 682 | echo expand_toggle > /proc/acpi/ibm/video |
651 | echo video_switch > /proc/acpi/ibm/video | 683 | echo video_switch > /proc/acpi/ibm/video |
652 | 684 | ||
685 | NOTE: Access to this feature is restricted to processes owning the | ||
686 | CAP_SYS_ADMIN capability for safety reasons, as it can interact badly | ||
687 | enough with some versions of X.org to crash it. | ||
688 | |||
653 | Each video output device can be enabled or disabled individually. | 689 | Each video output device can be enabled or disabled individually. |
654 | Reading /proc/acpi/ibm/video shows the status of each device. | 690 | Reading /proc/acpi/ibm/video shows the status of each device. |
655 | 691 | ||
@@ -924,70 +960,21 @@ Sysfs notes: | |||
924 | subsystem, and follow all of the hwmon guidelines at | 960 | subsystem, and follow all of the hwmon guidelines at |
925 | Documentation/hwmon. | 961 | Documentation/hwmon. |
926 | 962 | ||
963 | EXPERIMENTAL: Embedded controller register dump | ||
964 | ----------------------------------------------- | ||
927 | 965 | ||
928 | EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump | 966 | This feature is not included in the thinkpad driver anymore. |
929 | ------------------------------------------------------------------------ | 967 | Instead the EC can be accessed through /sys/kernel/debug/ec with |
930 | 968 | a userspace tool which can be found here: | |
931 | This feature is marked EXPERIMENTAL because the implementation | 969 | ftp://ftp.suse.com/pub/people/trenn/sources/ec |
932 | directly accesses hardware registers and may not work as expected. USE | ||
933 | WITH CAUTION! To use this feature, you need to supply the | ||
934 | experimental=1 parameter when loading the module. | ||
935 | |||
936 | This feature dumps the values of 256 embedded controller | ||
937 | registers. Values which have changed since the last time the registers | ||
938 | were dumped are marked with a star: | ||
939 | |||
940 | [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump | ||
941 | EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f | ||
942 | EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00 | ||
943 | EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00 | ||
944 | EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80 | ||
945 | EC 0x30: 01 07 1a 00 30 04 00 00 *85 00 00 10 00 50 00 00 | ||
946 | EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00 | ||
947 | EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 *bc *02 *bc | ||
948 | EC 0x60: *02 *bc *02 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
949 | EC 0x70: 00 00 00 00 00 12 30 40 *24 *26 *2c *27 *20 80 *1f 80 | ||
950 | EC 0x80: 00 00 00 06 *37 *0e 03 00 00 00 0e 07 00 00 00 00 | ||
951 | EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
952 | EC 0xa0: *ff 09 ff 09 ff ff *64 00 *00 *00 *a2 41 *ff *ff *e0 00 | ||
953 | EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
954 | EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
955 | EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
956 | EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03 | ||
957 | EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a | ||
958 | |||
959 | This feature can be used to determine the register holding the fan | ||
960 | speed on some models. To do that, do the following: | ||
961 | 970 | ||
971 | Use it to determine the register holding the fan | ||
972 | speed on some models. To do that, do the following: | ||
962 | - make sure the battery is fully charged | 973 | - make sure the battery is fully charged |
963 | - make sure the fan is running | 974 | - make sure the fan is running |
964 | - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so | 975 | - use above mentioned tool to read out the EC |
965 | 976 | ||
966 | The first step makes sure various charging-related values don't | 977 | Often fan and temperature values vary between |
967 | vary. The second ensures that the fan-related values do vary, since | ||
968 | the fan speed fluctuates a bit. The third will (hopefully) mark the | ||
969 | fan register with a star: | ||
970 | |||
971 | [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump | ||
972 | EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f | ||
973 | EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00 | ||
974 | EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00 | ||
975 | EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80 | ||
976 | EC 0x30: 01 07 1a 00 30 04 00 00 85 00 00 10 00 50 00 00 | ||
977 | EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00 | ||
978 | EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 bc 02 bc | ||
979 | EC 0x60: 02 bc 02 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
980 | EC 0x70: 00 00 00 00 00 12 30 40 24 27 2c 27 21 80 1f 80 | ||
981 | EC 0x80: 00 00 00 06 *be 0d 03 00 00 00 0e 07 00 00 00 00 | ||
982 | EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
983 | EC 0xa0: ff 09 ff 09 ff ff 64 00 00 00 a2 41 ff ff e0 00 | ||
984 | EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
985 | EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
986 | EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
987 | EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03 | ||
988 | EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a | ||
989 | |||
990 | Another set of values that varies often is the temperature | ||
991 | readings. Since temperatures don't change vary fast, you can take | 978 | readings. Since temperatures don't change vary fast, you can take |
992 | several quick dumps to eliminate them. | 979 | several quick dumps to eliminate them. |
993 | 980 | ||
@@ -1037,6 +1024,10 @@ ThinkPad-specific interface. The driver will disable its native | |||
1037 | backlight brightness control interface if it detects that the standard | 1024 | backlight brightness control interface if it detects that the standard |
1038 | ACPI interface is available in the ThinkPad. | 1025 | ACPI interface is available in the ThinkPad. |
1039 | 1026 | ||
1027 | If you want to use the thinkpad-acpi backlight brightness control | ||
1028 | instead of the generic ACPI video backlight brightness control for some | ||
1029 | reason, you should use the acpi_backlight=vendor kernel parameter. | ||
1030 | |||
1040 | The brightness_enable module parameter can be used to control whether | 1031 | The brightness_enable module parameter can be used to control whether |
1041 | the LCD brightness control feature will be enabled when available. | 1032 | the LCD brightness control feature will be enabled when available. |
1042 | brightness_enable=0 forces it to be disabled. brightness_enable=1 | 1033 | brightness_enable=0 forces it to be disabled. brightness_enable=1 |