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
33 stars 9 forks source link

Thread panic sometimes when attempting to fetch CPU info on Thinkpad X1 Nano Gen 1 #557

Open Camerooooon opened 6 months ago

Camerooooon commented 6 months ago

Describe the bug I'm getting a thread panic on my new Thinkpad X1 Nano Gen 1 sometimes when attempting to fetch CPU information. I think the problem is a kernel bug which prevents the data from being read however it should be handled properly instead of panicking.

To Reproduce Steps to reproduce the behavior:

  1. Run command 'acs get cpus'
  2. Received error

Expected behavior The os error 61 should be handled properly instead of panicking.

**Screenshots 20240222_12h09m04s_grim

Version autoclockspeed 0.1.11 installed with cargo install

I will work to fix this issue since it seems to be a hardware issue with my specific laptop and might be difficult to reproduce.

Camerooooon commented 6 months ago

20240222_12h17m44s_grim

Seems like the issue is with a certain thermal zone not reading properly on my system, I bet it is a known issue with my outdated firmware/bios which I haven't updated in a while. I'll try to fix the panic within auto-clock-speed either way then update my computer.

Camerooooon commented 6 months ago

Update: the thermal zone is now working and auto clock speed is functioning as expected now. We for sure need to improve error handling on this front because acs should not stop working just because one thermal zone cannot be read. I will work on this issue.

JakeRoggenbuck commented 6 months ago

Thanks!!