https://bugzilla.kernel.org/show_bug.cgi?id=205107 Alexis Murzeau (amubtdx@xxxxxxxxx) changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amubtdx@xxxxxxxxx --- Comment #17 from Alexis Murzeau (amubtdx@xxxxxxxxx) --- Hi, I think I have the same problem: Shutting down with a connected USB hard drive does not graceful park its head (according to ear and smart data). In smart data, "not graceful" means "Power-Off_Retract_Count" field is incremented. Linux 5.9, USB 3.0 hard drive WD Elements plugged on USB 3.0 port Model Family: Western Digital Elements / My Passport (USB, AF) Device Model: WDC WD20NMVW-11EDZS7 uname: Linux Debian2 5.9.0-1-amd64 #1 SMP Debian 5.9.1-1 (2020-10-17) x86_64 GNU/Linux Depending on when I plug the hard disk, the poweroff behavior regarding the disk isn't the same. It depends on if I've pluged the disk before booting Linux (while in GRUB) which produce the issue, or after having logged in where in that case there is no issue. But it seems that even when it does not emit clic sound and Power-Off_Retract_Count is not incremented, SMART data is lost it seems, as I would expected Start_Stop_Count, Power_Cycle_Count or Load_Cycle_Count to at least be incremented (as when using udiskctl). According to tests by setting manage_start_stop to 1, the head parking is done gracefully whatever when the hard disk was plugged. So setting manage_start_stop seems to be the way to fix this issue (or workaround it at least), but it seems never set by default for USB disks. I've compared with Windows' behavior in a VM and using Wireshark to monitor USB packets and I don't see any START_STOP SCSI command but it does park its head properly in all cases (even when booting with the hard disk already plugged in). When shutting down the Windows VM, the only packets I see are reads and writes. However I don't think I can properly see VM's hub related packets in wireshark (and the hard disk doesn't really spin down anyway). On linux side, I've tried to replace xhci_shutdown by xhci_remove, but the behavior is exactly the same. I don't know well how USB hard drives are supposed to be shutdown, I was thinking about the USB 3.0 U3 suspend mode or a ClearFeature, but that doesn't seem to be that easy to understand. I wonder if manage_start_stop shoud be enabled for USB hard disk by default ? According to docs, it should be kept disabled for shared SCSI disks, but I think USB disk are never shared. -- You are receiving this mail because: You are watching the assignee of the bug.