Description of problem:
When USB storage devices are attached they are automatically mounted. KDE pops
up the "device inserted" requestor but of course choosing "Open Window" fails,
because the device is already mounted. Additionally the icons on the desktop are
shown as "unmounted" so when you double-click them it tries to mount which again
Version-Release number of selected component (if applicable):
How reproducible: Always
Steps to Reproduce:
1. Attach USB storage device with ext3 fs
3. umount /media/*
4. remove USB device
mount shows devices are already mounted.
KDE opens "device attached" action window.
Device icons appear on KDE desktop in "unmounted" state.
After removal the /media directories don't disappear.
Devices should not automatically be mounted.
Removal should also remove /media directories.
If the USB storage device is formatted with the FAT fs then it is still
automatically mounted but at least the desktop show it correctly as "mounted"
and after removal the entry in /media disappears.
I cannot reproduce this problem with latest KDE in rawhide. The desktop shows
the device icons correctly as "mounted" and the kded daemon opens the windows
without any problem!
The kded daemon does not mount automatically the devices. It seems that the hal
backend does it. So it's a bug (or feature?) in hald daemon, but not in KDE.
We do not auto mount devices. gnome-volume-manager does that in gnome. It
shouldn't be running if you are running KDE.
The devices seem to be mounted by root and not with user rights, ie. user can't
unmount them. So I doubt that they are mounted by a KDE process.
Is there anything I can monitor to see which process does the mount?
I now disabled all KDE components which have something to do with media
KDED Media Manager
Media Notifier Daemon (kded)
-> the devices don't get mounted anymore BUT also no directories are created in
If I start "KDED Media Manager" again the problem reappears.
Looking at the audit.log shows that the UID for the mount command is mine and
Looking at lshal output you see:
udi = '/org/freedesktop/Hal/devices/volume_uuid_a07092a0_d89c_467a_81c4_c247191d
info.hal_mount.mounted_by_uid = 500 (0x1f4) (int)
info.hal_mount.created_mount_point = '/media/Backup' (string)
volume.is_partition = true (bool)
volume.is_disc = false (bool)
volume.is_mounted = false (bool)
volume.mount_point = '' (string)
volume.label = 'Backup' (string)
So HAL thinks it's not mounted (that would explain why the desktop shows them as
unmounted) but still it has been mounted by UID=500 (that's me). If the KDED
Media Manager is not running the first two lines (.hal_mount.) don't exist.
I couldn't find any configuration options for "KDED Media Manager" that controls
the automatic mounting.
I have the feeling that something is missing in the KDED Media Manager. Maybe it
is not updating the information to HAL correctly?
Please tell me if you need more complete logs...
I just deleted my KDE configuration and started with a fresh one for KDE 3.5.1.
The problem still exists, so it is not a KDE setting which might have been wrong
while migrating through different KDE 3.x versions in FC4.
OK, now I tried with GNOME: same problems with USB storage devices which have
ext3 fs. USB sticks with vfat only get automatically mounted if you have
selected the option in the preferences.
BTW: After the ext3 volumes are mounted, they don't show up on KDE/GNOME
desktop. So the only chance to unmount them is for root to use "umount
/media/*". I noticed that this changes the security context of /etc/mtab so that
future updates of /etc/mtab fail and thus "mount" doesn't work correctly
anymore. Only /proc/mounts shows all mounts correctly. You can restore normal
behavior with "restorecon -v /etc/mtab", but you have to do that after each
If you only hot-plug USB devices with vfat fs, the security context of /etc/mtab
doesn't change and therefore "mount" works correctly all the time.
Can you please retest with an USB device formatted with ext3 fs?
Tested also with CD & DVD: they behave like vfat formatted storage devices, ie.
they get mounted automatically but their status is shown correctly on the desktop.
So it seems that only ext3 (or maybe other than vfat/is9660/udf) formatted
removable storage devices don't work correctly.
I found out that the Media Manager stores the user preferences in
If you change the properties of a storage media device it stores the changes
there indexed by the HAL identifier, e.g.
Comparison of the Properties... dialog of vfat/iso9660 vs. ext3 shows that the
KDE Media Manager doesn't offer any filesystem specific options for ext3, ie.
"Mount as user". Maybe it needs to be recompiled with ext3 support? Or maybe
it's totally missing from the code, ie. this would be an upstream bug?
It works OK now with the latest updates for FC5:
$ rpm -q kdebase dbus hal kernel
Maybe it was a bug in KDE 3.5.1...