Bug 261376 - automount of removable media fails
Summary: automount of removable media fails
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_deviceautomounter (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Torrie Fischer
URL:
Keywords:
: 287170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-27 14:37 UTC by postdoc38
Modified: 2014-10-31 02:17 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.3


Attachments
make the AutomountUnknownDevices option work as the naming suggests (2.33 KB, patch)
2014-08-04 20:58 UTC, Frank Schütte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postdoc38 2010-12-27 14:37:20 UTC
Version:           unspecified (using KDE 4.5.90) 
OS:                Linux

I still cannot have my removable media (USB, DVD, anything) automounted. I have set the options "enable automatic mounting of removable media" and "automatically mount removable media when attached", but nothing happens.

The only way I can make it work is by _also_ checking "only automatically mount removable media that has been manually mounted before". Then, automounting works the second time I insert the media (if it has been mounted before, as it should).

The option "automatically mount media when attached" has been there since a long time, and never worked. Would it not make sense to remove it until it works?

Reproducible: Always

Steps to Reproduce:
plug USB stick

Actual Results:  
nothing happens

Expected Results:  
stick gets mounted automatically
Comment 1 Frank Griffin 2012-01-31 13:48:36 UTC
I confirm this.  If you open the Device Notifier settings and check "automount removable media" but uncheck "only mount...", click Apply/OK, close the dialog and reopen it, the "automount" box is unchecked again.

This is breaking all wine apps that use removable media and GNOME apps like brasero running under KDE, as all of these require their volumes to be mounted.
Comment 2 Frank Griffin 2012-01-31 13:58:46 UTC
This is occurring in Mageia Cauldron with KDE 4.8.

And, I just tested checking Automount and leaving "Only mount..." checked, and the automount checkbox is still cleared the next time the dialog is opened.  So automount is broken under all scenarios.
Comment 3 Frank Griffin 2012-01-31 14:36:35 UTC
Further results...

Doing this through the System Settings/ Removable Devices dialog does *not* continually clear the automount checkbox when the dialog is closed, even though the UI looks identical to the UI for the Device Notifier settings.

However, it doesn't work as documented either.

Checking "Enable automounting" and "automount at login"/"automount at attach" does not cause automounting to occur.  The only way I can get KDE to automount is if I find the optical device entries in Device Overrides and check them there, in which case the volumes are mounted as /media/whatevervolumenamewaslastmountedonthatdevice, e.g. /media/NEW.

The Help states that Device Overrides are ignored when Enable Automount is checked, and that everything will be automounted.
Comment 4 Frank Griffin 2012-01-31 14:41:55 UTC
*** Bug 287170 has been marked as a duplicate of this bug. ***
Comment 5 Marco Poletti 2013-03-06 17:43:29 UTC
Still an issue with KDE 4.10.1.
(in Gentoo Linux)
Comment 6 Philipp 2013-05-12 20:00:26 UTC
I notice this problem in Kubuntu 12.04, KDE 4.8.5 and in openSuSE 12.3, KDE 4.10. For automounting there has to be set the two options "automatically mount removable media when attached" and "only automatically mount removable media that has been manually mounted before" otherwise it doesn't work.
Comment 7 Alex Barrero 2013-10-14 21:08:21 UTC
I have been using Kubuntu 12.04.1 with its KDE default version and this feature worked fine allways. When I updated via backports to the latest KDE version available (4.11.2) the automounting got failed.

Any solutions?
Comment 8 Ezio Vergine 2014-01-22 17:04:31 UTC
Same issue with kde 4.12.1. It work like a charm with old kde version.
Comment 9 Frank Schütte 2014-08-04 20:58:57 UTC
Created attachment 88113 [details]
make the AutomountUnknownDevices option work as the naming suggests

In my understanding usb stick should be mounted, if either it is forced to, or
if automounting is enabled and type check evaluates to true and either one of:
- known
- lastSeenMounted
- automountUnknown
is true.
The patch does just that.
Comment 10 Frank Schütte 2014-08-04 21:12:18 UTC
I think id=243046 talks about the same issue. so this is very popular.
Comment 11 Christoph Feck 2014-10-25 23:09:21 UTC
Frank, bug 243046 comment #4 has a patch similar to yours. Could you please compare them, and then propose a patch to https://git.reviewboard.kde.org/ ?
Comment 12 Frank Schütte 2014-10-26 12:17:50 UTC
(In reply to Christoph Feck from comment #11)
> Frank, bug 243046 comment #4 has a patch similar to yours. Could you please
> compare them, and then propose a patch to https://git.reviewboard.kde.org/ ?

Hi Christoph,
I did compare the patches. The patch from comment #4 falls short in that it is similar
to my patch but is missing to automount known devices if automount unknown is switched
off.
So I propose to use my patch. I have never submitted a patch and after struggling for about
four hours I give up. Please use my submitted patch. I am technically not able to produce a
patch or to submit a patch to the reviewboard.
Thanks.
Comment 13 Frank Schütte 2014-10-28 09:26:02 UTC
Hi Christoph,
I finally figured it out, took me a whil, though.

Published https://git.reviewboard.kde.org/r/120839/
Comment 14 Christoph Feck 2014-10-29 13:56:59 UTC
Git commit 3f7f4137fb50594faee90c82dea22352b23fc658 by Christoph Feck, on behalf of Frank Schütte.
Committed on 29/10/2014 at 13:54.
Pushed by cfeck into branch 'KDE/4.14'.

Fix solid-device-automounter failing to automount unknown devices

REVIEW: 120839
Related: bug 243046
FIXED-IN: 4.14.3

M  +2    -5    solid-device-automounter/kded/DeviceAutomounter.cpp
M  +4    -1    solid-device-automounter/lib/AutomounterSettings.cpp

http://commits.kde.org/kde-runtime/3f7f4137fb50594faee90c82dea22352b23fc658