linrunner / TLP

TLP - Optimize Linux Laptop Battery Life
https://linrunner.de/tlp
GNU General Public License v2.0
2.51k stars 129 forks source link

DISK_APM_LEVEL_ON_**= floods log irrespective of its value #744

Closed KAGEYAM4 closed 11 hours ago

KAGEYAM4 commented 3 weeks ago

Describe the bug Using default config values for DISK_APM_LEVELON and using AHCI_RUNTIME_PMON=auto results in sda flooding the logs for Starting,Synchronization,Stopping.

Jun 04 13:26:14 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:26:14 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:26:40 ArchLinux kernel: sd 5:0:0:0: [sda] Synchronizing SCSI cache
Jun 04 13:26:40 ArchLinux kernel: sd 5:0:0:0: [sda] Stopping disk
Jun 04 13:26:41 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:26:41 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:26:41 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:27:07 ArchLinux kernel: sd 5:0:0:0: [sda] Synchronizing SCSI cache
Jun 04 13:27:07 ArchLinux kernel: sd 5:0:0:0: [sda] Stopping disk
Jun 04 13:27:13 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:27:13 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:27:13 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:27:39 ArchLinux kernel: sd 5:0:0:0: [sda] Synchronizing SCSI cache
Jun 04 13:27:39 ArchLinux kernel: sd 5:0:0:0: [sda] Stopping disk
Jun 04 13:27:42 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:27:42 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk
Jun 04 13:27:42 ArchLinux kernel: sd 5:0:0:0: [sda] Starting disk

Expected behavior No flooding of logs for default values. The log also get flooded when using DISK_APM_LEVEL_ON_BAT="254 254".

To Reproduce

Steps to reproduce the unexpected behavior:

  1. Does the problem occur on battery or AC or both? Yes it happens in both with default values. I explictitly tested with tlp bat & tlp ac.
  2. Actions to reproduce the behaviour Using default config values for this expect forcing BAT profile on both AC and BAT
  3. **Full output of tlp-stat https://gist.github.com/KAGEYAM4/88d81f1e18e9e0fca2ca64f4190ca415

Additional context FAQs states that -> Unfortunately drive vendors interpret the APM levels quite spaciously to save power. Solution: try values > 128.

But the problem is that when i disable runtime_power_management (AHCI_RUNTIME_PMON**=on), and check the value of my ssd ( i also restarted my laptop ) ->

[phoenix@ArchLinux ~]$ sudo hdparm -I /dev/sda | grep 'Advanced power management level'
    Advanced power management level: 128

It shows the same value that tlp uses, but with this logs do not get flooded.

But logs get flooded when i eable runtime_power_management (AHCI_RUNTIME_PMON**=auto) and the value of DISK_APM_LEVEL_ON_BAT="254 254" or "128 128"

Are there any other factors that affect this behaviour?

linrunner commented 2 weeks ago

I have no idea. Personally, I would do without APM in this case, e.g.

DISK_APM_LEVEL_ON_AC=""
DISK_APM_LEVEL_ON_BAT=""

There is an older FAQ entry where a Crucial SSD does not like APM: https://linrunner.de/tlp/faq/disks.html#why-is-my-crucial-m4-ssd-so-slow-on-battery

linrunner commented 11 hours ago

I'm closing due to inactivity. If you have any new information, please continue here.