When shutting down PC, all mechanical hard-disks run down hard

ALERT!!! Danger of Hardware-crash!!!
(branch unstable)
Updating linux 6.1.55-1 to 6.1.59-1
Updating linux 6.5.5-1 to 6.5.8-1

When shutting down PC, all mechanical hard-disks
run down hard - parking heads as if the power goes out.
Click of death???
Versions 6.1.55 and 6.5.5 are fine

Same as linux66 but no body cares? :cold_face:

3 Likes

Did this only happen once?

Many of us didn’t reproduce the problem, but maybe only you did.

Did you check journalctl -p err -b -1 after the crash?
Can you figure out what the problem is?

This thread might provide some hints for a workaround:

https://forum.odroid.com/viewtopic.php?t=29069

By the way: Hard drives nowadays unload their heads from the disk onto ramps. This unload process can be heard as a click sound. There are two different kinds of unload processes:

  • Telling the drive to unload
  • Emergency retract after power is cut

Drives ought to be told to unload and given enough time before power is cut. If power is cut, they use the inertia of the platters to generate electricity to unload the heads. This is a less controlled process, resulting in a louder click sound. There might be more wear, but it’s probably no issue.

You could do

hdparm -y /dev/sdx

(using appropriate device name instead sdx) to listen to the normal unload sound. If you hear this after a shutdown, fine. If the shutdown sound is louder, then you are seeing an emergency retract. If you are getting emergency retracts, you could create a script or udev rule which automatically does hdparm -y on that drive before shutdown.

4 Likes

Always, I must say. In BIOS there is no enrtry for “soft-power-off”.

No entry. Its a hard shutdown instead of a soft shutdown.

That is exactly the case on my PC.
There are two INTERNAL (SATA) mechanical disks, one for manjaro as Archiv-Disk
and a second as Windoze D:\

And it is clearly due to the kernel updates! Shutdown methode changed??

Result: it is definitly the emergency retract after power is cut.

Could that be implemented in last kernel update - how to check and reverse?
EDIT:
last working kernel: 6.1.58 ==> 6.1.59 causes hard shutdown
Not helpful actions:
add to: bootparameters: tpm_tis.interrupts=0
add to: /etc/systemd/ systemd.conf.d/stop.conf “DefaultTimeoutStopSec=5s”

Maybe the libata changes in 6.1.59 then? These are also in 6.5.8. I suggest reporting it upstream.

https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.59

3 Likes

Intresting Topic here, what about this people who owns a silent case (like i do) and not able to tell the difference by sound about a normal/emergency shutdown on our HDD?

@GaVenga most of us use SSDs by now so HDDs are rare and almost none used on our end since years. Unstable branch normally has shipped all kernels when released. So reporting an update from 6.1.55 to 6.1.59 is not as much as helpful as with the exact update this happens.

Since you tell us also that for example 6.1.58 is fine but 6.1.59 not, that regression might have been introduced there. You can check in 6.1.59 release what got added and maybe report upstream against that patch which introduces the regression.

If the gap between the last working kernel and the first non-working is large, then you might need to do a git bisect to find the issue. You can find an example I did once here.


After briefly looking at 6.1.59 this might be your issue. Try to revert and report back. Also info like hwinfo --disk might give more details on your used hardware.

And I use a mechanical Disk as an internal Archiv.
And: if a data-write on a SSD is interrupted -==> data-loss possible.
And: I am not able to “report upstream”, sorry - otherwise I had done this…
Der Rest Ihrer Erklärungen sind bömische Dörfer für mich.
Andererseits möchte ich ungern zu openSuse konvertieren wegen
einer vermutlichen Kleinigkeit. :innocent:

1 Like

SSD and NVMe are affected too, some people reported
some SMART error values increase dramatically…

1 Like

On my side the Odroid shutdown script fixed the issue: odroid-xu4:troubleshooting:shutdown_script [ODROID Wiki]

It disables each device one by one on shutdown, and it does a normal proper shutdown without the noise of HDD destruction.

The SMART “Head Retract Cycle Count” attribute does not increase anymore on shutdown now.

2 Likes

Works, Thank you.
There are two disadvantages:

  1. the on-screen message during shutdon and/or reboot. Good to confirm its working…
  2. The parked drives will be started new at starting up from GRUB (spinning up Disk-Motor)…

The new procedure is different from eg. kernel 6.1.59 - if someone @philm is able
to teach it to the kernel fuzzis - I can’t do it. The old behavier is not so noisy anyway
EDIT: at reboot the drives do not need to be parked, the kernel 6.1.59 works correct,
only shutdown is not correct!

So now, we need to have this issue fixed. Problem seems to lie in the kernel. As Philm said we need to find the change that brought this problem in the kernel. Personally I’m not able to do a bisect I will need to learn, if I learn it it could take weeks, maybe month(s) (because I’m not a coder and it will be difficult to understand the changes). Anyone able to do it for us?

//EDIT: here is the changes page for kernel 6.1 (on my side the issue appeared on 6.5) kernel/git/stable/linux.git - Linux kernel stable tree

Either the change has been applied to both kernels at same time, or it comes from another package.

Searching for ata in the list of changes may lead to something. I see multiple change related to that.

//EDIT2: seems like similar changes have been added to kernel 6.5 indeed kernel/git/stable/linux.git - Linux kernel stable tree

//EDIT3: basically the multiple changes found when searching for ata in the list seem to correspond to what Philm posted

2 Likes

There are alot people still using HDD’s as Storage/Archiv, and SSD’s are the wrong medium for this :exploding_head:

5 Likes

Yes, I’m full SSD (in theory) but I have to download a 2TB archive since many years, and I had to buy a 8TB HDD for that, because reality is that I can not buy SSD for high volume storage it is too expensive, this is reality, and many people are still using HDD too (I have yet to download my archive, now I need fiber internet :disguised_face:). Still even if HDD were not common, ignoring an issue or undermining it is not the good stance about it.

2 Likes

That probably looks like only the SATA interface for SSD (SATA SSD) and HDD is affected.
NVME SSD does not use the SATA interface but PCIE interface/slot.

I can’t find a similar problem report about these current kernels on the Internet except Manjaro forum.
I doubt that these current Manjaro kernels with lots of (custom or old) patches caused the problem? Or I miss something?

2 Likes

Depending on the motherboard (its configuration?) and maybe the HDD itself, I guess it can have different behavior. Or it may be unrelated but Gavenga apparently tested switching kernel if I understood and confirmed the behavior change. I have NVIDIA so it is not as easy as just switching the kernel to have a working computer. I may try later if there is no confirmation that just switching the kernel with the current Testing update fixes the issue.

//EDIT: there is still the DKMS Nvidia package in repo so I guess I could try easily in the end.

Is this maybe a long term problem with our Linux Kernel, because im only use the stable branch and i checked my smart information yesterday and today on my HDD.

12 	Power Cycle Count
Count of full hard disk power on/off cycles. 	Old-Age 	Online 	100 	100 	0 	0x0000000009b5 	N/A 	2.485
192 	Power Off Retract Count
Count of power-off or emergency retract cycles 	Old-Age 	Online 	97 	97 	0 	0x000000001287 	N/A 	4.743

I just shutdown my PC yesterday after i saved the smart values and both values increased by 1. Is this normal behaviour?

I am on unstable. The issue ucurred when updating:
==> kernel 6.1.58-1 TO kernel 6.1.59.1
==> kernel 6.5.5-1 TO kernel 6.5.8-1
tested ==> kernel 6.6.0rc4-1 - same issue/merde

tested kernel 6.6.0rc4-1 AND kernel 6.6.0rc6-1 - same issue…