linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ide@vger.kernel.org
Subject: [Bug 205107] No HDD spindown/parking on shutdown
Date: Mon, 09 Nov 2020 22:18:57 +0000	[thread overview]
Message-ID: <bug-205107-11633-1wfSCZxC3j@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-205107-11633@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=205107

Alexis Murzeau (amubtdx@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amubtdx@gmail.com

--- Comment #17 from Alexis Murzeau (amubtdx@gmail.com) ---
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.

  parent reply	other threads:[~2020-11-09 22:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06 23:18 [Bug 205107] New: No HDD spindown/parking on shutdown bugzilla-daemon
2019-10-10  3:49 ` [Bug 205107] " bugzilla-daemon
2019-10-11 23:31 ` bugzilla-daemon
2019-10-11 23:32 ` bugzilla-daemon
2019-10-11 23:35 ` bugzilla-daemon
2019-10-11 23:45 ` bugzilla-daemon
2019-10-18 20:16 ` bugzilla-daemon
2019-10-18 20:51 ` bugzilla-daemon
2019-10-18 21:38 ` bugzilla-daemon
2020-01-06 21:31 ` bugzilla-daemon
2020-01-16 22:37 ` bugzilla-daemon
2020-01-17 14:20 ` bugzilla-daemon
2020-01-17 23:14 ` bugzilla-daemon
2020-01-18 23:39 ` bugzilla-daemon
2020-01-18 23:45 ` bugzilla-daemon
2020-01-18 23:47 ` bugzilla-daemon
2020-01-19  0:27 ` bugzilla-daemon
2020-02-04  1:41 ` bugzilla-daemon
2020-11-09 22:18 ` bugzilla-daemon [this message]
2020-11-09 22:33 ` bugzilla-daemon
2020-11-09 22:34 ` bugzilla-daemon
2020-11-09 22:39 ` bugzilla-daemon
2020-12-23 11:46 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-205107-11633-1wfSCZxC3j@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).