How to set SATA link power state to 'max_performance' on boot
Maxim Blinov
maxim.a.blinov at gmail.com
Sat Oct 8 17:47:52 UTC 2022
Hi all,
I've installed Ubuntu 22.04 Desktop on my machine and I'm very happy with it.
One problem I've encountered is that by default, the SCSI host
controller power management state is set to 'med_power_with_dipm'.
This causes the problem that SATA hot swap does not work.
To demonstrate, upon boot I can query the power management state for
my SCSI host as follows (`host5` just happens to be the node to which
my hot swap bay is connected to):
$ cat /sys/class/scsi_host/host5/link_power_management_policy
med_power_with_dipm
If I now try to plug/unplug my SATA drive, nothing happens in dmesg.
If I then set the SCSI host controller power management to
`max_performance', as below:
# echo 'max_performance' | tee
/sys/class/scsi_host/host5/link_power_management_policy
max_performance
If I *now* try to plug/unplug my SATA drive, I can see my drive
appearing/disappearing in dmesg every time.
My question then is, is there a 'correct' way I could configure Ubuntu
to set my SCSI host controllers to `max_performance` by default? I see
the file /etc/hdparm.conf, but I'm not sure if that's the 'right'
place to do it.
Best Regards,
Maxim Blinov
More information about the ubuntu-users
mailing list