Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#462953: hal: Continues to poll DVD devices after setting media_check_enabled to false

41 views
Skip to first unread message

Frans Pop

unread,
Jan 28, 2008, 9:20:11 AM1/28/08
to
Package: hal
Version: 0.5.10-5
Severity: normal

As I don't really want things to pop up automatically when I insert new
media, I have long wanted to disable the polling by hal of my two DVD
drives. Today I thought I'd found the correct way to do this, but
polling continues to be active.

I added the following file:
fjp@faramir:/etc/hal/fdi/policy$ cat local.fdi
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="storage.removable" bool="true">
<merge key="storage.media_check_enabled" type="bool">false</merge>
</match>
</device>
</deviceinfo>


After restarting hal, this seems to have worked:
$ hal-device | grep -E "(^[^ ]|media_check_enabled)" | grep media_check_enabled -B1
2: udi = '/org/freedesktop/Hal/devices/storage_model_DVD_RW_AD_7170S'
storage.media_check_enabled = false (bool)
7: udi = '/org/freedesktop/Hal/devices/storage_serial_S_VDN71BTCDAT4EG'
storage.media_check_enabled = false (bool)
14: udi = '/org/freedesktop/Hal/devices/storage_serial_S_VDKE1BTCDZ1KHR'
storage.media_check_enabled = false (bool)
15: udi = '/org/freedesktop/Hal/devices/storage_model_LITE_ON_DVD_SOHD_16P9SV'
storage.media_check_enabled = false (bool)
16: udi = '/org/freedesktop/Hal/devices/platform_floppy_0_storage'
storage.media_check_enabled = false (bool)


However, ps still shows the DVD drives being polled:
$ ps ax|grep hald-addon-storage|grep polling
6721 ? S 0:00 hald-addon-storage: polling /dev/hda (every 2 sec)
6735 ? S 0:00 hald-addon-storage: polling /dev/scd0 (every 2 sec)

/dev/hda corresponds to device 15 and /dev/scd0 to device 2.

I'm filing this as a BR as this seems like a bug in hal. However, if I've
done something wrong then please let me know.

Cheers,
FJP

-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hal depends on:
ii adduser 3.105 add and remove users and groups
ii dbus 1.1.2-1 simple interprocess messaging syst
ii hal-info 20071212-2 Hardware Abstraction Layer - fdi f
ii libc6 2.7-6 GNU C Library: Shared libraries
ii libdbus-1-3 1.1.2-1 simple interprocess messaging syst
ii libdbus-glib-1-2 0.74-1 simple interprocess messaging syst
ii libexpat1 1.95.8-4 XML parsing C library - runtime li
ii libgcc1 1:4.3-20080127-1 GCC support library
ii libglib2.0-0 2.14.5-2 The GLib library of C routines
ii libhal-storage1 0.5.10-5 Hardware Abstraction Layer - share
ii libhal1 0.5.10-5 Hardware Abstraction Layer - share
ii libsmbios1 0.13.10-1 Provide access to (SM)BIOS informa
ii libstdc++6 4.3-20080127-1 The GNU Standard C++ Library v3
ii libusb-0.1-4 2:0.1.12-9 userspace USB programming library
ii libvolume-id0 0.114-2 libvolume_id shared library
ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip
ii mount 2.13.1-1 Tools for mounting and manipulatin
ii pciutils 1:2.2.9-2 Linux PCI Utilities
ii pm-utils 0.99.2-3 utilities and scripts for power ma
ii udev 0.114-2 /dev/ and hotplug management daemo
ii usbutils 0.73-5 Linux USB utilities

Versions of packages hal recommends:
ii eject 2.1.5-6 ejects CDs and operates CD-Changer
pn libsmbios-bin <none> (no description available)

-- no debconf information

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Frans Pop

unread,
Jan 28, 2008, 9:40:21 AM1/28/08
to
On Monday 28 January 2008, you wrote:
> However, ps still shows the DVD drives being polled:
> $ ps ax|grep hald-addon-storage|grep polling
> 6721 ? S 0:00 hald-addon-storage: polling /dev/hda (every 2 sec)
> 6735 ? S 0:00 hald-addon-storage: polling /dev/scd0 (every 2 sec)

And if I then try to disable polling using hal-disable-polling, I get:
$ sudo hal-disable-polling --device /dev/hda
Polling is already disabled on the given drive.
$ sudo hal-disable-polling --device /dev/scd0
Polling is already disabled on the given drive.

Which seems to be another confirmation that polling should already
have been disabled.

Michael Biebl

unread,
Mar 4, 2008, 10:30:13 PM3/4/08
to
Frans Pop wrote:
> On Monday 28 January 2008, you wrote:
>> However, ps still shows the DVD drives being polled:
>> $ ps ax|grep hald-addon-storage|grep polling
>> 6721 ? S 0:00 hald-addon-storage: polling /dev/hda (every 2 sec)
>> 6735 ? S 0:00 hald-addon-storage: polling /dev/scd0 (every 2 sec)
>
> And if I then try to disable polling using hal-disable-polling, I get:
> $ sudo hal-disable-polling --device /dev/hda
> Polling is already disabled on the given drive.
> $ sudo hal-disable-polling --device /dev/scd0
> Polling is already disabled on the given drive.
>
> Which seems to be another confirmation that polling should already
> have been disabled.
>

Hi Frans,

please try the following:
Remove your hand written fdi files from /etc/hal
Restart hal
Check if hald-addon-storage is running (should be)
Run hal-disable-polling --device /dev/scd0
The hald-addon-storage process should then be stopped automatically, and
you should have a correct fdi file in /etch/hal/fdi/information.

(this works for me)


Cheers,
Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

signature.asc

Frans Pop

unread,
Mar 4, 2008, 10:40:11 PM3/4/08
to
Hi Michael,

On Wednesday 05 March 2008, Michael Biebl wrote:
> Run hal-disable-polling --device /dev/scd0
> The hald-addon-storage process should then be stopped automatically, and
> you should have a correct fdi file in /etch/hal/fdi/information.

Yes, I know that that works (I discovered that fairly shortly after sending
the BR). But it still seems to me to be a bug that the method I used does
not work.

The problem seems to be that when the polling is disabled
in /etc/hal/information/.. it does work, but when it is disabled
in /etc/hal/policy/.. it does not.

And when I checked the hal documentation I found absolutely no indication of
why that should be so.

And even if using policy is wrong, hal should not behave so inconsistent as
shown in my example: stubbornly insisting that polling is disabled when it
isn't.

Cheers,
FJP

signature.asc

Michael Biebl

unread,
Mar 4, 2008, 11:40:11 PM3/4/08
to

Sjoerd, when are the information and policy merged? Could it be, that
thas happens after hald-addon-storage was forked?
This would explain, that lshal lists
storage.media_check_enabled=FALSE, but hald_addon_storage is running for
the device.

signature.asc

Michael Biebl

unread,
Mar 5, 2008, 12:20:06 AM3/5/08
to
tags 462953 pending
thanks

Michael Biebl wrote:
> Frans Pop wrote:
>> Hi Michael,
>>
>> On Wednesday 05 March 2008, Michael Biebl wrote:
>>> Run hal-disable-polling --device /dev/scd0
>>> The hald-addon-storage process should then be stopped automatically, and
>>> you should have a correct fdi file in /etch/hal/fdi/information.
>> Yes, I know that that works (I discovered that fairly shortly after sending
>> the BR). But it still seems to me to be a bug that the method I used does
>> not work.
>>
>> The problem seems to be that when the polling is disabled
>> in /etc/hal/information/.. it does work, but when it is disabled
>> in /etc/hal/policy/.. it does not.
>>
>> And when I checked the hal documentation I found absolutely no indication of
>> why that should be so.
>>
>> And even if using policy is wrong, hal should not behave so inconsistent as
>> shown in my example: stubbornly insisting that polling is disabled when it
>> isn't.
>>
>
> Sjoerd, when are the information and policy merged? Could it be, that
> thas happens after hald-addon-storage was forked?
> This would explain, that lshal lists
> storage.media_check_enabled=FALSE, but hald_addon_storage is running for
> the device.
>

I just noticed, that this was fixed a few days ago in the upstream git
repository. A todays snapshot now correctly disables polling, if the fdi
file is in /etc/hal/fdi/policy (i.e. storage.media_check_enabled=FALSE)

0.5.11 is about to be released soon, so I mark this bug as pending.

signature.asc
0 new messages