desktop: CalEditDlg: fixed dialog title bar
[barry.git] / udev / README
blob33c3932f9a31ac86307cb220ac4678a72e9f7f4e
1 10-blackberry.rules
3         These udev rules run bcharge on matching Blackberry devices
4         in order to enable 500mA battery charging mode.
6 99-blackberry-perms.rules
8         These udev rules set the resulting device mode to the
9         group 'plugdev' and mode '0660' so that Barry can access
10         the device without being root.
12 69-blackberry.rules
14         This is for Fedora 12 and friends who have updated to a different
15         udev rules directory layout.
18 Commentary:
19 -----------
21 Yes, I tried to keep this in one file, but the prevailing winds of Linux
22 keep this very hard to do.
24 When you run 'udevadm monitor --env' (udevmonitor on some systems)
25 you will see UEVENT entries and UDEV entries.  The UEVENT entries
26 represent kernel level events, generated when you plugin your device
27 or remove it.  These kernel events are what udev daemons watch for.
29 Udev then works on these events and generates "events" of its own.
30 The results of these events are displayed in the monitor output
31 as UDEV entries.
33 It seems that the rules in the above rules files only match against
34 the UEVENT kernel events.
36 Therefore, the common idiom of:
38         SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device"
40 is used to select a newly plugged in device.  Unfortunately, it doesn't
41 seem that the /dev/bus/* device node exists yet at this point, since
42 that appears to happen in /etc/udev/rules.d/50-udev.rules, and on some
43 systems, *that* rule depends on SUBSYSTEM=="usb_device" to work.  This is
44 not guaranteed to exist on all systems.
46 Plus, if the kernel event SUBSYSTEM=="usb_device" does exist, it comes
47 after the one above.
49 So we have the following behaviour:
51         SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device" (always happens first)
52         SUBSYSTEM=="usb_device" (sometimes happens, and if so, happens last)
53         /dev/bus/* created (happens based on udev rules, which differ on
54                                 each system)
56 So... for fans of cross-platform behaviour, and fans of the KISS method,
57 this behaviour rules out SUBSYSTEM=="usb_device" as a valid keyword.  And
58 since the /dev/bus/* (or /proc or whatevever) device node does not yet exist
59 at the very beginning of this udev process, that means we have to do the
60 power adjustment and the permissions in two udev steps.
62 And now you know the rest of the story.
64 - Chris
66 Sept 2009