Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2016 13:10:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 210235] sysutils/conky improve chances of getting CPU temperature
Message-ID:  <bug-210235-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210235

            Bug ID: 210235
           Summary: sysutils/conky improve chances of getting CPU
                    temperature
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: walter@pelissero.de
                CC: ntarmos@ceid.upatras.gr
             Flags: maintainer-feedback?(ntarmos@ceid.upatras.gr)
                CC: ntarmos@ceid.upatras.gr

conky, at least on my machine, fails to get the CPU temperature.
A change to freebsd.c improves the chances of finding something useful,
although possibly not from ACPI:

@@ -419,13 +423,14 @@
        int temp;
        (void)fd;

-       if (GETSYSCTL("hw.acpi.thermal.tz0.temperature", temp)) {
-               fprintf(stderr,
-                       "Cannot read sysctl
\"hw.acpi.thermal.tz0.temperature\"\n");
-               return 0.0;
-       }
-
-       return KELVTOC(temp);
+       if (0 =3D=3D GETSYSCTL("hw.acpi.thermal.tz0.temperature", temp))
+               return KELVTOC(temp);
+       if (0 =3D=3D GETSYSCTL("dev.cpu.0.temperature", temp))
+               return KELVTOC(temp);
+       if (0 =3D=3D GETSYSCTL("dev.amdtemp.0.core0.sensor0", temp))
+               return KELVTOC(temp);
+       fprintf(stderr, "Cannot read sysctl for temperature\n");
+       return 0.0;
 }

 static void get_battery_stats(int *battime, int *batcapacity, int *batstat=
e,
int *ac) {

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210235-13>