You are not logged in.

#1 2023-07-21 20:29:08

Perro Muerto
Member
Registered: 2018-08-10
Posts: 6

Automatically unmounting and remounting SD card on Arch Linux suspend

I have Arch Linux installed on a MacBook Air 6,2 early 2014. I can put it into suspend mode and wake it up correctly, but I need the following:

I have a memory card permanently inserted in the SD slot, and I need the system to unmount the memory card before entering suspend mode, and then remount it when it wakes up. Currently, it automatically mounts, and the output of the mount command shows it as follows:

/dev/sdb1 on /run/media/javier/extraUsers type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

Offline

#2 2023-07-21 21:03:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Automatically unmounting and remounting SD card on Arch Linux suspend

Theoretically you should be able to use sleep hooks.  I've never done this myself, and I've heard some people have had trouble getting this to work as advertised.

I'm curious though why you need the sd card unmounted while suspended.  Might it be removed?  Or ...

Last edited by Trilby (2023-07-21 21:04:37)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-07-21 21:12:11

Perro Muerto
Member
Registered: 2018-08-10
Posts: 6

Re: Automatically unmounting and remounting SD card on Arch Linux suspend

The SD card is fixed, and I cannot remove it. My intention is to mount it in fstab with user=1000, but it's still recognized as a USB drive. Therefore, I need the card to be unmounted when my system goes into suspend mode and remounted when it wakes up. This is what macOS used to do, and I want to replicate that behavior.

Offline

#4 2023-07-21 21:36:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Automatically unmounting and remounting SD card on Arch Linux suspend

Perro Muerto wrote:

My intention is to mount it in fstab with user=1000, but it's still recognized as a USB drive. Therefore, I need the card to be unmounted when my system goes into suspend mode

Huh?  Why "therefore"?  How are these two statements connected?  What does being unmounted while suspended have to do with granting access to your user through fstab?

If you don't take any action (to unmount it) what problems (if any) are you facing?

Last edited by Trilby (2023-07-21 21:37:21)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB