You are not logged in.

#1 2024-03-09 12:43:30

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 189

Eject error trying to safely remove SD cards (/dev/mmc*) in Thunar

I am no longer able to unmount SD cards from my device's integrated SD card reader using Thunar.

I have tested this on a multitude of cards, both single- and multi-partition, all with the same result.

Ironically, when the SD card is unmounted I choose the option to 'Safely Remove', after receiving the error, this automatically mounts the SD card once again.

Safely remove an unmounted SD card

error

After receiving the eject error, journalctl -xe shows the mounting, unmounting:

Mar 09 12:34:35 BUNSEN-THINK udisksd[966]: Mounted /dev/mmcblk0p1 at /media/jimjamz/8765-4321 on behalf of uid 1000
Mar 09 12:35:02 BUNSEN-THINK systemd[1]: media-jimjamz-8765\x2d4321.mount: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit media-jimjamz-8765\x2d4321.mount has successfully entered the 'dead' state.
Mar 09 12:35:02 BUNSEN-THINK udisksd[966]: Cleaning up mount point /media/jimjamz/8765-4321 (device 179:1 is not mounted)
Mar 09 12:35:02 BUNSEN-THINK udisksd[966]: Unmounted /dev/mmcblk0p1 on behalf of uid 1000
Mar 09 12:36:32 BUNSEN-THINK kernel:  mmcblk0: p1
Mar 09 12:36:37 BUNSEN-THINK udisksd[966]: Mounted /dev/mmcblk0p1 at /media/jimjamz/8765-4321 on behalf of uid 1000

Sometimes, on some SD cards, I see the following in journalctl about the voltage switch signal, but don't always get this, and does not affect whether I get the eject error or not.
Here is the unmounting, attempted eject and subsequent auto-remount:

░░ The unit media-jimjamz-rootfs.mount has successfully entered the 'dead' state.
Mar 09 12:32:48 BUNSEN-THINK kernel: EXT4-fs (mmcblk0p2): unmounting filesystem.
Mar 09 12:32:48 BUNSEN-THINK udisksd[966]: Cleaning up mount point /media/jimjamz/rootfs (device 179:2 is not mounted)
Mar 09 12:32:48 BUNSEN-THINK udisksd[966]: Unmounted /dev/mmcblk0p2 on behalf of uid 1000
Mar 09 12:32:54 BUNSEN-THINK kernel: mmc0: card aaaa removed
Mar 09 12:33:16 BUNSEN-THINK kernel: mmc0: cannot verify signal voltage switch
Mar 09 12:33:16 BUNSEN-THINK kernel: mmc0: new ultra high speed SDR104 SDHC card at address aaaa
Mar 09 12:33:16 BUNSEN-THINK kernel: mmcblk0: mmc0:aaaa SC32G 29.7 GiB 
Mar 09 12:33:16 BUNSEN-THINK kernel:  mmcblk0: p1

Offline

#2 2024-03-10 06:40:39

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,652
Website

Re: Eject error trying to safely remove SD cards (/dev/mmc*) in Thunar

What happens if you leave Thunar out of the picture?
In a terminal run 'mount' to see what's mounted, 'umount <device>' to unmount, read 'man mount' for more...

Any hints in the output?

Alternatively, run Thunar from a terminal and look for error messages when mounting and unmounting devices.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#3 2024-03-15 16:30:25

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 189

Re: Eject error trying to safely remove SD cards (/dev/mmc*) in Thunar

I ran umount with the verbose tag on both partitions of the SD card.  Nothing bad reported.
I ran thunar from a terminal, and when I safely removed the partition from the Thunar window, I got the eject error again, but nothing was reported in the terminal:

jimjamz@BUNSEN-THINK:~$ sudo umount -v /media/jimjamz/rootfs 
umount: /media/jimjamz/rootfs (/dev/mmcblk0p2) unmounted
jimjamz@BUNSEN-THINK:~$ sudo umount -v /media/jimjamz/bootfs 
umount: /media/jimjamz/bootfs (/dev/mmcblk0p1) unmounted
jimjamz@BUNSEN-THINK:~$ thunar
jimjamz@BUNSEN-THINK:~$ 

Offline

#4 2024-03-15 19:04:01

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,138
Website

Re: Eject error trying to safely remove SD cards (/dev/mmc*) in Thunar

The eject message is because there is no ejection device for an SSD, I think...

https://askubuntu.com/questions/1389562 … -sg-driver

What happens if you click the "eject" icon in the sidebar?

Also, why are the labels bootfs and rootfs? What are on those drives?

Mine shows up in thunar as 128G Volume. Also it automounts when I plug it in and then the context menu shows "Unmount" and "Safely Remove". Unmount still shows the eject icon but shows a device unmounted notification, Safely Remove "ejects" it with a notification that "Device can be removed."


I don't care what you do at home. Would you care to explain?

Offline

#5 2024-03-16 17:52:31

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 189

Re: Eject error trying to safely remove SD cards (/dev/mmc*) in Thunar

Just to clarify, it's not an SSD (solid-state drive) that I'm trying to eject, but an SD (SecureDigital) card.

The laptop has an integrated SD card reader.

The eject error reported above is from both using the eject icon on the SD card (or one of its partitions) icons in the sidebar of Thunar, and/or selecting 'Safely Remove' from the right-click context menu on the same icon.  Same result.

The bootfs and rootfs partitions just happens to be the 2 partitions that comprise a raspberry pi OS distro imaged to the SD card.  I've tested this on other SD cards that are single partitions also, and with different filesystems (e.g. FAT32, EXT4...) but all with the same result.

Unmounting the SD card does the intended job, but attempting to eject results in an error then subsequently and automatically re-mounts the SD card.

Offline

#6 2024-03-18 04:56:57

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,652
Website

Re: Eject error trying to safely remove SD cards (/dev/mmc*) in Thunar

There might be some permissions issues here. You shouldn't need sudo to unmount a device that's mounted on a directory that belongs to you.

If you run 'mount' after mounting the problem card you might find a hint in the line that refers to the card.

Have a look at the permissions that are set on /media/jimjamz/rootfs and /media/jimjamz/bootfs


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#7 2024-03-18 13:17:53

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 189

Re: Eject error trying to safely remove SD cards (/dev/mmc*) in Thunar

The permissions for this card are a little mixed, as the bootfs (FAT32) partition has different permissions to that of rootfs(EXT4):

drwxr-xr-x   3 jimjamz jimjamz 4096 Jan  1  1970 bootfs
drwxr-xr-x  18 root    root    4096 Feb 29 03:22 rootfs

I should not have used sudo previously as that is confusing the matter surround eject issues, not mount/umount issues.
That said, both can be unmounted by me from the terminal without sudo:

jimjamz@BUNSEN-THINK:~$ umount /media/jimjamz/bootfs 
jimjamz@BUNSEN-THINK:~$ umount /media/jimjamz/rootfs 
jimjamz@BUNSEN-THINK:~$ 

Which would correctly correspond with being able to successfully unmount the partitions in Thunar (not run as root):
Screenshot-2024-03-18-13-03-59.png

I think the SD card with two partitions used above is making the issue more complicated than it needs to be.
For the sake of simplicity, I mentioned that I tried this on a 32GB SD card that has a single partition:
Screenshot-2024-03-18-13-07-45.png

Here is the mounted partition:

drwxr-xr-x   5 jimjamz jimjamz 32768 Jan  1  1970 8765-4321

and the full SD card as reported by fdisk:

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *     8192 62333951 62325760 29.7G  b W95 FAT32

I can unmount without sudo via the terminal, and I can unmount from the right-click context menu in Thunar.
However, when I choose 'Safely remove' from the same context menu, the eject error continues to persist:
Screenshot-2024-03-18-13-13-58.png

I don't think this is an issue with permissions on the mounted directory or with unmounting, but rather ejecting / safely removing from anything that is on /dev/mmc*.  USB drives / disks do not have this issue.

Offline

Board footer

Powered by FluxBB