Details shows “Disk: Unknown” on devices with eMMC root
Steps to reproduce:
- Use a device whose internal storage is eMMC. (This is very common in lower-end hardware.)
- Open GNOME Settings
- Browse to Details → About
Expected results:
- “Disk” row shows the size of the internal storage
Actual results:
- “Disk” row shows “unknown”
@dsd found that this is because Settings ignores all drives that udisks considers removable or ejectable. https://gitlab.gnome.org/GNOME/gnome-control-center/blob/master/panels/info/cc-info-overview-panel.c#L509-512 As discussed on this udisks bug report, udisks cannot distinguish between (soldered-on) eMMC and SD cards, and the consequences of marking SD cards as fixed are worse than the consequences of marking eMMC as removable, so it does the latter.
If Settings were to just drop this check, then it would include the size of whatever removable storage happens to be inserted in this number, and I expect we'd see bug reports about that.
A few heuristics come to mind:
- Always include the size of the disk containing the partition mounted at
/
, even if it appears to be removable. This would produce incorrect results when booted from a USB stick. - If there are no non-removable devices, include all removable devices in the total. This would produce incorrect results on an eMMC-only system which happens to have a USB stick inserted.
- Use the size of the disk with a partition mounted at
/
only if there are no non-removable devices. This would show the wrong number when booted from a USB stick on a system with eMMC storage, but I think it would otherwise be OK.
Edited by Will Thompson