5 - Run all these tests with valgrind to detect memory leaks.
6 - It's best to test without a window manager running (such as GNOME or KDE) as
7 they tend to handle acpi events on their own and override acpid. To bring
8 down X on a system that is configured with a graphical login, there's usually
9 an "init" script you can run. As an example, with Debian/GNOME, log off of
10 your X/GNOME session, switch to another tty (e.g. Alt-Ctrl-F1), login, and do
12 sudo /etc/init.d/gdm stop
13 It's different if you are using upstart:
15 And systemd requires a different incantation:
16 [anyone care to enlighten me?]
17 LightDM in Ubuntu 11.10 (and others) doesn't seem to care about the power
18 button. So no need to stop it. Just log out.
19 Now X is out of the way and you can test from the console.
20 - You can kill acpid with "sudo killall acpid". Or if you are using upstart:
21 sudo initctl stop acpid
24 - To make testing more convenient, you can run acpid from a shell as
25 "acpid -ld" to get maximum logging. Use Ctrl-C to stop acpid.
30 Start acpid against /proc/acpi/event (if it exists).
31 Test each of the following events:
38 * input layer/netlink, all events
39 Start acpid against the input layer and netlink.
40 Test each of the following events:
41 1. Power Button (tests ACPI -> input layer)
42 2. Laptop Lid Switch (tests ACPI -> input layer)
43 3. Sleep Button (tests ACPI -> input layer)
44 4. Laptop AC Adapter (tests ACPI -> netlink)
45 5. Laptop Battery (tests ACPI -> netlink)
46 6. Special Keyboard Key(s)
48 * input layer/netlink fallback
49 Start acpid with a bogus events file specified via the options.
50 acpid -e /proc/acpi/bogus
51 Make sure a connection is made via the input layer and netlink.
54 Start acpid against the proc fs
55 Try some events and make sure they are coming through.
57 Try some events and make sure they do not come through.
59 Try some events and make sure they are coming through.
62 Start acpid against input layer and netlink.
63 Try some events and make sure they are coming through.
65 Try some events and make sure they do not come through.
67 Try some events and make sure they are coming through.
70 Start acpid (input layer and netlink) with a second USB keyboard attached.
71 Try some events and make sure they are coming through.
72 Disconnect the second USB keyboard.
73 Make sure acpid is still running.
74 Try some events and make sure they are coming through.
77 Start acpid against input layer and netlink.
78 Try some events and make sure they are coming through.
79 Connect a second USB keyboard.
80 Check logging to see if acpid has found the new keyboard.
81 Try some events from the second USB keyboard and make sure they are coming
88 Run acpid without the -l option and make sure no events are logged to syslog.
89 Run acpid with the -l option and make sure events are logged to syslog.
92 Run acpid with the -d option and note that it runs in the foreground and
93 provides debugging info to the console.
94 acpid also supports up to 4 debug levels in the event handler. Might want
95 to try "-dddd" and see what happens.
98 Run acpid with the -f option and note that it runs in the foreground.
99 Run acpid without the -f option and note that it runs in the background.