0

When I resume my Lenovo Yoga 3 Pro with UbuntuGNOME 16.04 the SD card in the reader is gone and is not remounted. In fact, the whole built in card reader is gone and doesn't show up in 'sudo lsusb' at all. I have to reboot the laptop to get the reader back and card mounted. Interestingly enough it works if use 'sudo acpitool --suspend' to suspend the laptop. When I resume after using acpitool instead on the bult in suspend the reader is there and the card gets mounted. I would really like to find out why acpitool does it correctly while Ubuntu itself "looses" the SD card reader and card. Maybe there's some kind of command I can run at resume to have the reader and card found again?

  • Do you have nvidia driver installed ? This is a long shoot but bugs.launchpad.net/ubuntu/+source/linux/+bug/1291969 suggest that you try to turn off screen lock. – iuuuuan Aug 9 '16 at 7:28
  • Thanks, no I do not have anything Nvidia on this laptop, it's all Intel although the built in card reader is from Genesys Logic. – Christian Aug 9 '16 at 11:27
0

I have found a solution, or workaround rather, for this problem. The card reader on this laptop is a USB3 device and as such prone to some problems under Linux. However, I have also found out that if I remove and start the card reader USB3 device in succession it's detected and mounted as normal. My finding is based on the information found here:

http://www.zedt.eu/tech/linux/restarting-usb-subsystem-centos/

So if I run a script containing the following:

#!/bin/sh

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

the card reader is detected and the card mounted as normal. I found the device ID "0000:00:14.0" with "sudo lsusb -v".

What I have not been able to do is have this run every time the laptop resumes from suspend. I assume it has to be run from /etc/pm/sleep.d but I have not been able to write a working script. If someone could show how I can write a script that is run every time the laptop resumes containing the three lines of code it would be very helpful. Right now I simply run the script when I resume to get the SD card back.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.