Bug 453890 - Umount icon unnecessarily shown for internal drives
Summary: Umount icon unnecessarily shown for internal drives
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Unclassified
Component: Places (show other bugs)
Version: 5.93.0
Platform: Archlinux Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 453894 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-16 13:57 UTC by Norbert
Modified: 2022-06-18 17:24 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.95


Attachments
Icon shown (2.12 KB, image/png)
2022-05-16 13:57 UTC, Norbert
Details
Internal HDD FSTAB mounted Drives now show unmount icons (5.75 KB, image/png)
2022-05-18 08:36 UTC, Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert 2022-05-16 13:57:50 UTC
Created attachment 148882 [details]
Icon shown

SUMMARY
Dolphin displays umount icon on every drive under Devices. Is there a way to hide it for internal (nonremovable) drives?

STEPS TO REPRODUCE
1. Have some partition mounted for ex. via fstab
2. Open dolphin
3. Icon shows.

OBSERVED RESULT
Icon shows

EXPECTED RESULT
Icon hidden for permanent drives

SOFTWARE/OS VERSIONS
Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 guimarcalsilva 2022-05-16 22:25:39 UTC
Can you describe why's that an issue? Describe your usecase, how and why removing the icon would improve the situation. I'm not a KDE developer, but generally that kind of information helps developers figure out the optimal path for fixing an issue, or even figuring out if an issue is actually an issue or not.

If the behavior I see on my computer is the same as on yours, I don't think that showing the icon for internal drives would necessarily be a bad thing. Usually the drives that show the icon (at least on my PC) are mounted on-demand. For instance, I have an NTFS partition for sharing files with Windows and I set those partitions to be auto-mounted on login from System Settings. That partition can be unmounted using that icon even if it's in an internal hard drive.

Personally, I haven't found a reason to unmount internal drive partitions, but I'm sure there must be some kind of edge usecase out there for wanting to do that from Dolphin.
Comment 2 Norbert 2022-05-16 22:33:44 UTC
Simple tick box would be enough
Comment 3 guimarcalsilva 2022-05-17 00:03:38 UTC
(In reply to Norbert from comment #2)
> Simple tick box would be enough

Why though? 

In my opinion, cluttering the interface with an option for every single tiny thing is not ideal for a myriad of reasons. What's the reason for not wanting the button to be there for internal partitions? Is it aesthetics? Misclicks? Is it technically inaccurate? Does it lead to worse usability or other kinds of problems?
Comment 4 yizel7 2022-05-17 00:35:57 UTC
I've seen it mentioned quite a few times on reddit since 20 days ago and I don't like it myself as well. I agree with this post:

https://old.reddit.com/r/kde/comments/ucbsfg/dolphin_new_icon_or_other_unrelated_change/

"I did a full update yesterday (Arch) and now I get these little icons besides my internal only SSD drives.
https://imgur.com/lji7KFy
These drives cannot be removed from my laptop unless I disassemble it. I will literally never unmount/eject them. Is there any way to remove these icons? Do I need to make an fstab change? Is it a Dolphin bug? Thanks bros"

I too will literally NEVER unmount/eject drives that are inside my laptop. I would have to take my laptop entirely apart to get them. There should be a per-drive preference (checkbox in drive properties?) if we want this option to be available to all.
Comment 5 Nate Graham 2022-05-17 15:02:49 UTC
Thanks for triaging, Guilherme. I was going to ask that very question. :) 

It sounds like the problem is "it's visual clutter that could potentially lead to unintentional unmounts".

I think we can consider hiding the unmount button for internal disks, either optionally or always.
Comment 6 Thomas 2022-05-18 08:34:21 UTC
Apologies up front if I am posting incorrectly here - first time, but wanted to comment on this issue.

Was this an itentional change or a bug?
I vote as well that it is an undesirable change.

Yesterday the 3 internal HDD drives (SDB1, SDC1, SDD1) that are mounted via FSTAB at boot did not show an unmount Icon in Dolphin.
Did all the availalbe Manjaro KDE updates this morning.
Now the 3 internal HDD drives storing media that are never intended to be removed or unmounted in the Tower do.
It is both functionally and asthetically undersirable and unnecessary for the Icons to be there.

This my be (probably is) my misunderstanding - but wasn't one of the benefits of entering drives into FSTAB to get them set to a static mount point/location? Seems counterintuitive/confusing to now show an unmount Icon for internal drives mounted via FSTAB.

Thanks!
Comment 7 Thomas 2022-05-18 08:36:39 UTC
Created attachment 148940 [details]
Internal HDD FSTAB mounted Drives now show unmount icons
Comment 8 Kai Uwe Broulik 2022-05-18 09:23:12 UTC
I don't know if we can know if the current user would be allowed to unmount it, i.e. don't shows the eject button if clicking it would prompt for root credentials.
Comment 9 Nate Graham 2022-05-18 16:50:52 UTC
*** Bug 453894 has been marked as a duplicate of this bug. ***
Comment 10 Thomas 2022-05-18 17:24:59 UTC
So I guess the question/rub for me - is why did this have to change..?? Put the code that handled this back the way it was.
Seemed to work perfectly before. So why was it "fixed".

If I want to unmount a physical drive attached to a SATA cable screwed into the case of the computer and mounted via FSTAB - I should need to do more that just click an always visible Unmount icon cluttering up the view in Dolphin. Whether in fact clicking that Icon intentionally or accidentally will or will not cauise additional dialogue to prevent the Unmount.

If I plug a Thumb Drive or some other USB Storage device, with no over-riding FSTAB entry to make it a "permanent" drive - then an Unmount Icon makes absolute sense.

Just like it worked a few days ago.

Thanks!
Comment 11 Julius R. 2022-05-18 17:52:58 UTC
(In reply to Thomas from comment #10)
> So I guess the question/rub for me - is why did this have to change..?? Put
> the code that handled this back the way it was.
> Seemed to work perfectly before. So why was it "fixed".
> 
> If I want to unmount a physical drive attached to a SATA cable screwed into
> the case of the computer and mounted via FSTAB - I should need to do more
> that just click an always visible Unmount icon cluttering up the view in
> Dolphin. Whether in fact clicking that Icon intentionally or accidentally
> will or will not cauise additional dialogue to prevent the Unmount.
> 
> If I plug a Thumb Drive or some other USB Storage device, with no
> over-riding FSTAB entry to make it a "permanent" drive - then an Unmount
> Icon makes absolute sense.
> 
> Just like it worked a few days ago.
> 
> Thanks!

I second every word of that comment! As can be seen in my bug duplicate above, this little changed caused several - even critical - disturbances. A solid drive, that is integrated in the system (like network drives in a company) should not be unmountable with a single click. Imho :)
Comment 12 Bug Janitor Service 2022-05-23 10:35:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/849
Comment 13 Kai Uwe Broulik 2022-05-24 19:25:02 UTC
Git commit 69b07770899098afd879f7dc1ed5f519f1dfba7d by Kai Uwe Broulik.
Committed on 24/05/2022 at 13:44.
Pushed by ngraham into branch 'master'.

[KFilePlacesView] Show inline eject button only for removable drives

Otherwise it clutters a list of internal drives that are never meant
to be unmounted, and potentially not even allowed to be, with eject icons.

Also, we currently only show fixed network shares (e.g. through fstab),
which are usually not meant to be unmounted by the user.

Storage without a drive (e.g. a mounted ISO image) keeps its eject inline
button, too.

Triggering an unmount from the contextmenu remains possible (except for
Root and Home, as before).

M  +16   -0    src/filewidgets/kfileplacesitem.cpp
M  +2    -0    src/filewidgets/kfileplacesitem_p.h
M  +11   -0    src/filewidgets/kfileplacesmodel.cpp
M  +9    -0    src/filewidgets/kfileplacesmodel.h
M  +1    -1    src/filewidgets/kfileplacesview.cpp

https://invent.kde.org/frameworks/kio/commit/69b07770899098afd879f7dc1ed5f519f1dfba7d
Comment 14 Thomas 2022-05-26 17:39:51 UTC
Thank You..!!
To everyone - for listening to the end users, responding, and getting a fix out so quickly.
Yet another reason KDE/Plasma rocks!
Comment 15 Julius R. 2022-05-26 17:41:44 UTC
Absolutely impressive! Thanks to all involved
Comment 16 yizel7 2022-06-18 02:05:35 UTC
I cannot tell if this bug fix has been sent out yet or not? I did a major upgrade in Arch today to 5.25.0 and framework 5.95.0 and I am still seeing the unmount icons in Dolphin for my internal laptop drives that will never be removed. Your help is appreciated! I am still new to the whole KDE invent page so I can't tell when this fix was supposed to go out.

kio 5.95.0-1
kio-extras 22.04.2-1
kio-fuse 5.0.1-1
dolphin 22.04.2-1
frameworkintegration 5.95.0-1
plasma-framework 5.95.0-2
Comment 17 Kai Uwe Broulik 2022-06-18 03:25:55 UTC
KIO 5.95 should have this fix. So it seems something else is missing. What partition / drive / device is still showing an Eject button for you? 

Can you check solid-hardware5 list for your drive(s) and provide the output of solid-hardware5 details for each of them, and perhaps your list of mounts.
Comment 18 yizel7 2022-06-18 14:26:46 UTC
(In reply to Kai Uwe Broulik from comment #17)
> KIO 5.95 should have this fix. So it seems something else is missing. What
> partition / drive / device is still showing an Eject button for you? 
> 
> Can you check solid-hardware5 list for your drive(s) and provide the output
> of solid-hardware5 details for each of them, and perhaps your list of mounts.

I have 3 internal drives in my laptop. 1 SATA and 2 NVMe. I am still very new to Linux so I don't know if this is what you needed but I ran 'solid-hardware5 list' and can see my drives there:

udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1'
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p2'
udi = '/org/freedesktop/UDisks2/block_devices/dm_2d1'
udi = '/org/freedesktop/UDisks2/block_devices/dm_2d2'
udi = '/org/freedesktop/UDisks2/block_devices/sda1'
udi = '/org/freedesktop/UDisks2/block_devices/nvme1n1'
udi = '/org/freedesktop/UDisks2/block_devices/sda'
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p1'
udi = '/org/freedesktop/UDisks2/block_devices/dm_2d0'
udi = '/org/freedesktop/UDisks2/drives/WDC__WDS100T2B0A_*****_******'
udi = '/org/freedesktop/UDisks2/drives/KINGSTON_SNVS1000GB_********'
udi = '/org/freedesktop/UDisks2/drives/WDBGMP0010BNC_WRSN_******'
(I masked the serials for privacy)

I wonder if maybe they are listed with unmount icons because they are the unencrypted LUKS partitions? They used to not have the eject button but a little over a month ago that changed. Did your fix include drives that would be unencrypted? Like maybe the encrypted version would not show eject but when you unencrypt it does.

Here is my mounts:
mount | grep 'btrfs'
/dev/mapper/cryptlvm on / type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=5,subvol=/)
/dev/mapper/luks-zy2h24g1-74n1-6362-hy56-a2ursf2ba7hc on /mnt/Documents type btrfs (rw,nosuid,nodev,relatime,ssd,space_cache=v2,subvolid=5,subvol=/,x-gvfs-show)
/dev/mapper/luks-hbv25egs-67b4-7ahe-c378-52742a0y2153 on /mnt/Roms type btrfs (rw,nosuid,nodev,relatime,ssd,space_cache=v2,subvolid=5,subvol=/,x-gvfs-show)
Comment 19 yizel7 2022-06-18 17:24:28 UTC
(In reply to Kai Uwe Broulik from comment #17)
> KIO 5.95 should have this fix. So it seems something else is missing. What
> partition / drive / device is still showing an Eject button for you? 
> 
> Can you check solid-hardware5 list for your drive(s) and provide the output
> of solid-hardware5 details for each of them, and perhaps your list of mounts.

In addition to the details I added in Comment 18 I checked the details for those 3 drives and they all say removable false and hotpluggable false so I would assume that means the unmount shouldn't be showing.

  StorageDrive.bus = 'Sata'  (0x4)  (enum)
  StorageDrive.driveType = 'HardDisk'  (0x0)  (enum)
  StorageDrive.removable = false (bool)
  StorageDrive.hotpluggable = false (bool)
  StorageDrive.inUse = true (bool)

  Block.device = '/dev/nvme1n1' (string)
  StorageDrive.bus = 'Platform'  (0x5)  (enum)
  StorageDrive.driveType = 'HardDisk'  (0x0)  (enum)
  StorageDrive.removable = false (bool)
  StorageDrive.hotpluggable = false (bool)
  StorageDrive.inUse = true (bool)

  Block.device = '/dev/nvme0n1' (string)
  StorageDrive.bus = 'Platform'  (0x5)  (enum)
  StorageDrive.driveType = 'HardDisk'  (0x0)  (enum)
  StorageDrive.removable = false (bool)
  StorageDrive.hotpluggable = false (bool)
  StorageDrive.inUse = true (bool)