Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236635 - sys-fs/udev-{126,127} breaks sys-apps/hal-0.5.11-r2 disk detection
Summary: sys-fs/udev-{126,127} breaks sys-apps/hal-0.5.11-r2 disk detection
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Steev Klimaszewski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-04 00:07 UTC by gfl3162+gbugzilla
Modified: 2008-10-15 12:31 UTC (History)
16 users (show)

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


Attachments
Patch to remove slash at beginning of path (udev-remove-slash-127.patch,1001 bytes, patch)
2008-09-06 01:01 UTC, gfl3162+gbugzilla
Details | Diff
Alternate patch for udev ebuild that also works (udev-alt-patch-127.patch,303 bytes, patch)
2008-09-06 04:39 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-09-04 00:07:38 UTC
This is the problem:

I plug my usb drive into my computer (running udev-127) and go into nautilus, but it doesn't appear. It also does not show up on gnome-device-manager. So I install sys-fs/udev-125-r2 and reboot my computer, and when I do the same thing again, it works perfectly. I have patched hal to use 'udevadm info' instead of 'udevinfo' (http://bugs.gentoo.org/show_bug.cgi?id=236551), but it still won't work. There are also no errors in the hal verbose log.
Comment 1 John Youells 2008-09-04 17:59:21 UTC
I can confirm this.

emerge --info

Portage 2.2_rc8 (default/linux/x86/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r4-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-glibc2.0
Timestamp of tree: Thu, 04 Sep 2008 15:06: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-r7
dev-python/pycrypto: 2.0.1-r6
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.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
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="-march=athlon-xp -O2 -msse2 -pipe -fomit-frame-pointer"
CHOST="i686-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/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="-march=athlon-xp -O2 -msse2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="autoaddcvs ccache distlocks fixpackages parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/nouveau /usr/local/portage/dev-lang /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa arts asf berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus divx4linux dri dts dvd dvdr dvdread eds emboss encode esd evo fam firefox flac foomaticdb fortran gdbm gif glitz gnome gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog java jpeg kde kerberos ldap libnotify live mad matrox midi mikmod mmx mmxext mng mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl pic png ppds pppd prebuilt python qt3 qt3support qt4 quicktime radeon readline real reflection rtc samba sdk sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcltk tcpd theora tiff tk truetype unicode usb vcd vorbis win32codecs wma wmfreal x86 xcomposite xml xorg xv xvid xvmc zlib" ALSA_CARDS="ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="radeon r200"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 John Youells 2008-09-04 18:03:28 UTC
Forgot to add:

pmount and disk mount caplet for gnome panel fail to show up along with volume control in gnome-panel if I install > sys-fs/udev-125-r2.
Comment 3 gfl3162+gbugzilla 2008-09-05 02:49:53 UTC
Problem persists in hal-0.5.11-r2. The optical disc drive also appears to be missing. hal-addon-storage is not running for the disc drive with the newer versions of udev.

I get a bunch of these warnings in syslog:

hald[4657]: 19:46:38.163 [I] blockdev.c:874: block_add: sysfs_path=/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda2 dev=//dev/sda2 is_part=1, parent=0x00000000 
hald[4657]: 19:46:38.163 [I] blockdev.c:970: Ignoring hotplug event - no parent 
hald[4657]: 19:46:38.163 [W] blockdev.c:1473: Not adding device object 
Comment 4 gfl3162+gbugzilla 2008-09-05 04:43:42 UTC
revdep-rebuild found that /usr/libexec/hald-probe-{storage,volume} are linked to /lib/libvolume_id.so.0, which changes to .so.1 in udev-126 and 127. Rebuilding hal fixes part of the problem: my optical disc drive and flash drives show up in nautilus, but they are not automatically mounted for some reason.
Comment 5 Rahul Jain 2008-09-05 07:40:29 UTC
revdep-rebuild found nothing to rebuild. I recopiled hal, hal-info and pyxf86config but nothing changed. Still no disk detection.
Comment 6 Mike Auty gentoo-dev 2008-09-05 19:18:59 UTC
A quick diffing of hal-device's output between the two udev versions shows first that what was previously detected as a media device is now detected only as a normal storage device.  The biggest difference however is that all device names are listed as //dev/blah, rather than /dev/blah.

This is in keeping with the changes in udev-127 (they seem to make use of a UDEV_PREFIX now, which would explain the extra /).  I haven't looked inside hal, but my guess is that the extra slash is causing it some issue...
Comment 7 Mike Auty gentoo-dev 2008-09-05 20:34:20 UTC
A quick (and possibly the filthiest) hack shows that if the block.device is "//dev/sdb1", gnome-mount will return "device /dev/sdb1 is not a volume or a drive", but that if it's "/dev/sdb1", gnome-mount will mount it fine.

Note, that's there's other bits that would need patching too, since linux.device_file now features the double slashes (as do some other attributes).  For instance, even with the patch, my mp3 player reports "does not contain media" when previously it said "is not a volume or a drive".

It's unclear whether the best fix would be for udev to report a canonicalized path, or for hald to be patch to cope with it...
Comment 8 gfl3162+gbugzilla 2008-09-05 23:54:30 UTC
According to strace output, hal seems to run 'udevadm info -r', which returns the root of the device tree, which is supposed to be /dev. However, the command returns //dev instead. Maybe that is causing hal to screw up.
Comment 9 gfl3162+gbugzilla 2008-09-06 01:01:49 UTC
Created attachment 164676 [details, diff]
Patch to remove slash at beginning of path

This is my second time programming in C, please clean up the code if there are any problems. Thanks!
Comment 10 gfl3162+gbugzilla 2008-09-06 04:39:09 UTC
Created attachment 164680 [details, diff]
Alternate patch for udev ebuild that also works
Comment 11 Rahul Jain 2008-09-06 08:01:47 UTC
The patch did not work for me. I have switched to udev-125-r2 and hal-0.5.11-r1 for now.
Comment 12 gfl3162+gbugzilla 2008-09-06 14:56:08 UTC
This problem could also be related to the file /usr/share/hal/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi, introduced in 0.5.11-r2. Internal drives are not showing up in nautilus with this file, but deleting this file fixes the problem, along with udev-alt-patch-127.patch.
Comment 13 Andrzej Rybczak 2008-09-09 08:06:30 UTC
I had issue with autounmounting, KDE was able to automount my discs, but autounmounting by pressing eject button didn't work, I had to unmount disc manually. Patch for udev-127 ebuild fixed this for me, thanks.
Comment 14 Rémi Cardona gentoo-dev 2008-09-13 10:43:59 UTC
Ok, I've revbumped udev to 127-r1 but under a p.mask. I don't want to step on anyone's toes :)

This ebuild passes a --with-udev-prefix to udev's configure which solves the issue.

Of course, I'm pretty sure HAL is the one to blame as //dev/* is a valid path and it should be able to understand it.

@udev folks: udev-127-r1 is currently p.masked. Please unmask it if you agree with my changes.

@All, please unmask this ebuild locally and let me know if that fixes the issue at hand.

Thanks
Comment 15 Matthias Schwarzott gentoo-dev 2008-09-13 13:10:57 UTC
@remi:
The changes were fine, and I unmasked udev-127-r1.
I alsa had udev-128 ebuild here to be commited, so I fixed configure with the INSTALL documentation even more and commited it. I hope udev-128 also fixes this bug.
Comment 16 Rémi Cardona gentoo-dev 2008-09-13 13:41:31 UTC
Well, I looked at udev's git log and didn't see any change related to this (I may have missed it though, I'm no udev hacker).

TBH, I really think HAL should be able to cope with an ugly, yet perfectly valid, device path...

Thanks :)
Comment 17 Ivan Iraci 2008-09-13 14:01:33 UTC
(In reply to comment #15)

> @remi:
> I alsa had udev-128 ebuild here to be commited, so I fixed configure with the
> INSTALL documentation even more and commited it. I hope udev-128 also fixes
> this bug.

I can confirm udev-128 fixed this bug.

Nice! :-)

Comment 18 Rahul Jain 2008-09-13 15:13:25 UTC
udev-128 does not work for me. :( There is no automounting with that as well.
Comment 19 Peter Sääf 2008-09-13 18:39:21 UTC
udev-128 fixes this for me as well.
Comment 20 Kenneth Prugh (RETIRED) gentoo-dev 2008-09-13 19:38:17 UTC
udev-128 fixes it here
Comment 21 Rahul Jain 2008-09-13 19:57:54 UTC
Can someone please explain to me as to why it is not working for me. 

sys-apps/hal-0.5.11-r3
sys-fs/udev-128
Comment 22 SchAmane 2008-09-14 09:20:12 UTC
udev-128, hal-0.5.11-r3, kernel-2.6.26.5
gnome nautilus doesnt show any USB, Local NTFS (ntfs-3g) and Firewire devices anymore. So i cant access them from gnome, it doesnt automount it as befor also. Only way to do that now id to get superuser rights and mount manualy.
So new ebuilds doesn't fix problem for me...
Comment 23 SchAmane 2008-09-14 09:37:51 UTC
Sorry, USB and Firewire disks seems to work, only local partitions aren't show anymore. 
So new ebuild fix the problem.
Maybe i just missing just hal fdi polycies for ntfs...
Comment 24 Jose daLuz 2008-09-14 16:50:36 UTC
(In reply to comment #21)
> Can someone please explain to me as to why it is not working for me. 
> 
> sys-apps/hal-0.5.11-r3
> sys-fs/udev-128
> 
You have to rebuild hal (or run revdep-rebuild) after upgrading udev. After that it should work. 128 worked for me.
Comment 25 Rahul Jain 2008-09-14 17:59:13 UTC
(In reply to comment #24)
> (In reply to comment #21)
> > Can someone please explain to me as to why it is not working for me. 
> > 
> > sys-apps/hal-0.5.11-r3
> > sys-fs/udev-128
> > 
> You have to rebuild hal (or run revdep-rebuild) after upgrading udev. After
> that it should work. 128 worked for me.
> 

Case is similar to that of Comment #22, it is only ntfs-automount which is broken. Should I open a separate bug report for that.
Comment 26 Don Swam 2008-09-15 13:51:14 UTC
(In reply to comment #25)
> (In reply to comment #24)
> > (In reply to comment #21)
> > > Can someone please explain to me as to why it is not working for me. 
> > > 
> > > sys-apps/hal-0.5.11-r3
> > > sys-fs/udev-128
> > > 
> > You have to rebuild hal (or run revdep-rebuild) after upgrading udev. After
> > that it should work. 128 worked for me.
> > 
> 
> Case is similar to that of Comment #22, it is only ntfs-automount which is
> broken. Should I open a separate bug report for that.
> 
udev-128,hal-0.5.11-r3, kernel-2.6.26-r1, everything works except automounting of partitions. Deleting /usr/share/hal/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi, and automounting of partitions including ntfs works fine.

Comment 27 Rahul Jain 2008-09-15 20:29:03 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > (In reply to comment #24)
> > > (In reply to comment #21)
> > > > Can someone please explain to me as to why it is not working for me. 
> > > > 
> > > > sys-apps/hal-0.5.11-r3
> > > > sys-fs/udev-128
> > > > 
> > > You have to rebuild hal (or run revdep-rebuild) after upgrading udev. After
> > > that it should work. 128 worked for me.
> > > 
> > 
> > Case is similar to that of Comment #22, it is only ntfs-automount which is
> > broken. Should I open a separate bug report for that.
> > 
> udev-128,hal-0.5.11-r3, kernel-2.6.26-r1, everything works except automounting
> of partitions. Deleting
> /usr/share/hal/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi, and
> automounting of partitions including ntfs works fine.
> 

Removing this file did not solve anything for me. 
Comment 28 Serge Gavrilov 2008-09-30 11:07:59 UTC
Automounting does not work for me with udev >= 124; with udev-119 it works fine
Comment 29 gfl3162+gbugzilla 2008-10-01 00:52:02 UTC
I'm using hal 0.5.11-r3, gentoo-source 2.6.26-r1, and udev 128, and for some reason only the disks NOT listed in fstab show up in nautilus.
Comment 30 Rémi Cardona gentoo-dev 2008-10-01 07:10:52 UTC
(In reply to comment #29)
> I'm using hal 0.5.11-r3, gentoo-source 2.6.26-r1, and udev 128, and for some
> reason only the disks NOT listed in fstab show up in nautilus.

That's normal, that's what nautilus does and it's in no way related to HAL (all your disks should be listed in lshal).

Thanks
Comment 31 Serge Gavrilov 2008-10-14 16:00:09 UTC
with udev-130-r1 automounting does not work as well
Comment 32 Rémi Cardona gentoo-dev 2008-10-15 12:31:03 UTC
@Serge, please open a new bug. This particular bug is fixed, you're probably experiencing other issues.

Thanks