You are not logged in.

#1 2023-10-23 14:40:26

albjimrui
Member
Registered: 2023-10-23
Posts: 5

[SOLVED] Arch shutdown powers off HDD abruptly

Hi all,

Some few days ago, my computer started making a weird noise when it turns off. I dual-boot with Windows and it does not produce that sound while shutting down from that OS. I am certain that this noise is produced by some bug of some package of arch.

Here you can hear the noise.

https://voca.ro/146FaW6yMjrA

I have opened the case and it looks like it comes from the HDDs. This sound is similar to the sound they produce when one interrupts the current abruptly.

Here is a post of someone else suffering the same bug as me in reddit:

https://www.reddit.com/r/archlinux/comm … _shutdown/

My kernel is: 6.5.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 19 Oct 2023 22:52:14 +0000 x86_64 GNU/Linux and my arch installation is fully updated.

Any idea on how to fix Arch so that it manages the HDDs properly again?

Last edited by albjimrui (2023-10-24 07:05:56)

Offline

#2 2023-10-23 16:14:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,346

Re: [SOLVED] Arch shutdown powers off HDD abruptly

Can we start with the journal?   Start the system up, log in, shut it down.  Reboot, use a paste bin ( http://wiki.archlinux.org/title/List_of … _services) to host the output of journalctl -b-1

For example, run :

journalctl -b-1 | curl -F 'file=@-' 0x0.st 

and post the link it provides here.

Also, is this a laptop?  A desktop? I assume these are rotating disks?  I also assume these are SATA.   You say 'HDDs'; I gather that means more than one.  Do they all do this? Are they all used by Linux (Do they all have volumes that are mounted)  Do all of the drives appear in the output of lsblk  ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2023-10-23 16:53:17

albjimrui
Member
Registered: 2023-10-23
Posts: 5

Re: [SOLVED] Arch shutdown powers off HDD abruptly

ewaller wrote:

Can we start with the journal?   Start the system up, log in, shut it down.  Reboot, use a paste bin ( http://wiki.archlinux.org/title/List_of … _services) to host the output of journalctl -b-1

For example, run :

journalctl -b-1 | curl -F 'file=@-' 0x0.st 

and post the link it provides here.

Also, is this a laptop?  A desktop? I assume these are rotating disks?  I also assume these are SATA.   You say 'HDDs'; I gather that means more than one.  Do they all do this? Are they all used by Linux (Do they all have volumes that are mounted)  Do all of the drives appear in the output of lsblk  ?

Thanks for your reply.

Here is the journalctl log for the last boot and shutdown. It did the noise once again.

https://0x0.st/HJUa.txt

As for my computer it is a PC. I have a NVMe drive at /dev/nvme0n1 that does not mount automatically and the following hard drives, all of them SATA:

/dev/sda HDD linux-swap and ext4 partition that mounts /home
/dev/sdb HDD ext4 partition for extra data at /mnt/Datos. Tested again without mounting this partition automatically and could hear the same noise.
/dev/sdc SSD with ntfs partition for windows. Not mounted automatically.
/dev/sdd SSD with ext4 partition that mounts / and boot partition

According to gsmartcontrol, all drives have passed a basic health check. I still think that it is some software bug of some kind. I first noticed the problem yesterday or the day before yesterday, and by chance I find that some other arch user has the same problem as me and posts it the same day on reddit.

Offline

#4 2023-10-23 17:11:41

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,346

Re: [SOLVED] Arch shutdown powers off HDD abruptly

Well, the journal looks fine.  Good news is that all of the file systems are indeed cleanly stopped and dismounted. 
Did you determine if all drives are going this, or is it a single drive?

Have you done any tuning with hdparm or sdparm ?  https://wiki.archlinux.org/title/Hdparm I have no SCSI drives on my system, so I cannot use this command.  But, if you look at the parameters for your drives with the -all switch, there may be some options for unloading the heads.
If yes, then stop it; if no, then try it  tongue

Is this really a problem?  It is possible to unload a flying head via a command over the bus while the drive is spinning.  If a drive is powered down while the heads are spinning, they are designed to unload and park the heads as part of their power down process.  As long as their file systems are cleanly dismounted (they are), I really would not worry about it.

Edit: Also, see https://superuser.com/questions/1319383 … %20happens.
What are the emergency retract counts?  Do they increment each time you shut down?

Last edited by ewaller (2023-10-23 17:18:06)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2023-10-23 17:35:31

seth
Member
Registered: 2012-09-03
Posts: 61,147

Re: [SOLVED] Arch shutdown powers off HDD abruptly

Assuming that the drive that makes the sound in question is sda (there 3 SATA drives) post the output of "smartctl -a /dev/sda", reboot and query smartctl again.
You basically want to know whether the emergency head retracts go hup.

Windows doesn't require/use /dev/sda for sure, so if that triggers the noise, there's really no surprise in that difference and parking the head will make sound sound of some kind.
I've an ultra-reliable seagate that hasn't produced issues in over a decade of quite some load (so It'll probably now die tomorrow - thanks for that…) and that does an almost scary "chinggg" when parking the head. That's really nothing to worry about.

You could also try to actively power down the HDD ("sudo hdparm -Y /dev/sda", PSA: do not "experiment" w/ hadparm, read the manpage for every parameter you put there. Also don't "irrc" them) and see whether that produces this sound.

Offline

#6 2023-10-23 19:08:02

albjimrui
Member
Registered: 2023-10-23
Posts: 5

Re: [SOLVED] Arch shutdown powers off HDD abruptly

I knew it was software related!

I downgraded the kernel from the 6.5.8 to the 6.5.7 and the problem is fixed. No more weird shutdown sound.

To downgrade I used the command

pacman -U linux-6.5.7.arch1-1-x86_64.pkg.tar.zst linux-headers-6.5.7.arch1-1-x86_64.pkg.tar.zst

with the packages I had in the cache.

So, the kernel introduces some regression.  Where should I submit a bug report considering that I have no "log-proof" so to speak and I only hear a weird sound when turning off the computer?

Also, should I mark the thread as [Solved] as well? It worked for me, but I find downgrading the kernel a temporary fix.

Offline

#7 2023-10-23 20:00:50

seth
Member
Registered: 2012-09-03
Posts: 61,147

Re: [SOLVED] Arch shutdown powers off HDD abruptly

lkml/bugzilla.kernel.org are going to ask you for a bisect to identify the breaking commit.
Did you test whether suspending the drive causes this sound?

Offline

#8 2023-10-24 07:05:35

albjimrui
Member
Registered: 2023-10-23
Posts: 5

Re: [SOLVED] Arch shutdown powers off HDD abruptly

There is currently an open bug in https://bugs.archlinux.org/task/80064, where another user has reported the same bug as I, and there is also a related upstream bug https://bugzilla.kernel.org/show_bug.cgi?id=218038 in the kernel which might be related to this problem.

All in all, a solution is underway and we will have an updated kernel that has this problem fixed. I am marking this thread as solved.

Offline

#9 2023-10-24 07:34:43

seth
Member
Registered: 2012-09-03
Posts: 61,147

Re: [SOLVED] Arch shutdown powers off HDD abruptly

And all are asking for a git bisict, but loqs has suggested https://git.kernel.org/pub/scm/linux/ke … f71af1a35b and it looks heavily related.
You want to test w/ that patch reverted and communicate the results upstream.

Offline

#10 2023-10-24 08:20:43

loqs
Member
Registered: 2014-03-06
Posts: 18,296

Re: [SOLVED] Arch shutdown powers off HDD abruptly

6.5.8.arch1 with bbbf096ea227607cbb348155eeda7af71af1a35b reverted:
https://drive.google.com/file/d/1bpoqz9 … sp=sharing linux-6.5.8.arch1-1.1-x86_64.pkg.tar.zst
https://drive.google.com/file/d/1m2L4vG … sp=sharing linux-headers-6.5.8.arch1-1.1-x86_64.pkg.tar.zst

Offline

#11 2023-10-24 09:59:13

albjimrui
Member
Registered: 2023-10-23
Posts: 5

Re: [SOLVED] Arch shutdown powers off HDD abruptly

Thank you for your reply.

I have installed the kernels proposed in this thread and the problem disappears

sha256sum *
983359f4e75ce26c2b2a1679e23d2b9a6634d9319e11532d27028d0b9fd4398a linux-6.5.8.arch1-1.1-x86_64.pkg.tar.zst
bdc7be2b0872fc3f84e6eb859e436ae55d62cb65a3b84f5a612d0307b1b48e5e linux-headers-6.5.8.arch1-1.1-x86_64.pkg.tar.zst

uname -r
6.5.8-arch1-1.1

Therefore, that commit is the offending one.

Offline

Board footer

Powered by FluxBB