Nautilus redisplays unmount icon for SD card after unmounting it

Bug #2064910 reported by Casio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned
nautilus (Ubuntu)
New
Low
Unassigned

Bug Description

Dell M6700 with plugged in following items - SD card, Android phone, external USB stick. User name "main".
File manager lists SD card and Android devices available both with unmount icons alongside.

Click on USB Stick, it mounts, right-hand pane shows files. ls /media/main shows mount point.
Click on unmount for USB stick - /media/main mount point vanishes, file list on right-hand pane shows home folder, USB Stick device (and its unmount icon) vanishes. All correct so far.

Doing the same for Android phone - as above but I never see a /media/main mount point.
The android device stays listed, with no unmount icon - all correct so far (I'm not sure why there is never a /media/main mount point for the phone.

Click on SD card, it mounts, right-hand pane shows files. again no mount point is shown in /media/main. click on unmount for SD card - card unmounts, file list on right-hand pane shows home folder BUT then the SD device gets instantly relisted with an unmount icon alongside.

Clicking on the re-displayed SD card unmount icon the message "Unable to eject.. " appears - technically this is error message is correct (because the SD card is not mounted) but as its listed as a device on screen this message is going to happen.

Physically ejecting the SD card makes the device lost\found beeps and makes the device appear\vanish in file manager - this is correct.

in summary - with an SD card left in the laptop, clicking unmount works but the SD card gets instantly recognised as a available device again and is relisted in file manager (without the lost/found beeps).
/media/main never seems to show any mount points for the Android phone or the SD card (note I can get an SD card mount point in /media/main if i mount it myself using terminal commands).

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Which Ubuntu version are you using? Could you do

$ journalctl -f

and copy what is being logged when you eject and see the device listed again?

Changed in nautilus (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Casio (casiobearing) wrote :

Hi,

I clicked on SD128-Home device in file manager to mount it, and then exactly at 14:57 I clicked on the unmount icon.
I've included the log entries from when I mounted the SD card till now.

Regards

Revision history for this message
Casio (casiobearing) wrote :

oh sorry I mean to say I'm using Ubuntu 22.04 fully updated as of this morning.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, the log has those warnings

systemd-udevd[4761]: mmcblk0p1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/mmcblk0p1' failed with exit code 1.

I wonder if the issue has to do with snapd?

Changed in nautilus (Ubuntu):
status: Incomplete → New
Revision history for this message
Casio (casiobearing) wrote :

Hi,
Again kind of new to recent Linux, so I'm not aware of using snap, but I think some stuff I have installed does (I've got Qt Creator, Visual Code, LibreOffice on the system).
The SD card is ext4 format.
Even though File manager shows the files\folders of the SD card I never see a mount point in /media for it, unlike as you do for USB sticks.
From my point of view a SD card should act exactly like a USB stick does from a file manager perspective - which this isn't doing.
Why isn't there a clear separation between all block devices and the rest of the OS, so that the Ubuntu front end can always act consistently regardless of the device, and so that all block devices are always developed and delivered against a consistent interface spec. It would make life a lot easier.
I'll read up on snapd in the meantime.

Revision history for this message
Casio (casiobearing) wrote :

I tried "sudo systemctl stop snapd" and it made no difference.

May 06 16:08:15 main udisksd[891]: Mounted /dev/mmcblk0p1 (system) at /mnt/mmc-SD128_0xda10bde9-part1 on behalf of uid 1000
May 06 16:08:15 main kernel: EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
May 06 16:08:15 main dbus-daemon[1848]: [session uid=1000 pid=1848] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.29' (uid=1000 pid=1987 comm="/usr/bin/gnome-shell " label="unconfi>
May 06 16:08:15 main dbus-daemon[1848]: [session uid=1000 pid=1848] Successfully activated service 'org.gnome.Shell.HotplugSniffer'
May 06 16:08:15 main nautilus[7108]: gtk_widget_set_visible: assertion 'GTK_IS_WIDGET (widget)' failed
May 06 16:08:21 main systemd[1]: mnt-mmc\x2dSD128_0xda10bde9\x2dpart1.mount: Deactivated successfully.
May 06 16:08:21 main udisksd[891]: Cleaning up mount point /mnt/mmc-SD128_0xda10bde9-part1 (device 179:1 is not mounted)
May 06 16:08:21 main udisksd[891]: Unmounted /dev/mmcblk0p1 on behalf of uid 1000
May 06 16:08:22 main kernel: mmcblk0: p1
May 06 16:08:22 main systemd-udevd[7168]: mmcblk0p1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/mmcblk0p1' failed with exit code 1.
main@main:~/Desktop$

Revision history for this message
Sebastien Bacher (seb128) wrote :

You don't need to investigate on snap which is a complex project, I've tagged the corresponding component to try to get some input from the corresponding maintainers

Revision history for this message
Casio (casiobearing) wrote :

This is reflecting a deeper problem - An SD Card is acting differently to a USB memory stick. From the users point of view (and file manager) both are block storage devices and should be acting exactly the same.
With a USB stick I see a mount point in /media/main with a disk label I gave it (FLASH-1GB). In file manager the USB Stick is listed with the same disk label - this is good.

Whereas for an SD card there is a mount listed in /mnt, but with an automatically generated partition name mmc-SD128_0xda10bde9-part1 but in file manager however it is listed with the file system label I gave it SD128-HOME. Not only confusing but means more code required in file manager to support such a difference.

I think the issue is not that snap is trying to do something that is causing an error but more that the file manager can't cope with block devices that aren't working in a consistent manner. If the SD card worked exactly the same as per a USB stick this would overall vastly simplify future system maintenance; less code in file manager, easier to test, and easier to incorporate new block devices.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.