Bug 417009 - Automount confuses devices after plugging in a flash drive
Summary: Automount confuses devices after plugging in a flash drive
Status: RESOLVED WORKSFORME
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:
Depends on:
Blocks:
 
Reported: 2020-02-01 01:39 UTC by Tracy
Modified: 2020-10-28 04:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tracy 2020-02-01 01:39:13 UTC
SUMMARY

LUKS partition is set not to automount on login and not to automount on attach in Settings -> Removable Storage -> Removable Devices.

There, selected are checkboxes 
"Enable automatic mounting of removable media"
"Mount all removable media at login"
"Automatically mount removable media when attached"

But in "Device Overrides", all automatic mounting is unchecked.

In file .config/kded_device_automounterrc, all is correct about my LUKS partition. Indeed, no automount attempt takes place.

But then I connect a USB flash drive to the computer and reboot.

Now, immediately after login, windows pop up and ask me to enter three passwords (of KWallet, partition, root) to mount the LUKS partition. But I have set the partition not to automount in "Device Overrides"! 

Now, just because I connected the USB flash drive, I have to cancel in three windows in order to proceed, every time I log in.

So, it looks like the "Device Override" section doesn't override the mounting settings per device.


I looked into and found some possible reasons for automounting attempt: the device files in kded_device_automounterrc have changed because of the flash drive attached during boot: /dev/sdc2 became /dev/sdd2. 
This probably caused the KDE to neglect previously established rules on automounting of /dev/sdc2 (but this is a hypothesis only).


Is it possible to refer to partitions via their UUID instead of device names? This should make obeying the rules more persistent. Many settings in Linux, for example in /etc/fstab, use this method to maintain persistence when dealing with partitions.

Or is there other solution to prevent a certain LUKS partition from automounting in all cases?

Plasma-desktop version is 5.12.8 and plasma-framework version is 5.55.0.




STEPS TO REPRODUCE

1. Create a LUKS partition. Add no records of it in fstab and crypttab.

2. In Settings, check checkboxes 

"Enable automatic mounting of removable media"
"Mount all removable media at login"
"Automatically mount removable media when attached"

and uncheck "Only automatically mount removable media that has been mounted before"

3. In "Device Overrides", uncheck all boxes.

4. Reboot and observe that automount of the LUKS partition is not happening.

5. Plug in a USB flash drive. Mount it, say, by opening it in Dolphin.

6. Reboot.


OBSERVED RESULT

Observe that KDE attempts to automount the LUKS partition. (But this may depend on naming of devices and USB port used).


EXPECTED RESULT

No automounting attempts shall take place, independent of attached USB flash drive, since in "Device Overrides" the automounting of LUKS partition is unchecked.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Opensuse 15.1, updated. Running KDE.

KDE Plasma Version: 5.12.8 (probably)
KDE Frameworks Version: 5.55.0
Qt Version: 5.9.7


ADDITIONAL INFORMATION

This bug is similar to 391706. I observed that bug also sometimes, since I got reports on mounting of mounted partition. However, since a few days the double mounting is gone.
Comment 1 Nate Graham 2020-09-28 20:16:06 UTC
> KDE Plasma Version: 5.12.8 (probably)
Can you confirm? Plasma 5.12 is no longer formally supported; the new 5.18 LTS is what you want.
Comment 2 Bug Janitor Service 2020-10-13 04:33:16 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2020-10-28 04:33:30 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!