Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

[Hard Disk] Errors libata SSD and freezes randomly (Solved)

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
ZaPa
l33t
l33t
Posts: 833
Joined: Tue Feb 13, 2007 11:02 pm

[Hard Disk] Errors libata SSD and freezes randomly (Solved)

  • Quote

Post by ZaPa » Sun Oct 05, 2025 11:17 pm

Hello. I'm writing this message to help other forum users. I was getting too many kernel errors:

Code: Select all

oct 06 00:26:40 pc-desktop kernel: ata6.00: status: { DRDY }
oct 06 00:26:40 pc-desktop kernel: ata6.00: failed command: READ FPDMA QUEUED
oct 06 00:26:40 pc-desktop kernel: ata6.00: cmd 60/78:90:90:2b:20/00:00:32:00:00/40 tag 18 ncq dma 61440 in
                                              res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x10 (ATA bus error)
oct 06 00:26:40 pc-desktop kernel: ata6.00: status: { DRDY }
oct 06 00:26:40 pc-desktop kernel: ata6: hard resetting link
oct 06 00:26:41 pc-desktop kernel: ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
oct 06 00:26:41 pc-desktop kernel: ata6.00: configured for UDMA/133
oct 06 00:26:41 pc-desktop kernel: ahci 0000:01:00.1: port does not support device sleep
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#16 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=1s
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#16 Sense Key : Illegal Request [current] 
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#16 Add. Sense: Unaligned write command
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#16 CDB: Read(10) 28 00 32 20 2b 00 00 00 88 00
oct 06 00:26:41 pc-desktop kernel: I/O error, dev sda, sector 840968960 op 0x0:(READ) flags 0x80700 phys_seg 17 prio class 0
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#18 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=1s
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#18 Sense Key : Illegal Request [current] 
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#18 Add. Sense: Unaligned write command
oct 06 00:26:41 pc-desktop kernel: sd 5:0:0:0: [sda] tag#18 CDB: Read(10) 28 00 32 20 2b 90 00 00 78 00
oct 06 00:26:41 pc-desktop kernel: I/O error, dev sda, sector 840969104 op 0x0:(READ) flags 0x80700 phys_seg 15 prio class 0
oct 06 00:26:41 pc-desktop kernel: ata6: EH complete
Even after compiling for hours, it caused system freezes, requiring me to turn the computer off and on again for the hard drive to be detected by the motherboard (The hard drive was in a locked state. It had to be disconnected from the power supply to get it working again). This problem in others computers like my laptop (also with HD SSD), the problem is not so serious, but cause freezes randomly with i have many thinks working with the computer.

After searching for a lot of information, everywhere they said: "Change SATA or power cables, or a faulty hard drive."

The hard drive had recently been purchased and used for less than 24 hours, and i changed a lot of time cables and connect hard disk to other connectors in the motherboard... I even went so far as to change the power supply. All this with no results.


I finally found the solution:

By typing:

Code: Select all

 tail /sys/class/scsi_host/host*/link_power_management_policy
Result of command:

Code: Select all

med_power_with_dipm
So the solution for my desktop computer was:

Create the file:

Code: Select all

/etc/udev/rules.d/hd_power_save.rules
With this content:

Code: Select all

ACTION=="add", SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="performance"
and

Code: Select all

reboot

If you're experiencing random crashes with an SSD, and you've checked the RAM and other things and everything is OK, this could be the problem.

I'm leaving it here as a note for other forum users. I've been following this issue for a long time.

Best regards.

Source: https://bbs.archlinux.org/viewtopic.php?id=290615&p=2
https://wiki.archlinux.org/title/Power_ ... Management
--
http://www.monovarlinux.org. Información y experiencias con linux, especialmente con Gentoo.
Top
pietinger
Administrator
Administrator
Posts: 6635
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 06, 2025 12:28 am

ZaPa,

Thank you very much for this report. Let me add that this can also be changed via the kernel configuration (for those who configure gentoo-sources themselves):

Code: Select all

Device Drivers  --->
    [*] Serial ATA and Parallel ATA drivers (libata)  --->
        (0)     Default SATA Link Power Management policy
(== CONFIG_SATA_MOBILE_LPM_POLICY=0)

Instead of 1 (max_performance), I configured 0 myself, partly because this is the default setting:

Code: Select all

# grep . /sys/class/scsi_host/host*/link_power_management_policy
/sys/class/scsi_host/host0/link_power_management_policy:keep_firmware_settings
/sys/class/scsi_host/host1/link_power_management_policy:keep_firmware_settings
[...]
The default for our Gentoo distribution kernel may be set to 3.

Excerpt from the help text:
0 => Keep firmware settings
1 => No power savings (maximum performance)
3 => HIPM (Partial) and DIPM (Partial and Slumber)
Last edited by pietinger on Mon Oct 06, 2025 12:31 am, edited 1 time in total.
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6635
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 06, 2025 12:28 am

Moved from Kernel & Hardware to Documentation, Tips & Tricks.
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
ZaPa
l33t
l33t
Posts: 833
Joined: Tue Feb 13, 2007 11:02 pm

  • Quote

Post by ZaPa » Mon Oct 06, 2025 7:13 am

Thanks pietinger you for your contribution.

I think it's something worth taking into account. I was unaware of this configuration until today.

In my case, as I wrote in my post, it even crashed the SSD hard drive, causing my system to completely freeze. I had to turn off the power supply for a few seconds before the hard drive would be detected by the motherboard again.

From what I can see, this can also be configured in the kernel itself, setting it to '0' so the firmware itself can handle this, or to '1' for maximum performance...

Thank you very much!
--
http://www.monovarlinux.org. Información y experiencias con linux, especialmente con Gentoo.
Top
Chiitoo
Ninja Apprentice
Ninja Apprentice
User avatar
Posts: 3079
Joined: Sun Feb 28, 2010 5:36 pm
Location: Sore wa sore, kore wa kore... nanoda.

  • Quote

Post by Chiitoo » Mon Oct 06, 2025 8:16 am

Hm.

I have an WD Blue SN570 1TB M.2 drive, which sometimes disappears on me.

That is, it's simply gone, and being my root disk, everything kind of dies more or/and less horribly.

Usually the machine will end up doing something similar to what happens if I were to press the reset button, and after POST (if it manages to do that; there's been issues with that, too), the drive is not seen even in BIOS, until I power the whole thing off and on again.

In my case it doesn't seem like there is anything specific that triggers it (high load/no load), and it can take months to happen... but it certainly seems like it could be something power-related, so might give the performance setting a go (it seems I'm on the default self-configured kernel: 'keep_firmware_settings' currently).

Thank you!
Kindest of regardses.
Top
ZaPa
l33t
l33t
Posts: 833
Joined: Tue Feb 13, 2007 11:02 pm

  • Quote

Post by ZaPa » Mon Oct 06, 2025 3:10 pm

Chiitoo, in your case, I would try setting the value to 'performance.' Something similar to what you describe happened to me. If after this you continue with the problem, maybe you can change power supply to see if this the problem.

Maybe could be the problem with you WD BLUE, but, I have seen this problems in more than one computers.
--
http://www.monovarlinux.org. Información y experiencias con linux, especialmente con Gentoo.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic