Bug 487832

Summary: non-removable storage devices get recognized as removable media
Product: [Plasma] plasmashell Reporter: J. Gerhards <g1.jasger>
Component: Disks & Devices widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: g1.jasger, nate, pip.kde
Priority: NOR    
Version: 6.0.5   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=488158
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description J. Gerhards 2024-05-31 11:06:06 UTC
SUMMARY
Device managers like dolphin and the Disks & Devices applet show non-removable storage such as hard drives and SSDs, or rather their partitions as removable media. Additionally, the root partition gets recognized correctly as non-removable, however any other partition on the same or any other device is seen as removable, even when it gets mounted during init through the /etc/fstab file.

STEPS TO REPRODUCE
1. Log-in to Plasma
2. open Dolphin or Disks & Devices

OBSERVED RESULT
Non-removable media gets categorized and treated like a removable Device

EXPECTED RESULT
Non-removable media should be recognized as non-removable

SOFTWARE/OS VERSIONS
Kernel: Linux 6.9.2.arch1-1
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
Since at least two completely different programs are affected, I suspect that this is an issue with some part of the framework.
Comment 1 Nate Graham 2024-06-12 16:37:39 UTC
What does `cat /sys/class/block/[fill this in for the devices in question]/removable` say?
Comment 2 J. Gerhards 2024-06-14 19:10:10 UTC
(In reply to Nate Graham from comment #1)
> What does `cat /sys/class/block/[fill this in for the devices in
> question]/removable` say?

On the root device:
$ cat /sys/class/block/nvme0n1/removable
0

On any other device:
$ cat /sys/class/block/sda/removable
1

If I interpret this correctly, this then is an issue with some other system (the kernel?), correct?
Comment 3 Nate Graham 2024-06-14 21:23:09 UTC
Yup, the removability property is apparently being mis-reported here. I'd recommend following up with your distro about this; they can probably point to the exact place to report the issue.
Comment 4 J. Gerhards 2024-06-14 22:29:48 UTC
OK- thanks, I'll raise an issue on arch then.
Comment 5 Paul 2024-06-17 13:21:18 UTC
(In reply to g1.jasger from comment #4)
> OK- thanks, I'll raise an issue on arch then.

This was a regression introduced with the 6.9.* kernel.

It has been fixed in 6.10-rc4 "Fix a bug where the SCSI Removable Media Bit (RMB) was incorrectly set for hot-plug capable (and eSATA) ports."
https://lore.kernel.org/all/171856227442.1143.13572753599648338171.pr-tracker-bot@kernel.org/T/

On openSUSE TW this fix has been backported to the 6.9 kernel and should be in 6.9.6

@g1.jasger you may want to point the arch folk to that commit.
Comment 6 J. Gerhards 2024-06-17 15:05:31 UTC
(In reply to Paul from comment #5)
> @g1.jasger you may want to point the arch folk to that commit.

Thanks, I made a new thread on the mailing list: https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/thread/FJRXFUYC5KQPKCMZJDBYHTL3XENAEZZQ/