1HAL-DISABLE-POLLING(1)      General Commands Manual     HAL-DISABLE-POLLING(1)
2
3
4

NAME

6       hal-disable-polling - disable polling on drives with removable media
7

SYNOPSIS

9       hal-disable-polling [options]
10
11

DESCRIPTION

13       hal-disable-polling  can  be used to to disable and enable media detec‐
14       tion on drives with removable storage. For more information about  both
15       the  big  picture  and  specific  HAL properties, refer to the HAL spec
16       which  can  be  found  in   /usr/share/doc/hal-0.5.9/spec/hal-spec.html
17       depending on the distribution.
18
19

OPTIONS

21       The following options are supported:
22
23       --udi  The UDI (Unique Device Identifier) of the device object.
24
25       --device
26              The device file of the drive.
27
28       --enable-polling
29              Enable polling instead of disabling it.
30
31       --help Print out usage.
32
33       --version
34              Print the version.
35
36

NOTES

38       This program requires super user privileges.
39
40

RETURN VALUE

42       If  the requested operation was successful, this program will exit with
43       exit code 0.
44
45

HISTORY

47       Polling a storage drive is a necessary evil to  detect  when  the  user
48       inserts or removes media. Human computer interaction studies have shown
49       that a broad class of users expect their system to react within  a  few
50       seconds  of  this.  Thus, the hald daemon polls through the hald-addon-
51       storage addon (one instance for each drive with removable media).
52
53       The purpose of the hald-addon-storage addon is simply to open the  spe‐
54       cial device file at a regular interval (either every 2 or every 16 sec‐
55       onds) to check for new media. This program tries  to  open  the  device
56       file using the O_EXCL option which means that programs like cdrecord(1)
57       that uses O_EXCL  automatically  prevents  the  hald-addon-storage  for
58       interferring  by  continously  opening the device file. In addition, if
59       the drive is locked using HAL (see hal-lock(1)) the  addon  also  stops
60       polling.
61
62       Unfortunately, polling a storage drive can have adverse side effects if
63       the hardware and/or device driver for the hardware  is  malfunctioning.
64       Additionally,  the  operating  system  kernel itself may offer multiple
65       interfaces for the same device (e.g. /dev/sg0 and  /dev/scd0)  so  even
66       O_EXCL  won't  work.  Also,  polling a drive may decrease throughput in
67       certain (odd and/or broken) configurations; for  example,  if  two  IDE
68       drives  shares the same host (master/slave), bus traffic and contention
69       caused by polling e.g. the optical drive (slave) can reduce  throughput
70       to  the  hard disk (master) and/or interfere with CD burning on another
71       optical drive (master). Finally, polling a  drive  incurs  an  overhead
72       both  in  the host system (processes get woken up often, preventing the
73       CPU to stay in a deep power saving  states)  and  it  may  prevent  the
74       actual drive from reaching deep power states as well. As a result, more
75       power is consumed and this affects battery life for laptops.
76
77       Despite the existence of support for asynchronous media change  notifi‐
78       cation  in  recent MMC (Multi-Media Commands) specifications, virtually
79       no optical drives are compliant  with  the  specification.  Fortunately
80       newer  SATA  ATAPI  hardware seems to support Asynchronous Notification
81       (AN) and at this time of writing (March 2007) work is underway to  make
82       both the Linux operating system kernel and HAL take advantage of this.
83
84       It  is  the  position of the HAL team that polling should be avoided at
85       all costs as long as it doesn't heavily impact the user experience in a
86       negative  way.  This tool is provided as a stop-gap measure to use if a
87       system is rendered useless due to bugs in drivers and/or hardware  that
88       is  provoked  by HAL polling the drive. If such a bug is encountered it
89       should be reported (see the BUGS section below) so it can  be  fixed  -
90       historically  hald  have  triggered  a  number of bugs in Linux storage
91       drivers and related subsystems (such  as  USB)  that  have  later  been
92       fixed.
93
94

BUGS

96       Please  send  bug reports to either the distribution or the HAL mailing
97       list, see http://lists.freedesktop.org/mailman/listinfo/hal on  how  to
98       subscribe.
99
100

SEE ALSO

102       hald(8), lshal(1), hal-lock(1), open(2), http://www.t10.org/scsi-3.htm,
103       https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=halpolling
104
105

AUTHOR

107       Written by David Zeuthen <david@fubar.dk> with a lot of help from  many
108       others.
109
110
111
112
113                                                        HAL-DISABLE-POLLING(1)
Impressum