iMac mid 2011 overheating

I installed FreeBSD 14.2 in an iMac mid 2011 and so far, I noticed two issues. I was able to resolve one of them, related to drm-61-kmod, by installing a new package I built from the ports.

The other issue is that it gets extremely hot if don't resort of placing a running fan behind it.

The output of dmesg shows a line reading 'asmc0: model not recognized' and that's shown even after I placed the following line in loader.conf: asmc_load="YES" and rebooted the system.

With 'sysctl -a | grep fan' and got the following lines:
<6>[drm] External GPIO thermal controller with fan control
<6>[drm] External GPIO thermal controller with fan control
<6>[drm] External GPIO thermal controller with fan control
<6>[drm] External GPIO thermal controller with fan control

Then I entered 'sysctl -a | grep temperature' and got four lines showing the temperatures of four dev.cpu cores.

With 'sysctl -a | grep Thermal', the system returned:
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
dev.coretemp.3.%desc: CPU On-Die Thermal Sensors
dev.coretemp.2.%desc: CPU On-Die Thermal Sensors
dev.coretemp.1.%desc: CPU On-Die Thermal Sensors
dev.coretemp.0.%desc: CPU On-Die Thermal Sensors

I don't know what else I could do and I'd appreciate any advice.
 
I found this post comment from trev and, considering it can guide me to fix this problem, I did the following:
  • I downloaded from this webarchive dot org link the Apple Technician Guide for this mid-2011 iMac, which by the way is a 21.5-inch one, but since I'm poorly familiar with this kind of literature, I am afraid that I will take a long time to go through all the 200 and something pages of that guide, since a control-F on 'key' and on 'fan' did not give me any useful result. In case someone is well familiar with this type of guide and can pull up from its index where this information is, I would greatly appreciate in letting me know.
  • Next, I looked for the smcdump tool mentioned in that post but couldn't find it - since that post is a 5-year old one, I thought maybe it was deprecated or replaced by a new tool, but I found no reference that could confirm it was the case - again, if someone could point me to the right direction here, I would also thank.
  • Then I checked the dmesg file output from this mid-2011 iMac, which by the way is a 21.5-inch one, that I cared to keep a copy from when it had linux installed on it and in that file, I searched for 'smc' and for 'fan' and found the following lines:
    • [ 0.022108] ACPI: SSDT 0x000000008ED7C000 0000B1 (v01 APPLE SmcDppt 00001000 INTL 20061109)
    • [ 0.142605] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    • [ 6.993081] [drm] External GPIO thermal controller with fan control
    • [ 16.972868] applesmc: key=332 fan=3 temp=50 index=49 acc=0 lux=2 kbd=0
    • [ 16.972996] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
I would appreciate if someone could tell me if I am in a good path and, if so, what I should do next.
 
Considering the age, I would first look for mechanical problems.
Clogged fans, choked air inlets and lastly, expired thermal paste on the CPU, if not soldered to the board.

There are adhesive heat sinks which can be attached to hot running chips.
 
Thank you but I don't think that could be the case, please correct me if I'm wrong, because it's a refurbished machine that still has warranty and that was not overheating when using it with the old macOS system it came with, that I replaced with FreeBSD 14.2 about ten days ago.

I use it mainly to read and write texts, emails and occasionally I read news in internet and to watch a video that is no longer than this. I take the care to set a fan on another desk right behind it before joining a video conference which, by the way, is when I first noticed the overheating - quite intense resource use, I think.

In order to claim the warranty to check this issue, I will have to reinstall macOS. Yes, I considered that, reinstalled macOS but then, no overheating occurred under these circumstances. I reinstalled FreeBSD 14.2 and then this overheating happened again.
 
the reporting for coretemp(4) is in dev.cpu.n.% sysctl. So you can do stuff like
(in csh)
Code:
root@kg-v7:~ # foreach i ( 0 1 2 3 )
foreach? sysctl dev.cpu.$i.temperature
foreach? end
dev.cpu.0.temperature: 41.0C
dev.cpu.1.temperature: 41.0C
dev.cpu.2.temperature: 42.0C
dev.cpu.3.temperature: 42.0C
to get the temperature, or
Code:
root@kg-v7:~ # sysctl dev.cpu.0
dev.cpu.0.temperature: 41.0C
dev.cpu.0.coretemp.throttle_log: 0
dev.cpu.0.coretemp.tjmax: 105.0C
dev.cpu.0.coretemp.resolution: 1
dev.cpu.0.coretemp.delta: 64
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc
dev.cpu.0.cx_usage_counters: 8050620 0
dev.cpu.0.cx_usage: 100.00% 0.00% last 7255us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/1 C2/2/17
dev.cpu.0.freq_levels: 3067/73000 2933/65000 2800/59000 2667/53000 2533/49000 2400/45000 2267/40000 2133/37000 2000/34000 1867/31000 1733/29000 1600/27000 1467/25000 1333/24000 1200/23000
dev.cpu.0.freq: 3067
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.0.%location: handle=\_PR_.P001
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU
this might help you figure out where the trouble is, even if it isn't a cure.
 
Thank you. It's good to check the temperature, but can we get anything from the second output that you pasted that could hint towards a way to adjust the fan settings so that it could start running when one of these cores reach a given temperature?

I'm still puzzled about the 'asmc0: model not recognized' message, wondering if that could be a way to set the fan...
 
There is a windows stress app out there called Prime95.
It beats the snot out of the processor intentionally to raise the heat levels.

It sounds like your processor is being driven to its maximum performance, for whatever reason.
And is inadequately cooled for max performance.
That old Mac is most likely heat spec'ed for the casual user and not a heavy Fourier transform use.
Just a thought...

I do a huge amount of hardware service, so my inclination is ensuring the above are clean and clear.
It doesn't take much to apply a fresh bead of Arctic Silver or other top performing heat paste.
It almost sounds like the processor cooler is dependent upon the OS for instruction... and not getting it from FreeBSD like it gets from the Mac.
I'm not an Apple guy, so this is speculation on my part.

Do you have the option of bypassing the fan and wiring it directly to a 12v molex or other steady (non PCM) power source?
That would tell you right away if hardware or software.
This can cause other problems if the machine BIOS is dependent upon seeing the fan tach signal, and won't run without it.
 
Thank you. It's good to check the temperature, but can we get anything from the second output that you pasted that could hint towards a way to adjust the fan settings so that it could start running when one of these cores reach a given temperature?

I'm still puzzled about the 'asmc0: model not recognized' message, wondering if that could be a way to set the fan...
Look at /sys/dev/asmc/asmc.c -- may be you can add an entry for your iMac (I think you can find the model name via dmidecode).
 
Look at /sys/dev/asmc/asmc.c -- may be you can add an entry for your iMac (I think you can find the model name via dmidecode).
Thank you.

The model name is iMac12,1

I have two questions.

First, considering the following:

I noticed in that file that other models have some expressions (variables?) starting with 'ASMC_'
For example, a macbook Pro has:
"MacBookPro11,3", "Apple SMC MacBook Pro Retina Core i7 (2013/2014)",
ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS,
ASMC_MBP113_TEMPS, ASMC_MBP113_TEMPNAMES, ASMC_MBP113_TEMPDESCS

And a mac Mini has:
/* The Mac Mini 4,1 (Mid-2010) has no SMS */
{
"Macmini4,1", "Apple SMC Mac mini 4,1 (Mid-2010)",
ASMC_SMS_FUNCS_DISABLED,
ASMC_FAN_FUNCS,
ASMC_LIGHT_FUNCS_DISABLED,
ASMC_MM41_TEMPS, ASMC_MM41_TEMPNAMES, ASMC_MM41_TEMPDESCS

Would it be correct to enter for my iMac the following?
/* The iMac12,1 (Mid-2011) has no SMS */
{
"iMac12,1", "Apple iMac12,1 (Mid-2011)",
ASMC_SMS_FUNCS_DISABLED,
ASMC_FAN_FUNCS,
ASMC_LIGHT_FUNCS_DISABLED,
ASMC_IM41_TEMPS, ASMC_IM41_TEMPNAMES, ASMC_IM41_TEMPDESCS

In this other post, it's noted that the file /usr/src/sys/dev/asmc/asmcvar.h has to be patched.

I checked this file and I think it would make sense to edit it as well, is that correct?

If so, then I would appreciate some guidance here because I have no clue what to edit because having a look at the models I took as examples for the asmc.c file, I have the following in this other asmcvar.h file that I cannot figure out what to enter as for the "T...":

For the MacBookPro11,3:
#define ASMC_MBP113_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \
"TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \
"TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \
"TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \
"TG1d", "TH0A", "TH0B", "TH0F", "TH0R", \
"TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \
"TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \
"TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \
"Ts1S", NULL }

#define ASMC_MBP113_TEMPNAMES { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \
"TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \
"TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \
"TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \
"TG1d", "TH0A", "TH0B", "TH0F", "TH0R", \
"TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \
"TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \
"TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \
"Ts1S" }

#define ASMC_MBP113_TEMPDESCS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \
"TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \
"TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \
"TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \
"TG1d", "TH0A", "TH0B", "TH0F", "TH0R", \
"TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \
"TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \
"TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \
"Ts1S" }
And for the Macmini4,1:
#define ASMC_MM41_TEMPS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \
"TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \
"TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \
"TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \
"TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \
"TW0P", "Tm0P", "Tp0C", NULL }

#define ASMC_MM41_TEMPNAMES { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \
"TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \
"TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \
"TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \
"TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \
"TW0P", "Tm0P", "Tp0C", NULL }

#define ASMC_MM41_TEMPDESCS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \
"TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \
"TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \
"TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \
"TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \
"TW0P", "Tm0P", "Tp0C", NULL }
 
I checked this file and I think it would make sense to edit it as well, is that correct?

If so, then I would appreciate some guidance here because I have no clue what to edit because having a look at the models I took as examples for the asmc.c file, I have the following in this other asmcvar.h file that I cannot figure out what to enter as for the "T...":
May be you can look at https://github.com/torvalds/linux/drivers/hwmon/applesmc.c and related files and then try to find some correlation between linux and freebsd codes? Compare an existing entry with how linux handles it and then try to create freebsd code for your iMac based on how linux handles it. Probably not easy but that is how I would go around to doing this.
 
May be you can look at https://github.com/torvalds/linux/drivers/hwmon/applesmc.c and related files and then try to find some correlation between linux and freebsd codes? Compare an existing entry with how linux handles it and then try to create freebsd code for your iMac based on how linux handles it. Probably not easy but that is how I would go around to doing this.

Thank you. It could be a good idea but the link doesn't seem to be good...

1741741477091.png
 
I've found the reference about those Ts in the technician guide. They're sensors codes. I'll go through them and see how it goes.
 
Does the IMac runs it's original hardware? Original means when it was new it came with a 1TB Hdd. Or has someone changed the
original hdd to a newer ssd?
 
Does the IMac runs it's original hardware? Original means when it was new it came with a 1TB Hdd. Or has someone changed the
original hdd to a newer ssd?
Yes, it runs its original hardware.

On this one, however, original means when it was new, it came with a 500GB (7200 rpm) hard drive - it's the 2.5GHz one mentioned in the attached document.
 

Attachments

Back
Top