Linux-ide Archive on lore.kernel.org
 help / color / Atom feed
* [Bug 205107] New: No HDD spindown/parking on shutdown
@ 2019-10-06 23:18 bugzilla-daemon
  2019-10-10  3:49 ` [Bug 205107] " bugzilla-daemon
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-06 23:18 UTC (permalink / raw)
  To: linux-ide

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

            Bug ID: 205107
           Summary: No HDD spindown/parking on shutdown
           Product: IO/Storage
           Version: 2.5
    Kernel Version: 5.0.0-25-generic
          Hardware: x86-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: IDE
          Assignee: io_ide@kernel-bugs.osdl.org
          Reporter: helder.armando@hotmail.com
        Regression: No

Created attachment 285371
  --> https://bugzilla.kernel.org/attachment.cgi?id=285371&action=edit
SDB SMART log

Greetings,

I've got an external Toshiba HDD in good conditions (USB 3.0 cable on USB 2.0
port) that I use to store backups and my work in.
Every time the system shuts down (either by terminal command or regular OS UI),
the system does not wait for the hdd to park/spin down (as seen by the systemd
logs), and instead, cuts the power off too early, making the disc make an acute
screeching sound as if by hard power cutoff.

I believe the same thing is happening to my internal hdd (second one on linux,
previous one was old and had the same problem), but I can't be sure as the
sound isn't too clear.

I have reported this bug to the distribution's bug tracker (Lubuntu) and
systemd, but I was requested to come here instead, as the problem must be down
to the kernel.

I have tested this on Linux Mint and the same has happened. As additional
information, both on Windows 10 and FreeBSD, this problem did not occur.

I'll attach smartctl logs for both HDDs. The logs say old_age and pre_fail, but
this is most likely not true, as I have bought them recently and smartctl
doesn't seem to be that smart at times.

I await your reply,
Hélder

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  2019-10-06 23:18 [Bug 205107] New: No HDD spindown/parking on shutdown bugzilla-daemon
@ 2019-10-10  3:49 ` " bugzilla-daemon
  2019-10-11 23:31 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-10  3:49 UTC (permalink / raw)
  To: linux-ide

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

Kaur Männamaa (kaurman@outlook.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kaurman@outlook.com

--- Comment #1 from Kaur Männamaa (kaurman@outlook.com) ---
(In reply to Hélder from comment #0)

> 
> 
> I'll attach smartctl logs for both HDDs. The logs say old_age and pre_fail,
> but this is most likely not true, as I have bought them recently and
> smartctl doesn't seem to be that smart at times.
> 

old_age and pre_fail indicate the type of the data given, they are not the
result of interpreting the data. Also, one of the logs seems to be missing
unless I missed something myself :)

Could you unmount (umount -v your/drive*?) and then power off the external
drive manually (udisksctl power-off -b /your/drive) and see if the problem
remains? You might also want to check that the drive indeed is / has remained
off before shutting down (hdparm -C /your/drive).

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-11 23:31 UTC (permalink / raw)
  To: linux-ide

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

--- Comment #2 from Hélder (helder.armando@hotmail.com) ---
Created attachment 285477
  --> https://bugzilla.kernel.org/attachment.cgi?id=285477&action=edit
SBA_SMARTCTL

sudo smartctl -a /dev/sda > sda_smartctl.txt
I have just run this.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-11 23:32 UTC (permalink / raw)
  To: linux-ide

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

Hélder (helder.armando@hotmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #285477|SBA_SMARTCTL                |SDA_SMARTCTL
        description|                            |

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  2019-10-06 23:18 [Bug 205107] New: No HDD spindown/parking on shutdown bugzilla-daemon
                   ` (2 preceding siblings ...)
  2019-10-11 23:32 ` bugzilla-daemon
@ 2019-10-11 23:35 ` bugzilla-daemon
  2019-10-11 23:45 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-11 23:35 UTC (permalink / raw)
  To: linux-ide

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

--- Comment #3 from Hélder (helder.armando@hotmail.com) ---
The Power-Off Retract Count seems to match the amount of times the computer has
shut down without notice. I have had the internal HDD for ~3 months, perhaps.
Manufacturing date is around March, if I remember correctly.

As a side note I forgot to include, the external HDD had been formatted on
Windows, so, unfortunately, it is still NTFS, but I don't think this influences
the problem's cause.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  2019-10-06 23:18 [Bug 205107] New: No HDD spindown/parking on shutdown bugzilla-daemon
                   ` (3 preceding siblings ...)
  2019-10-11 23:35 ` bugzilla-daemon
@ 2019-10-11 23:45 ` bugzilla-daemon
  2019-10-18 20:16 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-11 23:45 UTC (permalink / raw)
  To: linux-ide

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

--- Comment #4 from Hélder (helder.armando@hotmail.com) ---
I have just run those commands. The disk was unmounted and visibly shutdown.
The problem did not remain here, but it still does on regular shutdown.

Side note: I'm not sure if this is expected, but even when I use "shutdown -P
now", systemd appears to handle it still.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  2019-10-06 23:18 [Bug 205107] New: No HDD spindown/parking on shutdown bugzilla-daemon
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-18 20:16 UTC (permalink / raw)
  To: linux-ide

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

--- Comment #5 from Hélder (helder.armando@hotmail.com) ---
Anyone? As a temporary fix, I shut down all the devices before turning the
system off manually with the following code:

#!/bin/sh
sudo umount -v /dev/sdb*
sudo umount -v /dev/sdc*
sudo umount -v /dev/sdd*
sudo udisksctl power-off -b /dev/sdb
sudo udisksctl power-off -b /dev/sdc
sudo udisksctl power-off -b /dev/sdd
sudo umount -v /dev/sda*
sudo udisksctl power-off -b /dev/sda


It is not a real fix, though.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  2019-10-06 23:18 [Bug 205107] New: No HDD spindown/parking on shutdown bugzilla-daemon
                   ` (5 preceding siblings ...)
  2019-10-18 20:16 ` bugzilla-daemon
@ 2019-10-18 20:51 ` bugzilla-daemon
  2019-10-18 21:38 ` bugzilla-daemon
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-18 20:51 UTC (permalink / raw)
  To: linux-ide

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

--- Comment #6 from Kaur Männamaa (kaurman@outlook.com) ---
Apologies for the delay. I have not had time for the research my current (and
rather limited) knowledge of the matter requires :) So far I have found quite a
few descriptions involving external drives but the problem certainly isn't as
massive as what we've had before
(https://bugzilla.kernel.org/show_bug.cgi?id=7674).

We know now that in your case the drives remain off during shutdown if turned
off manually beforehand. It's not much but it's a piece of the puzzle
nevertheless.

You are using usb2, I found some reports of usb3 causing this. True, I have no
idea (at least off the top of my head) about the kernel version that was used
in these cases. In other words, such a problem can have all kinds of causes.

But while we're at it, are you sure you are not overthinking the problem? I
mean, from what I understood from your previous post, your other drive (sda)
was not affected by the issue? What about the others? In order to do any bug
hunting & get some knowledgeable people involved we must know exactly which
drives are affected. Nailing down the basics is crucial in deciding how much
attention (if any) the bug will get.

Some further questions:

You said you tested with Mint. I assume the kernel version was the same?
Could you perhaps play around some more? Try with a live version of something
(different kernel), maybe even try different systems.


As for your temporary fix, I would say it's a start and during my brief
research on the issue I've seen quite a few versions of it used. Perhaps
convert it into a systemd service to make the process smoother. It turns out
udisksctl supports unmounting too, so you could even make it look nicer if you
wanted to:)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 205107] No HDD spindown/parking on shutdown
  2019-10-06 23:18 [Bug 205107] New: No HDD spindown/parking on shutdown bugzilla-daemon
                   ` (6 preceding siblings ...)
  2019-10-18 20:51 ` bugzilla-daemon
@ 2019-10-18 21:38 ` bugzilla-daemon
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-10-18 21:38 UTC (permalink / raw)
  To: linux-ide

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

--- Comment #7 from Kaur Männamaa (kaurman@outlook.com) ---
I noticed that you have filed the bug under IDE. Why? The drivers are SATA as I
understand.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Linux-ide Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ide/0 linux-ide/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ide linux-ide/ https://lore.kernel.org/linux-ide \
		linux-ide@vger.kernel.org
	public-inbox-index linux-ide

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ide


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git