hal-disable-polling can't be reversed

Bug #358390 reported by Mario
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Karmic by mclaud2000

Bug Description

Binary package hint: hal

If I disable the polling of my cdrom using hal-disable-polling, after I'm not able to restore the polling feature. I can do that only if I reboot my laptop or (maybe) restard the 'hal' service.
I'll try to explain the case as follows:
- this is the state of the hal-related process before any action:
$ ps aux | grep hal
111 5999 0.0 0.1 36528 5208 ? Ss 12:53 0:00 /usr/sbin/hald
root 6065 0.0 0.0 15816 1264 ? S 12:53 0:00 hald-runner
root 6098 0.1 0.0 28480 2156 ? S 12:53 0:02 /usr/lib/hal/hald-addon-rfkill-killswitch
root 6100 0.0 0.0 28484 2080 ? S 12:53 0:00 hald-addon-input: Listening on /dev/input/event8 /dev/input/event11 /dev/input/event0 /dev/input/event9 /dev/input/event10 /dev/input/event1 /dev/input/event5 /dev/input/event3 /dev/input/event7
root 6124 0.0 0.0 28476 2076 ? S 12:53 0:00 /usr/lib/hal/hald-addon-generic-backlight
root 6154 0.0 0.0 28492 2044 ? S 12:53 0:00 /usr/lib/hal/hald-addon-cpufreq
111 6155 0.0 0.0 32392 2036 ? S 12:53 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
root 6156 0.0 0.0 28484 2068 ? S 12:53 0:00 hald-addon-storage: polling /dev/sr0 (every 2 sec)
mario 6882 0.0 0.1 56328 4248 ? S 12:54 0:00 /usr/lib/gvfs/gvfs-hal-volume-monitor
mario 8430 0.0 0.0 7544 920 pts/0 S+ 13:25 0:00 grep hal

- then I try to disable the polling:
$ sudo hal-disable-polling --device /dev/cdrom 'hal'
[sudo] password for mario:
Following symlink from /dev/cdrom to /dev/sr0.
Polling for drive /dev/cdrom have been disabled. The fdi file written was
  /etc/hal/fdi/information/media-check-disable-storage_model_DVD_RAM_UJ862AS.fdi

$ ps aux | grep hal
111 5999 0.0 0.1 36528 5208 ? Ss 12:53 0:00 /usr/sbin/hald
root 6065 0.0 0.0 15816 1268 ? S 12:53 0:00 hald-runner
root 6098 0.1 0.0 28480 2168 ? S 12:53 0:03 /usr/lib/hal/hald-addon-rfkill-killswitch
root 6100 0.0 0.0 28484 2080 ? S 12:53 0:00 hald-addon-input: Listening on /dev/input/event8 /dev/input/event11 /dev/input/event0 /dev/input/event9 /dev/input/event10 /dev/input/event1 /dev/input/event5 /dev/input/event3 /dev/input/event7
root 6124 0.0 0.0 28476 2076 ? S 12:53 0:00 /usr/lib/hal/hald-addon-generic-backlight
root 6154 0.0 0.0 28492 2044 ? S 12:53 0:00 /usr/lib/hal/hald-addon-cpufreq
111 6155 0.0 0.0 32392 2036 ? S 12:53 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
mario 6882 0.0 0.1 56328 4248 ? S 12:54 0:00 /usr/lib/gvfs/gvfs-hal-volume-monitor
mario 8847 0.0 0.0 7544 916 pts/0 R+ 13:34 0:00 grep hal

- it is effectively disabled (good!);
- let's try to revert the operation:
$ sudo hal-disable-polling --device /dev/cdrom 'hal' --enable-polling
Following symlink from /dev/cdrom to /dev/sr0.
Cannot find storage device /dev/cdrom.

$ sudo hal-disable-polling --device /dev/sr0 'hal' --enable-polling
Following symlink from /dev/sr0 to /dev/sr0.
Cannot find storage device /dev/sr0.

$ cat /etc/fstab | grep cdrom
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

- it doesn't work! The only way it to reboot the computer or to restart the hal service:
$ sudo /etc/init.d/hal restart
 * Restarting Hardware abstraction layer hald

$ ps aux | grep hal
mario 6882 0.0 0.1 56328 4248 ? S 12:54 0:00 /usr/lib/gvfs/gvfs-hal-volume-monitor
111 8910 1.2 0.1 36664 5056 ? Ss 13:38 0:00 /usr/sbin/hald
root 8911 0.0 0.0 15944 1280 ? S 13:38 0:00 hald-runner
root 8946 0.0 0.0 28480 2108 ? S 13:38 0:00 /usr/lib/hal/hald-addon-rfkill-killswitch
root 8948 0.0 0.0 28484 2084 ? S 13:38 0:00 hald-addon-input: Listening on /dev/input/event8 /dev/input/event11 /dev/input/event0 /dev/input/event10 /dev/input/event1 /dev/input/event5 /dev/input/event9 /dev/input/event3 /dev/input/event7
root 8983 0.0 0.0 28476 2028 ? S 13:38 0:00 /usr/lib/hal/hald-addon-generic-backlight
root 9039 0.0 0.0 28492 2044 ? S 13:38 0:00 /usr/lib/hal/hald-addon-cpufreq
111 9041 0.0 0.0 32392 2040 ? S 13:38 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
root 9043 0.0 0.0 28484 2060 ? S 13:38 0:00 hald-addon-storage: no polling on /dev/sr0 because it is explicitly disabled
mario 9050 0.0 0.0 7544 920 pts/0 S+ 13:38 0:00 grep hal

$ sudo hal-disable-polling --device /dev/cdrom 'hal' --enable-polling
Following symlink from /dev/cdrom to /dev/sr0.
Polling for drive /dev/cdrom have been enabled. The fdi file deleted was
  /etc/hal/fdi/information/media-check-disable-storage_model_DVD_RAM_UJ862AS.fdi

- it says that the polling is restored but it doesn't work; let's restart (another time!) the service:
$ ps aux | grep hal
mario 6882 0.0 0.1 56328 4248 ? S 12:54 0:00 /usr/lib/gvfs/gvfs-hal-volume-monitor
111 8910 0.2 0.1 36664 5056 ? Ss 13:38 0:00 /usr/sbin/hald
root 8911 0.0 0.0 15944 1292 ? S 13:38 0:00 hald-runner
root 8946 0.1 0.0 28480 2108 ? S 13:38 0:00 /usr/lib/hal/hald-addon-rfkill-killswitch
root 8948 0.0 0.0 28484 2084 ? S 13:38 0:00 hald-addon-input: Listening on /dev/input/event8 /dev/input/event11 /dev/input/event0 /dev/input/event10 /dev/input/event1 /dev/input/event5 /dev/input/event9 /dev/input/event3 /dev/input/event7
root 8983 0.0 0.0 28476 2028 ? S 13:38 0:00 /usr/lib/hal/hald-addon-generic-backlight
root 9039 0.0 0.0 28492 2044 ? S 13:38 0:00 /usr/lib/hal/hald-addon-cpufreq
111 9041 0.0 0.0 32392 2040 ? S 13:38 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
mario 9197 0.0 0.0 7540 900 pts/0 R+ 13:40 0:00 grep hal

$ sudo /etc/init.d/hal restart
 * Restarting Hardware abstraction layer hald

$ ps aux | grep hal
mario 6882 0.0 0.1 56328 4248 ? S 12:54 0:00 /usr/lib/gvfs/gvfs-hal-volume-monitor
111 9253 6.0 0.1 36664 5068 ? Ss 13:41 0:00 /usr/sbin/hald
root 9254 0.6 0.0 15952 1272 ? S 13:41 0:00 hald-runner
root 9289 0.0 0.0 28480 2108 ? S 13:41 0:00 /usr/lib/hal/hald-addon-rfkill-killswitch
root 9291 0.0 0.0 28484 2076 ? S 13:41 0:00 hald-addon-input: Listening on /dev/input/event8 /dev/input/event11 /dev/input/event0 /dev/input/event3 /dev/input/event1 /dev/input/event5 /dev/input/event9 /dev/input/event10 /dev/input/event7
root 9332 0.0 0.0 28476 2020 ? S 13:41 0:00 /usr/lib/hal/hald-addon-generic-backlight
root 9382 0.0 0.0 28492 2040 ? S 13:41 0:00 /usr/lib/hal/hald-addon-cpufreq
111 9385 0.0 0.0 32392 2036 ? S 13:41 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
root 9387 0.0 0.0 28484 2060 ? D 13:41 0:00 hald-addon-storage: polling /dev/sr0 (every 2 sec)
mario 9394 0.0 0.0 7540 908 pts/0 R+ 13:41 0:00 grep hal

- the polling continues to be not working: it may depend from the broken connection between the hal service and the desktop components caused by the service restart.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: hal 0.5.12~rc1+git20090403-0ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
SourcePackage: hal
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
Mario (diraimondo) wrote :
description: updated
Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :

I'm having the same problem. Confirming.

Changed in hal (Ubuntu):
status: New → Confirmed
Revision history for this message
Harald (haraldboehmecke) wrote :

I am having a similar problem. I am able to disable it, but when I try to re-enable it, it won't find /dev/cdrom:

oot@bdi12718:/etc/hal/fdi/information# hal-disable-polling --device /dev/cdromFollowing symlink from /dev/cdrom to /dev/sr0.
Polling for drive /dev/cdrom have been disabled. The fdi file written was
  /etc/hal/fdi/information/media-check-disable-storage_model_DVD_RAM_UJ_852.fdi
root@bdi12718:/etc/hal/fdi/information# hal-disable-polling --device /dev/cdrom --enable-polling
Following symlink from /dev/cdrom to /dev/sr0.
Cannot find storage device /dev/cdrom.
root@bdi12718:/etc/hal/fdi/information#

I am on JJ 9.04.

Worth opening a new bug report?

Revision history for this message
Harald (haraldboehmecke) wrote :

Sorry, it actually is the same issue. After restarting hal I am still unable to poll the cdrom drive. I did notice that ejecting the whole drive from the multi-bay and re-inserting it, restores the original behaviour, whithout the need to restart hal.

Revision history for this message
Mario (diraimondo) wrote : Re: [Bug 358390] Re: hal-disable-polling can't be reversed

Harald ha scritto:
> Sorry, it actually is the same issue.

Nobody is taking care of this report... :(

> After restarting hal I am still
> unable to poll the cdrom drive. I did notice that ejecting the whole
> drive from the multi-bay and re-inserting it, restores the original
> behaviour, whithout the need to restart hal.

I haven't tested this method but it looks "too manual" for my tastes. :)

Mario

Revision history for this message
Greg Oliver (oliver-greg) wrote :

You can just remove the fdi file and restart hal as a workaround...

-Greg

Revision history for this message
Mario (diraimondo) wrote :

<email address hidden> wrote:
> You can just remove the fdi file and restart hal as a workaround...

As long as I remember the restart of the hal service has some
side-effects: the connection with gnome-power-manager is lost and, for
example, it doesn't react to the changes of the power system
(battery/AC). This is a bad workaround.

Mario

Revision history for this message
Mario (diraimondo) wrote :

It has been fixed in Ubuntu Maverick 10.10

Revision history for this message
dino99 (9d9) wrote :
Changed in hal (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.