Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230886 - sys-apps/hal-0.5.11-r1 does not allow disc drive to eject
Summary: sys-apps/hal-0.5.11-r1 does not allow disc drive to eject
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Saleem Abdulrasool (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-05 19:50 UTC by gfl3162+gbugzilla
Modified: 2008-09-04 03:51 UTC (History)
7 users (show)

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


Attachments
patch to fix eject problem (cdeject.patch,556 bytes, patch)
2008-08-03 21:28 UTC, gfl3162+gbugzilla
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gfl3162+gbugzilla 2008-07-05 19:50:51 UTC
I am using Gentoo unstable and running hal-0.5.11-r1. The problem I am having is that whenever I press the eject button on my disc drive, it comes out, but then it goes back in right after it comes out. The eject command gives the same result. HAL since to be polling the disc drive in a way that makes the tray close, so when I terminate the process 'hald-addon-storage: polling /dev/sr0 (every 2 sec)', the eject button works again, but gnome-volume-manager does not automount the drive. This seems to happen only if the drive was mounted at the time the button is pressed, but hal seems to unmount the drive correctly before it ejects.

Reproducible: Always

Steps to Reproduce:
1. Install GNOME with hal.
2. Press the eject button with a mounted disc in the drive.
Actual Results:  
The tray comes out, but it goes back in right after it comes out all the way.

Expected Results:  
It should come out and stay open.

Portage 2.2_rc1 (default/linux/x86/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r6-fast i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r6-fast-i686-Intel-R-_Pentium-R-_D_CPU_2.66GHz-with-glibc2.0
Timestamp of tree: Fri, 04 Jul 2008 19:33:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=nocona -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=nocona -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.llarian.net/"
LANG="en_US.UTF-8"
LDFLAGS=""
LINGUAS="en en_US zh zh_CN zh_HK"
MAKEOPTS="-j4"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=10 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/desktop-effects /usr/local/portage/layman/gentopia /var/portage/local/own /var/portage/local/ubuntu"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam fbcon ffmpeg firefox flac gdbm gif gnome gnome-keyring gnutls gphoto2 gpm gstreamer gtk guile hal iconv ipv6 isdnlog jpeg kerberos ldap libnotify lzo mad midi mikmod mmx mono mp2 mp3 mpeg ncurses nls nntp nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification subversion svg tcpd theora threads tiff truetype unicode usb vorbis win32codecs x264 x86 xcb xml xorg xulrunner xv xvid 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" 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="en en_US zh zh_CN zh_HK" USERLAND="GNU" VIDEO_CARDS="i810 intel fbdev vesa vga"
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2008-07-05 19:56:31 UTC
FWIW, I can confirm this.
Comment 2 David Voge 2008-07-05 21:34:40 UTC
i use xfce and if i put in a cd and use my eject button then it say's

Der Datenträger »/org/freedesktop/Hal/devices/storage_model_TSSTcorpCD/DVDW_SH_W162C« konnte nicht ausgeworfen werden.

Das Gerät »/org/freedesktop/Hal/devices/storage_model_TSSTcorpCD/DVDW_SH_W162C« ist kein gültiger Datenträger.

as widget.
Comment 3 gfl3162+gbugzilla 2008-07-06 16:35:20 UTC
This also seems to affect audio CDs, mounted or not.

There should be a patch for hal so that it does not poll the disc drive in a way that causes the tray to close.
Comment 4 Marcin Kurek 2008-08-01 17:38:21 UTC
This seems to be not hal, but udev fault. Look at https://bugzilla.redhat.com/show_bug.cgi?id=453095#c26 for more informations and patch.
Comment 5 gfl3162+gbugzilla 2008-08-03 18:12:36 UTC
(In reply to comment #4)
> This seems to be not hal, but udev fault. Look at
> https://bugzilla.redhat.com/show_bug.cgi?id=453095#c26 for more informations
> and patch.
> 

I don't think that it is a problem with udev, because even after I applied the patch to /etc/udev/rules.d/64-device-mapper.rules (the rule that runs vol_id), the problem still persists. Also, deleting the rule files doesn't help either. I restarted my computer after each change.

Also, using the strace tool, I found out that the tray closes when /usr/libexec/hald-addon-storage does the open() system call on /dev/sr0 every two seconds.
Comment 6 Marcin Kurek 2008-08-03 18:28:16 UTC
I assume you do not even read the post right ? At the second line you can see:

"patch for /etc/udev/rules.d/60-persistent-storage.rules (workaround)"

Then why patch 64-device-mapper file ? And to save you time to write reply about missing 60-persistent-storage.rules file in /etc/udev/rules.d directory look at /lib/udev/rules.d dir.


Comment 7 gfl3162+gbugzilla 2008-08-03 21:27:05 UTC
(In reply to comment #6)
> I assume you do not even read the post right ? At the second line you can see:
> 
> "patch for /etc/udev/rules.d/60-persistent-storage.rules (workaround)"
> 
> Then why patch 64-device-mapper file ? And to save you time to write reply
> about missing 60-persistent-storage.rules file in /etc/udev/rules.d directory
> look at /lib/udev/rules.d dir.
> 

I believe that udev is at fault for the problem (at first, I never knew about the /lib/udev/rules.d directory). I think that the name of this bug should be changed, and a patch to fix this should be commited to portage.
Comment 8 gfl3162+gbugzilla 2008-08-03 21:28:28 UTC
Created attachment 162160 [details, diff]
patch to fix eject problem
Comment 9 gfl3162+gbugzilla 2008-09-04 00:10:22 UTC
I believe that udev-125-r2 fixes this issue, this bug's status should be changed.
Comment 10 Saleem Abdulrasool (RETIRED) gentoo-dev 2008-09-04 03:51:09 UTC
Marking as fixed in light of comment #9.