Bug 494483 - When encrypted external drive is auto-mounted, Disks & Devices applet doesn't recognize that it is mounted, and still offers option to mount it
Summary: When encrypted external drive is auto-mounted, Disks & Devices applet doesn't...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Disks & Devices (show other bugs)
Version: 6.2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-10-10 19:46 UTC by Łukasz Konieczny
Modified: 2024-10-11 21:28 UTC (History)
2 users (show)

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


Attachments
Screenshot to prove, that Dolphin knows about mounted drive, but Plasma doesn't (238.81 KB, image/png)
2024-10-10 19:46 UTC, Łukasz Konieczny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Konieczny 2024-10-10 19:46:36 UTC
Created attachment 174650 [details]
Screenshot to prove, that Dolphin knows about mounted drive, but Plasma doesn't

SUMMARY
I have several external HDD drives encrypted with LUKS2 and having XFS filesystem on them. When I plug such a drive, a window appears to provide password. I do that, then drive is opened and functioning (it is decrypted and filesystem is mounted), but Plasma Disks & Devices applet doesn't see that and thinks, that LUKS container is still closed and needs password. Of course when I click on "Podepnij" [in polish, in english it would be "decrypt" or "open"] nothing happens, because drive is already mounted. For me it is a major bug, because it makes false claim about external drive and eventually makes a user unplug a hard drive without unmounting, because user thinks, that she/he didn't provide correct password. I did that at first time, then I realized at second time, that Dolphin sees my hard drive as mounted.

STEPS TO REPRODUCE
1. Plug encrypted external drive to computer.
2. Provide a password.
3. Observe the result.

OBSERVED RESULT
Plasma applet is unaware about the fact, that drive is mounted and doesn't offer option to unmount it.

EXPECTED RESULT
Plasma applet knows, that drive is mounted.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Kernel Version: 6.11.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: System76
Product Name: Darter Pro
System Version: darp7

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2024-10-10 20:31:58 UTC
Do you have automount turned on? If so, if you disable automount and manually mount the disk using the Disks & Devices widget, does the issue stop happening?
Comment 2 Łukasz Konieczny 2024-10-10 20:56:57 UTC
(In reply to Nate Graham from comment #1)
> Do you have automount turned on? If so, if you disable automount and
> manually mount the disk using the Disks & Devices widget, does the issue
> stop happening?

Yes, I had automounting enabled. When I disabled it now, applet behaves correctly.
Comment 3 Nate Graham 2024-10-10 20:59:28 UTC
Thanks for checking. We had a similar bug that got fixed for the manual mount use case, but perhaps automount also needs a fix here. I didn't think to test that one. Bohdan, would you be able to take a look here?
Comment 4 Bogdan Onofriuchuk 2024-10-11 13:31:55 UTC
(In reply to Nate Graham from comment #3)
Bohdan, would you be able to take a look here?

Yes, will look tonight or tomorrow
Comment 5 Bug Janitor Service 2024-10-11 20:14:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4826
Comment 6 Nate Graham 2024-10-11 21:00:12 UTC
Git commit 93d96c8e58edeb5df1665c5a5247b97723b5fe40 by Nate Graham, on behalf of Bohdan Onofriichuk.
Committed on 11/10/2024 at 21:00.
Pushed by ngraham into branch 'master'.

applets/devicenotifier: Fix encrypted container not updating status
FIXED-IN: 6.2.1

M  +41   -0    applets/devicenotifier/plugin/devicestatemonitor_p.cpp
M  +3    -0    applets/devicenotifier/plugin/devicestatemonitor_p.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/93d96c8e58edeb5df1665c5a5247b97723b5fe40
Comment 7 Nate Graham 2024-10-11 21:28:53 UTC
Git commit 0e135307cfb2b7c9c6e9314b149fc56a49c60f29 by Nate Graham.
Committed on 11/10/2024 at 21:06.
Pushed by ngraham into branch 'Plasma/6.2'.

applets/devicenotifier: Fix encrypted container not updating status
FIXED-IN: 6.2.1


(cherry picked from commit 93d96c8e58edeb5df1665c5a5247b97723b5fe40)

95d4a8e9 Fix encrypted container not updating status

Co-authored-by: Bohdan Onofriichuk <bogdan.onofriuchuk@gmail.com>

M  +41   -0    applets/devicenotifier/plugin/devicestatemonitor_p.cpp
M  +3    -0    applets/devicenotifier/plugin/devicestatemonitor_p.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/0e135307cfb2b7c9c6e9314b149fc56a49c60f29