You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for a great script, it should do what I was looking for.. I just tested it with my USB disk, and I get this output - is that an error or is the disk powered off (the LED is still on so I think it's not):
$ sudo ./suspend-usb-device -v /dev/sdb
Found device /devices/pci0000:00/0000:00:1d.7/usb2/2-1 associated to /dev/sdb; USB bus id is 2-1
Syncing device /dev/sdb
synchronize cache(10): transport: Host_status=0x07 [DID_ERROR]
Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]
Sorry for the late reply. I hadn't been monitoring this account. It seemed that your device didn't response to sync and stop in a normal way. For now I can't do much about it since it's likely a device-specific issue. Have you tried other USB devices on that machine? So that we can see whether it's machine-specific or device-specific. Thanks.
Recently I reinstalled my laptop to Debian, I'm now trying with a different USB disk (WD).
The script output looks better:
Found device /devices/pci0000:00/0000:00:1d.7/usb2/2-1 associated to /dev/sdb; USB bus id is 2-1
Syncing device /dev/sdb
Stopping device /dev/sdb
Unbinding device 2-1
Checking whether /devices/pci0000:00/0000:00:1d.7/usb2/2-1 can be suspended
Suspending /devices/pci0000:00/0000:00:1d.7/usb2/2-1 by writing to /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/power/level
But in the /var/log/messages I see:
Sep 30 10:21:59 laptop kernel: [58941.352130] scsi 5:0:0:0: [sdb] Unhandled error code
Sep 30 10:21:59 laptop kernel: [58941.352137] scsi 5:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
Sep 30 10:21:59 laptop kernel: [58941.352147] scsi 5:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
Is that ok?
Btw when I get a chance I'll retry with the disk that I got the errors previously.
Hi, thanks for a great script, it should do what I was looking for.. I just tested it with my USB disk, and I get this output - is that an error or is the disk powered off (the LED is still on so I think it's not):
$ sudo ./suspend-usb-device -v /dev/sdb
Found device /devices/pci0000:00/0000:00:1d.7/usb2/2-1 associated to /dev/sdb; USB bus id is 2-1
Syncing device /dev/sdb
synchronize cache(10): transport: Host_status=0x07 [DID_ERROR]
Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]
Stopping device /dev/sdb
start stop unit: transport: Host_status=0x07 [DID_ERROR]
Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]
The text was updated successfully, but these errors were encountered: