唤醒后Ubuntu无法读取SD卡


12

我已将SD卡连接到笔记本电脑,并将其用作家庭分区。当我打开计算机的电源时,到达主文件夹和子目录没有问题,但是当我挂起它并继续时,系统不会读取SD卡。因此它可能会冻结,迫使我重新启动计算机以使所有内容重新工作。

一些有用的信息是:

  • MacBook Air 2016
  • macOS Sierra和Ubuntu 17.04双启动
  • (在16.10上也发生了相同的问题)

一些进一步的信息:

$ 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

另外,主要区别在于,在挂起之前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)
    

如果您需要保密,最好在硬盘上具有/ home目录并对其进行加密。
user258532 '17

@ user258532我的隐私没有问题。我使用SD内存是因为我有m.2 sata ssd,它具有128 GB内存,其中60-70%属于macOS。
艾格·苏库

在挂起/唤醒之前和之后,您是否在lsusb输出中看到任何变化?
blvdeer

既然你仍然可以与您的系统进行交互唤醒后,你可以请包括的内容/var/log/pm-suspend.log,并/var/log/syslog在你的问题?如果问题不适合您,可以使用贴心服务
大卫·佛斯特

没有名为pm-suspend.log的日志文件。但是,我将syslog文件复制为pastebin。
Ege Sucu'5

Answers:



0

遇到了完全相同的问题。在Windows 7-10上也会发生。

解:

sudo gedit /lib/systemd/system-sleep/usbc.sh

然后将此粘贴到空文档中:

 #!/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

保存并运行chmod:

sudo chmod a+x /lib/systemd/system-sleep/usbc.sh

然后重启并测试

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.