Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu module broken by a commit #269

Open
kamysheblid opened this issue Feb 13, 2023 · 1 comment
Open

cpu module broken by a commit #269

kamysheblid opened this issue Feb 13, 2023 · 1 comment

Comments

@kamysheblid
Copy link

kamysheblid commented Feb 13, 2023

TLDR: How to Fix

The fix is to simply undo commit 910fa58

Cause

A commit 910fa58 from a year ago broke the cpu module for me as well as my modeline.

Specifically cpu.lisp (line 115)

(string-equal (alexandria:read-file-into-string (format nil "~A/type" x)) (format nil "x86_pkg_temp~%")))

This line is checking the /sys/class/thermal/thermal_zoneN/type (where N is a number) files to check if any of them contain the string "x86_pkg_temp". My type file does not contain that, it contains acpi instead. This causes my entire modeline to display Unable to expand mode line format string: #<TYPE-ERROR expected-type: REAL, and nothing else is displayed.

Simply undoing this commit fixes the cpu module and I dont get that error anymore.

Basically it causes *acpi-thermal-zone* var to be nil since it doesnt find any folder containing temperature information. This causes fmt-cpu-temp to let tempval be nil, then when it calls (bar-zone-color tempval *cpu-temp-med* *cpu-temp-hi* *cpu-temp-crit*) we get the following error:

The value
  NIL
is not of type
  REAL
when binding SB-KERNEL::N1
   [Condition of type TYPE-ERROR]

Because bar-zone-color was expecting a real number but got a null value.

@BenjaminMoraga
Copy link

I get the same error; is there a definitive solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants