JakeRoggenbuck / auto-clock-speed

A utility to check stats about your CPU, and auto regulate clock speeds to help with either performance or battery life.
https://autoclockspeed.org
MIT License
36 stars 9 forks source link

Incorrect time #574

Open pibiba opened 3 days ago

pibiba commented 3 days ago

Acs shows incorrect time in log:

Auto Clock Speed daemon has been initialized in edit mode with a delay of 1000ms normally and 5000ms when on battery

Name    Max Min Freq    Temp    Usage   Governor
cpu0:   3100MHz 1200MHz 1197MHz 52C 8.82%   performance
cpu1:   3100MHz 1200MHz 1198MHz 54C 9.71%   performance
cpu2:   3100MHz 1200MHz 1198MHz 52C 5.10%   performance
cpu3:   3100MHz 1200MHz 1197MHz 52C 8.91%   performance

Battery: 99%
Condition: 45%
Turbo: enabled

ctrl+c to stop running

notice: 2024-10-15 03:57:38 -> State changed: Unknown -> Charging
notice: 2024-10-15 03:57:43 -> State changed: Charging -> Normal
notice: 2024-10-15 03:57:48 -> State changed: Normal -> Charging

Output of date and hwclock commands:

date        
Tue Oct 15 10:59:09 +07 2024
sudo hwclock --show
2024-10-15 10:59:18.532096+07:00

It is possible that acs uses the time set in BIOS, but I can't verify my guess because I use a thinkpad and a modified 1vyrain BIOS, in which date/time settings are not available:

Missing Date & Time in BIOS

This is a side effect of the Advanced Menu needing to go somewhere. You’re not blind. The Date & Time tab is gone. If you really need it, flash a fresh BIOS. You probably don’t though. Setting this in the OS propagates it to the BIOS, in both Windows and (all?) flavors of Linux.
JakeRoggenbuck commented 3 days ago

Thanks for finding this!

pibiba commented 3 days ago

No problem!

It seems that my guess was correct. I checked acs on a device where it is possible to set date/time in BIOS.

warn: 2024-10-15 06:33:10 -> Failed to detect a laptop battery
notice: 2024-10-15 06:33:10 -> State changed: Unknown -> BatteryLow

The time matches the one set in BIOS 82bd614f_20241015_133955837_5a65

Output of date and hwclock commands:

date
Tue Oct 15 13:32:18 +07 2024
sudo hwclock --show      
2024-10-15 13:32:30.232764+07:00