You are not logged in.

#1 2016-11-28 19:42:55

cdysthe
Member
Registered: 2009-11-20
Posts: 62

Getting a SD card to mount after waking from suspend.

Hi,

On my Lenovo Yoga 3 Pro I have a 240 GB SD card in the card reader (slim so it doesn't stick out) mounted at all times. I use it as additional (non critical) storage. This has worked well, but the problem is that after waking up from suspend the card isn't mounted again. I have to reboot to get the card to mount. Googling resulted in a script that restarts the USB system. Looks like this:

#!/bin/sh

cd /sys/bus/pci/drivers/xhci_hcd
echo -n "0000:00:14.0" > unbind
echo -n "0000:00:14.0" > bind

This results in the card getting mounted without having to reboot. It is not a very elegant solution but it's all I've got so the question is how do I get this to run every time I come back from suspend? If someone knows a better way to get the card to mount than this please let me know, but I guess I in all cases would have to find a way to run it when the system wakes up.

Offline

#2 2016-11-28 19:49:33

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Getting a SD card to mount after waking from suspend.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2016-11-28 20:28:15

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Getting a SD card to mount after waking from suspend.

Your approach looks heavy handed. Does this SD card reader disappear from lsusb or lsblk after suspend/resume but before running this script?

Offline

#4 2020-05-12 20:43:01

Rafael Castellar
Member
From: Brazil
Registered: 2017-05-11
Posts: 19

Re: Getting a SD card to mount after waking from suspend.

Hi guys! I'm facing this problem again, but this time I can't solve with these commands.

Offline

#5 2020-05-12 20:58:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: Getting a SD card to mount after waking from suspend.

Open a new topic and provide error messages and logs from your own system instead of bumping 3 year old threads: https://wiki.archlinux.org/index.php/Co … bumping%22

Closing.

Offline

Board footer

Powered by FluxBB