Summary: | [cpufreq] AMD Kabini (AM1/FM1Sb) Frequency Switching Causes Crash | ||
---|---|---|---|
Product: | Base System | Reporter: | Brodey Dover <doverosx> |
Component: | amd64 | Assignee: | freebsd-amd64 (Nobody) <amd64> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | allanjude, clarenceho |
Priority: | Normal | ||
Version: | 9.2-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Brodey Dover
2014-05-02 23:00:00 UTC
I have the same problem with an AMD Athlon 5350 on Asrock AM1H-ITX. I did not verify the powerd solution yet. However, the experience is similar, shortly after booting the system would reset. I tried FreeBSD 10 release and stable, in both cases I activated powerd in the installation process and had the described reboot issue. I suspected a driver issue and switched to a FreeBSD 11 snapshot which works perfectly. I guess the reason is that powerd is not enabled on these snapshots. I also noticed that HPET isn't an eventtimer option in spite of it being enabled in the BIOS. [brodey@freenas] /# sysctl -a | grep eventtimer kern.eventtimer.choice: LAPIC(400) i8254(100) RTC(0) kern.eventtimer.et.LAPIC.flags: 15 kern.eventtimer.et.LAPIC.frequency: 50000961 kern.eventtimer.et.LAPIC.quality: 400 kern.eventtimer.et.i8254.flags: 1 kern.eventtimer.et.i8254.frequency: 1193182 kern.eventtimer.et.i8254.quality: 100 kern.eventtimer.et.RTC.flags: 17 kern.eventtimer.et.RTC.frequency: 32768 kern.eventtimer.et.RTC.quality: 0 kern.eventtimer.periodic: 0 kern.eventtimer.timer: LAPIC kern.eventtimer.activetick: 1 kern.eventtimer.idletick: 0 kern.eventtimer.singlemul: 2 I also note that one core has a different supported state (maybe this is an AMD implementation): hw.acpi.cpu.cx_lowest: C1 dev.cpu.0.cx_supported: C1/1/0 C2/2/400 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% 0.00% last 98us dev.cpu.1.cx_supported: C1/1/0 dev.cpu.1.cx_lowest: C1 dev.cpu.1.cx_usage: 100.00% last 235us dev.cpu.2.cx_supported: C1/1/0 dev.cpu.2.cx_lowest: C1 dev.cpu.2.cx_usage: 100.00% last 17us dev.cpu.3.cx_supported: C1/1/0 dev.cpu.3.cx_lowest: C1 dev.cpu.3.cx_usage: 100.00% last 16us Seeing C1 state supported and it's usage makes me wonder where my other wattage is being used. I think the GPU isn't being switched down. On Sat, May 3, 2014 at 5:17 AM, Jeremias Blendin <jeremias@blendin.org>wrote: > I have the same problem with an AMD Athlon 5350 on Asrock AM1H-ITX. I did > not verify the powerd solution yet. However, the experience is similar, > shortly after booting the system would reset. I tried FreeBSD 10 release > and stable, in both cases I activated powerd in the installation process > and had the described reboot issue. > I suspected a driver issue and switched to a FreeBSD 11 snapshot which > works perfectly. I guess the reason is that powerd is not enabled on these > snapshots. > I have the exact setup as jeremias (AMD 5350 and ASRock AM1H-ITX) and encountered the same problem. Disabling Core C6 in BIOS *or* turning off powerd in FreeBSD can avoid the reboot issue. Also found that disabling CPU throttling can avoid the issue even with C6 enabled and powerd running. I added this to /boot/loader.conf: hint.acpi_throttle.0.disabled=1 Here is my /etc/rc.conf, with powerd enabled and lowest C-state set to max: powerd_enable="YES" powerd_flags="-a adaptive" performance_cx_lowest="Cmax" economy_cx_lowest="Cmax" For reference, with C6 enabled in BIOS: root@bart:~ # sysctl dev.cpu | grep cx dev.cpu.0.cx_supported: C1/1/0 C2/2/400 dev.cpu.0.cx_lowest: C8 dev.cpu.0.cx_usage: 3.14% 96.85% last 3293us dev.cpu.1.cx_supported: C1/1/0 dev.cpu.1.cx_lowest: C8 dev.cpu.1.cx_usage: 100.00% last 42697us dev.cpu.2.cx_supported: C1/1/0 dev.cpu.2.cx_lowest: C8 dev.cpu.2.cx_usage: 100.00% last 3680us dev.cpu.3.cx_supported: C1/1/0 dev.cpu.3.cx_lowest: C8 dev.cpu.3.cx_usage: 100.00% last 36us However, with throttling disable, the reported lowest CPU freq is higher. With throttling: root@bart:~ # sysctl dev.cpu | grep freq dev.cpu.0.freq: 100 dev.cpu.0.freq_levels: 2050/5021 1850/4590 1650/3675 1443/3215 1400/2937 1225/2569 1200/2266 1050/1982 1000/1880 875/1645 800/1527 700/1336 600/1145 500/954 400/763 300/572 200/381 100/190 Throttling disabled: root@bart:~ # sysctl dev.cpu | grep freq dev.cpu.0.freq: 800 dev.cpu.0.freq_levels: 2050/5021 1850/4590 1650/3675 1400/2937 1200/2266 1000/1880 800/1527 In summary, to get around the issue while maximizing power saving, my current config is: - C6 enabled in BIOS - powerd running - CPU throttling disable hint.acpi_throttle.0.disabled=1 A change to disabled acpi_throttle by default was committed to -CURRENT in May of 2014 (10 months ago) https://svnweb.freebsd.org/changeset/base/r265329 and was merged to stable/10 in January https://svnweb.freebsd.org/changeset/base/r276986 |