Project

General

Profile

Feature #64077

Bring in FreeBSD AMD temperature patches

Added by Dwight Cavendish almost 2 years ago. Updated over 1 year ago.

Status:
Passed Testing
Priority:
No priority
Assignee:
Alexander Motin
Category:
OS
Target version:
Estimated time:
Severity:
Low
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

I am running FreeNAS 11.2 on an HPE Microserver Gen10 which has a soldered-on AMD Opteron X3216 CPU. I can't seem to find a way to read out the CPU's temperature. I got the following tunables:

amdtemp_load="YES" # for reading AMD CPU temperatures
hint.acpi_throttle.0.disabled="YES" # cool'n'quiet
hw.pci.realloc_bars="1" # needed for screen output on Microserver gen10

When I try to get a temperature reading:

# sysctl -a | grep -i temp
device  amdtemp
device  coretemp
net.inet6.ip6.use_tempaddr: 0
net.inet6.ip6.temppltime: 86400
net.inet6.ip6.tempvltime: 604800
net.inet6.ip6.prefer_tempaddr: 0
hw.sfxge.restart_attempts: 3
hw.usb.template: 0
kstat.zfs.misc.zcompstats.attempts: 16996

I tried several other things to grep for (e.g. 'cpu'), but all to no avail. Also, nothing shows up on the CPU temperature card in the new GUI. Can support for the temperature sensors in this CPU series be added?

tempsWorking.jpg (63.7 KB) tempsWorking.jpg Dwight Cavendish, 01/27/2019 02:50 AM
50689

History

#1 Updated by Dru Lavigne almost 2 years ago

  • Assignee changed from Release Council to Alexander Motin

#2 Updated by Alexander Motin almost 2 years ago

  • Status changed from Unscreened to Blocked
  • Reason for Blocked set to Need additional information from Author

We don't have much AMD CPUs experience, so I tend to propose you report issue upstream to FreeBSD, since FreeNAS 11.2 should be equivalent to FreeBSD 11.2 on this question. But just in case we miss something, please attach "System => Advanced => Save Debug" output, preferably after rebooting with verbose boot messages.

#3 Updated by Dwight Cavendish almost 2 years ago

Does this output contain any potentially sensitive information?

#4 Updated by Dru Lavigne almost 2 years ago

  • Private changed from No to Yes

Dwight: the ticket is now private so only the dev can see the output. Once he has the info he needs, he'll delete the debug from the ticket.

#5 Updated by Dwight Cavendish almost 2 years ago

  • File debug-squalus-20181215160122.tgz added

There. From what I could quickly find, enabling verbose boot messages is something I need to do from the bootloader. I cannot easily attach a screen/keyboard to my server, so I hope that this output will suffice.

#6 Updated by Dru Lavigne almost 2 years ago

  • Status changed from Blocked to Unscreened
  • Reason for Blocked deleted (Need additional information from Author)

#7 Updated by Alexander Motin almost 2 years ago

  • File deleted (debug-squalus-20181215160122.tgz)

#8 Updated by Alexander Motin almost 2 years ago

  • Status changed from Unscreened to Closed
  • Target version changed from Backlog to N/A
  • Reason for Closing set to Third Party to Resolve

As I can see, there are several variations of that CPU generation, and while FreeBSD supports temperature reporting for one of them, two others are different. As I understand, amdtemp driver would have to attach to device "hostb7 pnpinfo vendor=0x1022 device=0x1573", but that ID is not in the code. Aside of IDs code difference seems not big, but not a one liner, and require knowledge of the area and hardware for testing. I propose you to contact FreeBSD developers who worked on this driver (Conrad Meyer <> was there recently) to sound your interest and propose your help with testing. We'll be happy to include the code once it is available.

#9 Updated by Dru Lavigne almost 2 years ago

  • Private changed from Yes to No

#10 Updated by Dwight Cavendish almost 2 years ago

Thanks, I contacted Conrad on the matter.

Something else: on the dashboard, when I click on "reports" for CPU usage, temperature and load average I am lead to /reportsdashboard/cpu which has a CPU card that doesn't do anything. My browser console has the following error:

Object { error: 14, type: null, reason: "[EFAULT] rrdtool failed: ERROR: opening '/var/db/collectd/rrd/localhost//aggregation-cpu-sum/cpu-user.rrd': No such file or directory\n", trace: {…}, extra: null }

This seems to be similar to bug 27929. Is it safe to assume that this fails due to having no temperature sensor data? Or should I file this as a separate issue?

#11 Updated by Alexander Motin almost 2 years ago

It does not look like temperature related to me, but I may be wrong.

#12 Updated by Dwight Cavendish over 1 year ago

After contacting Conrad I filed this as a feature request at FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234657

#13 Updated by Dwight Cavendish over 1 year ago

Temperature sensor support for these CPUs is now available in CURRENT: https://svnweb.freebsd.org/base?view=revision&revision=342977

#14 Updated by Dru Lavigne over 1 year ago

  • Status changed from Closed to Unscreened

#16 Updated by Alexander Motin over 1 year ago

  • Status changed from Unscreened to In Progress
  • Target version changed from N/A to 11.3
  • Reason for Closing deleted (Third Party to Resolve)

I've just merged all AMD temperature patches from FreeBSD head down to stable/11. They will be part of FreeNAS 11.3. Should be in 11.3 nightly builds after the next regular merge.

#17 Updated by Alexander Motin over 1 year ago

  • Status changed from In Progress to Ready for Testing
  • Severity changed from New to Low
  • Needs Merging changed from Yes to No

I've merged fresh FreeBSD stable/11 to FreeNAS 11-stable. Next nightly build should include the changes.

Dwight, could you please test it, since we have no hardware for that?

#19 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Support for reading temperature sensors in AMD Opteron X3000 series CPUs? to Bring in support for reading temperature sensors in AMD Opteron X3000 series CPUs
  • Target version changed from 11.3 to 11.3-BETA1

#20 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Bring in support for reading temperature sensors in AMD Opteron X3000 series CPUs to Bring in FreeBSD AMD temperature patches

#21 Updated by Dwight Cavendish over 1 year ago

Alexander Motin wrote:

I've merged fresh FreeBSD stable/11 to FreeNAS 11-stable. Next nightly build should include the changes.

Dwight, could you please test it, since we have no hardware for that?

Great! I could certainly test it, although it could take a little time before I can fit this into my schedule.

I also was wondering whether it would be a feasible/acceptable test if I boot up the installer with the appropriate loader parameters, open a shell from there and test the sysctl output that way without actually installing a nightly build. Seeing that the installer runs the same kernel as FreeNAS itself (?) I think this would be the test method with the lowest impact on my end.

#22 Updated by Alexander Motin over 1 year ago

Yes, it should be possible to test it that way. Installer includes the same kernel as running system, just without additional modules. Fortunately the driver is linked as static part of the kernel.

#23 Updated by Dwight Cavendish over 1 year ago

50689

Today I booted up the installer from FreeNAS-11.3-MASTER-201901260931-106ba32.iso and I am happy to report that I am able to get temperature readings :) .

I read out the temperatures a couple of times to make sure the value wasn't stuck at something static (see attached picture). Prior to booting the installer, I also checked the temperatures in the bios. These were a little higher (around 26°C) than what was reported by the driver. All in all everything seems to behave exactly the same as what I observed with CURRENT from FreeBSD. I also used exactly the same loader parameters.

#26 Updated by Dwight Cavendish over 1 year ago

Since I haven't heard anything back for a while I was wondering: are you satisfied with my test results?

#27 Updated by Alexander Motin over 1 year ago

  • Status changed from Ready for Testing to Passed Testing

Thanks you, Dwight.

Also available in: Atom PDF