Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196091 - sys-apps/hal-0.5.9.1-r2 incorrectly describes the state of my dvd/cdrw
Summary: sys-apps/hal-0.5.9.1-r2 incorrectly describes the state of my dvd/cdrw
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 20:05 UTC by Alexandre Hannud Abdo
Modified: 2009-01-29 00:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Hannud Abdo 2007-10-16 20:05:19 UTC
My dvd/cdrw used to work fine, including automounting.

For some time now, doing a direct "mount /dev/cdrom ./temp" still works, but hal does not even recognize the device as a volume once a disk is inserted.

I've never reported problems with hal before, so I'm not sure if I should file this bug upstream.

Reproducible: Always

Steps to Reproduce:
1. lshal --monitor
2. Insert CD or DVD or Blank CD
3. nothing shows up

Actual Results:  
hal does not talk to my dvd/cdrw drive

Expected Results:  
hal recognizing the actual state of my hardware so everything "just works" as it did before

The current output, with a non-blank, mountable by "mount /dev/hdc ./temp", disk inserted, of

$lshal -lu /org/freedesktop/Hal/devices/storage_model_HL_DT_ST_RWDVD_GCC_4320B

is:

--

udi = '/org/freedesktop/Hal/devices/storage_model_HL_DT_ST_RWDVD_GCC_4320B'
  block.device = '/dev/hdc'  (string)
  block.is_volume = false  (bool)
  block.major = 22  (0x16)  (int)
  block.minor = 0  (0x0)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_model_HL_DT_ST_RWDVD_GCC_4320B'  (string)
  info.capabilities = {'storage', 'block'} (string list)
  info.category = 'storage'  (string)
  info.parent = '/org/freedesktop/Hal/devices/pci_1106_571_ide_1_0'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_model_HL_DT_ST_RWDVD_GCC_4320B'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  linux.sysfs_path = '/sys/block/hdc'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.bus = 'ide'  (string)
  storage.drive_type = 'disk'  (string)
  storage.firmware_version = '1.00'  (string)
  storage.hotpluggable = false  (bool)
  storage.media_check_enabled = false  (bool)
  storage.model = 'HL-DT-ST_RWDVD_GCC-4320B'  (string)
  storage.no_partitions_hint = false  (bool)
  storage.originating_device = '/org/freedesktop/Hal/devices/pci_1106_571_ide_1_0'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/pci_1106_571_ide_1_0'  (string)
  storage.removable = true  (bool)
  storage.removable.media_available = false  (bool)
  storage.requires_eject = false  (bool)
  storage.size = 0  (0x0)  (uint64)
  storage.vendor = ''  (string)
Comment 1 Alexandre Hannud Abdo 2007-10-16 20:39:13 UTC
Well, of course I forgot to include all the relevant information...

running:
gentoo ~x86
kernel 2.6.22.1
sys-apps/hal-0.5.9.1-r2
app-misc/hal-info-20070618


and emerge --info tells me:

Portage 2.1.3.14 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.6.1-r0, 2.6.22.1 i686)
=================================================================
System uname: 2.6.22.1 i686 AMD Athlon(tm) Processor
Timestamp of tree: Mon, 15 Oct 2007 22:00:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.5.1-r2
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon -mmmx -m3dnow"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O3 -march=athlon -mmmx -m3dnow -ftemplate-depth-50"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/ http://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LINGUAS="en pt_BR it es"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 accessibility acl acpi alsa bash-completion beagle berkdb bitmap-fonts bzip2 cairo caps cdr cjk cli cracklib crypt cups curl dbus directfb dri dv dvd dvdr dvdread eds emboss encode esd evo exif expat fam fbcon firefox flac fortran ftp gd gdbm gif gimp gnome gnutls gpm gstreamer gtk gtkhtml guile hal iconv idn ipv6 isdnlog java jpeg kerberos lcms ldap libcaca libnotify mad midi mikmod mmap mmx mng mono mp3 mpeg msn mudflap ncurses nls nptl nptlonly nsplugin offensive ogg openal opengl openmp oss pam pcre pdf perl plotutils png pppd python quicktime readline real reflection samba sdl session socks5 spell spl ssl svg svga sysfs tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb vorbis win32codecs x264 x86 xml xorg xprint xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pt_BR it es" USERLAND="GNU" VIDEO_CARDS="mga vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-10-17 13:38:29 UTC
  storage.media_check_enabled = false  (bool)

You manually disabled media checking, so you're 100% right that it doesn't detect when disks are inserted because it's instructed not to.

Most likely you played around with the powertop tool and one of the suggestions it says is to disable media checking and if you say yes it'll disable it.

Look in /etc/hal/fdi for a file and I bet it has an instruction to disable media checks.
Comment 3 Alexandre Hannud Abdo 2007-10-17 17:48:45 UTC
Hello,

Thank you for pointing that out, but I never touched anything related to hal on this machine, everything is just as gentoo created.

--

# ls -Ra /etc/hal/
/etc/hal/:
.  ..  capability.d  fdi  hald.conf  property.d

/etc/hal/capability.d:
.  ..

/etc/hal/fdi:
.  ..  information  policy  preprobe

/etc/hal/fdi/information:
.  ..  .keep_sys-apps_hal-0

/etc/hal/fdi/policy:
.  ..  .keep_sys-apps_hal-0

/etc/hal/fdi/preprobe:
.  ..  .keep_sys-apps_hal-0

/etc/hal/property.d:
.  ..

--

But following your hint, I tried forcing storage.media_check_enabled with hal-set-property, but it didn't change the behavior, when I insert any media hal still produces no reaction.

Does hal have an internal database which might be missing my drive model, or something like that? Or could something have broken on my drive? (sice it used to work fine; I wonder why "mount" still works, though...)

Thank you.

Oh, I'd like to reopen this bug... : \
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2007-10-17 18:56:24 UTC
mount still works since it doesn't reference HAL or sysfs or udev at all.

Please attach the following info:

udevinfo -a -p /sys/block/hdc

udevinfo -q all -p /sys/block/hda
Comment 5 Alexandre Hannud Abdo 2007-10-18 02:05:10 UTC
Ok, here it is.

You originally asked for 'hda' on the second udevinfo, I supposed it was a typo for 'hdc'. If it wasn't jusk ask me again. Thank you very much.

--


# udevinfo -a -p /sys/block/hdc

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/block/hdc':
    KERNEL=="hdc"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{capability}=="19"
    ATTR{stat}=="      10       65      300     1902        0        0        0        0        0     1205     1902"
    ATTR{size}=="862132"
    ATTR{removable}=="1"
    ATTR{range}=="1"
    ATTR{dev}=="22:0"

  looking at parent device '/devices/pci0000:00/0000:00:04.1/ide1/1.0':
    KERNELS=="1.0"
    SUBSYSTEMS=="ide"
    DRIVERS=="ide-cdrom"
    ATTRS{modalias}=="ide:m-cdrom"
    ATTRS{drivename}=="hdc"
    ATTRS{media}=="cdrom"

  looking at parent device '/devices/pci0000:00/0000:00:04.1/ide1':
    KERNELS=="ide1"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""

  looking at parent device '/devices/pci0000:00/0000:00:04.1':
    KERNELS=="0000:00:04.1"
    SUBSYSTEMS=="pci"
    DRIVERS=="VIA_IDE"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{modalias}=="pci:v00001106d00000571sv00000000sd00000000bc01sc01i8a"
    ATTRS{local_cpus}=="1"
    ATTRS{irq}=="0"
    ATTRS{class}=="0x01018a"
    ATTRS{subsystem_device}=="0x0000"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{device}=="0x0571"
    ATTRS{vendor}=="0x1106"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""


--


# udevinfo -q all -p /sys/block/hdc
P: /block/hdc
N: hdc
S: disk/by-path/pci-0000:00:04.1-ide-1:0
S: cdrom
S: cdrw
S: dvd
S: cdrom1
S: cdrw1
S: dvd1
E: ID_CDROM=1
E: ID_CDROM_CD_R=1
E: ID_CDROM_CD_RW=1
E: ID_CDROM_DVD=1
E: ID_CDROM_MRW=1
E: ID_CDROM_MRW_W=1
E: ID_CDROM_RAM=1
E: DEVTYPE=disk
E: ID_TYPE=cd
E: ID_MODEL=HL-DT-ST_RWDVD_GCC-4320B
E: ID_SERIAL=
E: ID_REVISION=1.00
E: ID_BUS=ata
E: ID_PATH=pci-0000:00:04.1-ide-1:0
E: GENERATED=1


Comment 6 Tiger 2007-12-05 21:58:36 UTC
I have the same problem here on AMD64.

[ebuild   R   ] sys-fs/udev-117
[ebuild   R   ] sys-apps/hal-0.5.9.1-r3

###############################################################################

Portage 2.1.4_rc7 (default-linux/amd64/2006.1, gcc-4.2.2, glibc-2.7-r0, 2.6.22-gentoo-r4-Tiger x86_64)
=================================================================
System uname: 2.6.22-gentoo-r4-Tiger x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Timestamp of tree: Wed, 05 Dec 2007 01:46:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.5.1-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="fr_FR.utf8"
LC_ALL="fr_FR.utf8"
LINGUAS="fr fr_FR en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/tiger/portage"
SYNC="rsync://servx/gentoo-portage"
USE="X a52 aac alsa amd64 apic bash-completion berkdb bitmap-fonts bzip2 cairo cdr cflush cli cmov cmp_legacy cr8legacy cracklib crypt cups cx16 cx8 dbus de dri dvd dvdr dvdread encode fbcon ffmpeg fid firefox flash fortran fpu ftp fxsr fxsr_opt gdbm gif gpm gtk gtk2 hal ht iconv isdnlog jpeg kde kdeenablefinal kdehiddenvisibility lahf_lm lm logitech-mouse mca mce midi mozilla mp3 msr mtrr mudflap ncurses nls nptl nptlonly nx ogg opengl openmp pae pam pat pcre pdf perl pge php png pni ppds pppd pse pse36 python qt qt3 qt4 readline reflection sep session spl ssl stc svm syscall tcltk tcpd threads tm truetype-fonts ts tsc ttp type1-fonts unicode usb vid vim-with-x vme wifi xcomposite xorg xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr fr_FR en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

###############################################################################

lshal -lu /org/freedesktop/Hal/devices/storage_model__NEC_DVD_RW_ND_3520A
udi = '/org/freedesktop/Hal/devices/storage_model__NEC_DVD_RW_ND_3520A'
  block.device = '/dev/hda'  (string)
  block.is_volume = false  (bool)
  block.major = 3  (0x3)  (int)
  block.minor = 0  (0x0)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_model__NEC_DVD_RW_ND_3520A'  (string)
  info.capabilities = {'storage', 'block'} (string list)
  info.category = 'storage'  (string)
  info.parent = '/org/freedesktop/Hal/devices/pci_10de_36e_ide_0_0'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_model__NEC_DVD_RW_ND_3520A'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  linux.sysfs_path = '/sys/block/hda'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.bus = 'ide'  (string)
  storage.drive_type = 'disk'  (string)
  storage.firmware_version = '1.04'  (string)
  storage.hotpluggable = false  (bool)
  storage.media_check_enabled = false  (bool)
  storage.model = '_NEC_DVD_RW_ND-3520A'  (string)
  storage.no_partitions_hint = false  (bool)
  storage.originating_device = '/org/freedesktop/Hal/devices/pci_10de_36e_ide_0_0'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/pci_10de_36e_ide_0_0'  (string)
  storage.removable = true  (bool)
  storage.removable.media_available = false  (bool)
  storage.requires_eject = false  (bool)
  storage.size = 0  (0x0)  (uint64)
  storage.vendor = ''  (string)

lshal -lu /org/freedesktop/Hal/devices/storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120
udi = '/org/freedesktop/Hal/devices/storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120'
  block.device = '/dev/hdb'  (string)
  block.is_volume = false  (bool)
  block.major = 3  (0x3)  (int)
  block.minor = 64  (0x40)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120'  (string)
  info.capabilities = {'storage', 'block'} (string list)
  info.category = 'storage'  (string)
  info.parent = '/org/freedesktop/Hal/devices/pci_10de_36e_ide_0_1'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  linux.sysfs_path = '/sys/block/hdb'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.bus = 'ide'  (string)
  storage.drive_type = 'disk'  (string)
  storage.firmware_version = '1.22'  (string)
  storage.hotpluggable = false  (bool)
  storage.media_check_enabled = false  (bool)
  storage.model = 'Pioneer_DVD-ROM_ATAPIModel_DVD-120'  (string)
  storage.no_partitions_hint = false  (bool)
  storage.originating_device = '/org/freedesktop/Hal/devices/pci_10de_36e_ide_0_1'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/pci_10de_36e_ide_0_1'  (string)
  storage.removable = true  (bool)
  storage.removable.media_available = false  (bool)
  storage.requires_eject = false  (bool)
  storage.size = 0  (0x0)  (uint64)
  storage.vendor = ''  (string)

###############################################################################

udevinfo -a -p /sys/block/hda

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/block/hda':
    KERNEL=="hda"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{capability}=="19"
    ATTR{stat}=="       0        0        0        0        0        0        0        0        0        0        0"
    ATTR{size}=="8388604"
    ATTR{removable}=="1"
    ATTR{range}=="1"
    ATTR{dev}=="3:0"

  looking at parent device '/devices/pci0000:00/0000:00:04.0/ide0/0.0':
    KERNELS=="0.0"
    SUBSYSTEMS=="ide"
    DRIVERS=="ide-cdrom"
    ATTRS{modalias}=="ide:m-cdrom"
    ATTRS{drivename}=="hda"
    ATTRS{media}=="cdrom"

  looking at parent device '/devices/pci0000:00/0000:00:04.0/ide0':
    KERNELS=="ide0"
    SUBSYSTEMS==""
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:04.0':
    KERNELS=="0000:00:04.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="AMD_IDE"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{numa_node}=="0"
    ATTRS{modalias}=="pci:v000010DEd0000036Esv000010DEsd0000CB84bc01sc01i8a"
    ATTRS{local_cpus}=="3"
    ATTRS{irq}=="0"
    ATTRS{class}=="0x01018a"
    ATTRS{subsystem_device}=="0xcb84"
    ATTRS{subsystem_vendor}=="0x10de"
    ATTRS{device}=="0x036e"
    ATTRS{vendor}=="0x10de"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

Tiger is Afraid # udevinfo -a -p /sys/block/hdb

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/block/hdb':
    KERNEL=="hdb"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{capability}=="19"
    ATTR{stat}=="       0        0        0        0        0        0        0        0        0        0        0"
    ATTR{size}=="8388604"
    ATTR{removable}=="1"
    ATTR{range}=="1"
    ATTR{dev}=="3:64"

  looking at parent device '/devices/pci0000:00/0000:00:04.0/ide0/0.1':
    KERNELS=="0.1"
    SUBSYSTEMS=="ide"
    DRIVERS=="ide-cdrom"
    ATTRS{modalias}=="ide:m-cdrom"
    ATTRS{drivename}=="hdb"
    ATTRS{media}=="cdrom"

  looking at parent device '/devices/pci0000:00/0000:00:04.0/ide0':
    KERNELS=="ide0"
    SUBSYSTEMS==""
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:04.0':
    KERNELS=="0000:00:04.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="AMD_IDE"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{numa_node}=="0"
    ATTRS{modalias}=="pci:v000010DEd0000036Esv000010DEsd0000CB84bc01sc01i8a"
    ATTRS{local_cpus}=="3"
    ATTRS{irq}=="0"
    ATTRS{class}=="0x01018a"
    ATTRS{subsystem_device}=="0xcb84"
    ATTRS{subsystem_vendor}=="0x10de"
    ATTRS{device}=="0x036e"
    ATTRS{vendor}=="0x10de"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

###############################################################################
Comment 7 Tiger 2007-12-12 16:52:03 UTC
Well, I fixed the problem with the hardmasked sys-apps/hal-0.5.10 package.

1. Add this in your package.unmask :
sys-apps/hal
sys-auth/policykit
app-misc/hal-info

2. emerge hal

3. Allow users to mount CD/DVD devices in /etc/PolicyKit/PolicyKit.conf :

<config version="0.1">
        <match action="org.freedesktop.hal.storage.mount-removable">
                <return result="yes"/>
        </match>
</config>


All works fine now :)


Here, an example of lshal --monitor when I insert/remove a CD/DVD.

Start monitoring devicelist:
-------------------------------------------------
17:47:23.983: storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120 property storage.removable.media_available = true
17:47:23.991: storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120 property storage.cdrom.write_speeds = {}
17:47:24.301: volume_label_PCJ81_cd2 added
17:47:25.839: volume_label_PCJ81_cd2 property volume.mount_point = '/media/PCJ81-cd2'
17:47:25.842: volume_label_PCJ81_cd2 property volume.is_mounted_read_only = true
17:47:25.842: volume_label_PCJ81_cd2 property volume.is_mounted = true
17:47:53.876: storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120 condition EjectPressed =
17:47:54.003: volume_label_PCJ81_cd2 property volume.mount_point = ''
17:47:54.004: volume_label_PCJ81_cd2 property volume.is_mounted_read_only = false
17:47:54.005: volume_label_PCJ81_cd2 property volume.is_mounted = false
17:48:09.874: storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120 property storage.removable.media_available = false
17:48:09.898: storage_model_Pioneer_DVD_ROM_ATAPIModel_DVD_120 property storage.cdrom.write_speeds = {}
17:48:09.900: volume_label_PCJ81_cd2 removed
Comment 8 Pacho Ramos gentoo-dev 2009-01-28 20:54:20 UTC
(In reply to comment #7)
> Well, I fixed the problem with the hardmasked sys-apps/hal-0.5.10 package.

And what is the status of this with current 0.5.11*?
Comment 9 Alexandre Hannud Abdo 2009-01-29 00:15:58 UTC
It was working last time I checked, with hal 5.10, but since then my hard drive died and I got a new computer.

As Tiger also reported positive, I'm closing this as FIXED.

=)

Tx!