Ege*_*ucu 11 suspend macbook sd-card 17.04
我已将 SD 卡连接到我的笔记本电脑,并将其用作我的主分区。当我打开我的计算机时,访问主文件夹和子目录没有问题,但是当我暂停它并恢复时,系统不会读取 SD 卡。所以它可能会冻结,迫使我重新启动机器以使一切重新工作。
一些有用的信息是:
一些进一步的信息:
$ sudo LC_MESSAGES=POSIX lshw -c storage
*-usb
description: Mass storage device
product: Card Reader
vendor: Apple
physical id: 3
bus info: usb@2:3
logical name: scsi1
version: 8.20
serial: 000000000820
capabilities: usb-3.00 scsi emulated scsi-host
configuration: driver=usb-storage maxpower=896mA speed=5000Mbit/s
$ lsusb -vd 05ac:8406 is:
Bus 002 Device 002: ID 05ac:8406 Apple, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x05ac Apple, Inc.
idProduct 0x8406
bcdDevice 8.20
iManufacturer 3
iProduct 4
iSerial 5
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 44
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 224mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 4
Run Code Online (Sandbox Code Playgroud)
主要区别还在于,在挂起之前lsblk显示我的sdb1设备(我的 SD 卡安装为/home)。唤醒lsblk命令未显示我的 SD 卡后,我无法访问文件/home夹中的文件。我也无法重新连接我的 SD 卡;它不被认可。
syslog – 最近的暂停发生在第 45263 行的“May 9 22:56:01”。
有趣的部分似乎是:
May 9 22:56:25 MacBookAir kernel: [ 5883.035573] PM: Finishing wakeup.
May 9 22:56:25 MacBookAir kernel: [ 5883.035575] Restarting tasks ...
May 9 22:56:25 MacBookAir kernel: [ 5883.035795] usb 2-3: USB disconnect, device number 2
[...snip...]
May 9 22:56:26 MacBookAir kernel: [ 5884.869838] usb usb2-port3: cannot disable (err = -32)
May 9 22:56:26 MacBookAir kernel: [ 5884.869942] xhci_hcd 0000:00:14.0: Cannot set link state.
May 9 22:56:26 MacBookAir kernel: [ 5884.869969] usb usb2-port3: cannot disable (err = -32)
Run Code Online (Sandbox Code Playgroud)有完全相同的问题。Windows 7-10 上也会出现这种情况。
解决方案:
sudo gedit /lib/systemd/system-sleep/usbc.sh
Run Code Online (Sandbox Code Playgroud)
然后将其粘贴到空文档中:
#!/bin/sh
case "$1" in
pre)
echo -n "0000:00:14.0" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
;;
esac
case "$1" in
post)
echo -n "0000:00:14.0" | tee /sys/bus/pci/drivers/xhci_hcd/bind
;;
esac
Run Code Online (Sandbox Code Playgroud)
保存并运行 chmod:
sudo chmod a+x /lib/systemd/system-sleep/usbc.sh
Run Code Online (Sandbox Code Playgroud)
然后重启并测试
小智 0
某些 USB HDD 具有强制其在闲置一段时间后进入睡眠状态的固件。也许这也是你的问题。
Automounter 能够唤醒设备 ( https://help.ubuntu.com/community/Autofs )。
我希望这能帮到您。
| 归档时间: |
|
| 查看次数: |
1392 次 |
| 最近记录: |