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

FreeBSD: ACPI thermal device not found error #152

Closed
Neved4 opened this issue Nov 14, 2020 · 3 comments
Closed

FreeBSD: ACPI thermal device not found error #152

Neved4 opened this issue Nov 14, 2020 · 3 comments
Assignees
Labels
area:devices Related to sources of data bug Something isn't working os:freebsd
Milestone

Comments

@Neved4
Copy link

Neved4 commented Nov 14, 2020

Summary

temp: no device hw.acpi.thermal.tz0.temperature found error on startup.

ACPI system related parameters can be unreliable and depend heavily on hardware vendor implementations.

Proposal: silently tolerate missing acpi_thermal data if temperature module for builtin cpu sensor (e.g. coretemp, amdtemp) is loaded and available.

System details

  • System: FreeBSD 12.2-RELEASE
  • CPU: AMD Ryzen 9 3900X
  • Terminal: /dev/pts/10
  • Version: gotop-4.0.1

Steps to reproduce

$ gotop -V
2020/11/14 17:33:08 temp: no device hw.acpi.thermal.tz0.temperature found
2020/11/14 17:33:08 temp: no device hw.acpi.thermal.tz0.temperature found
2020/11/14 17:33:09 temp: no device hw.acpi.thermal.tz0.temperature found

Relevant logs

The ~/.cache/gotop/ logs are empty.


Notes

  1. The system monitoring tool glances was also tested: it does not seem to throw this error on startup.
@xxxserxxx
Copy link
Owner

Related to #130, I believe.

@Zeezee1210
Copy link

Zeezee1210 commented Dec 1, 2020

Is this not just a log line for missing hw.acpi.thermal.tz0.temperature ? Doesn't fail though?
If there is coretemp or amdtemp installed then the dev.cpu.0.temperature should be available and it registers that device.

These are the 2 entries looked for::
var sensorOIDS = map[string]string{ "dev.cpu.0.temperature": "CPU 0 ", "hw.acpi.thermal.tz0.temperature": "Thermal zone 0", }

And this is when it's processed and produces the log line mentioned:
for k, _ := range sensorOIDS { idx := strings.Index(string(bs), k) if idx < 0 { log.Printf("temp: no device %s found", k) } else { rv = append(rv, k) } } return rv

Looping though the OIDs it could miss the acpi entry, print the log line but then continue with the other OID.
Should only fail completely if both of those OIDs are missing.

If you want to remove the logging for this you could change to:
for k, _ := range sensorOIDS { idx := strings.Index(string(bs), k) if idx > -1 { rv = append(rv, k) } } return rv

@xxxserxxx xxxserxxx added this to the v4.1.1 milestone Jan 26, 2021
@xxxserxxx xxxserxxx added area:devices Related to sources of data bug Something isn't working os:freebsd labels Feb 3, 2021
@xxxserxxx xxxserxxx self-assigned this Feb 3, 2021
@xxxserxxx
Copy link
Owner

Ok. I don't see any reason why not to do it as suggested; it seems Caleb was trying to cover bases, not that we expect all devices to be available on FreeBSD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:devices Related to sources of data bug Something isn't working os:freebsd
Projects
None yet
Development

No branches or pull requests

3 participants