Opened 4 years ago
Last modified 4 years ago
#16504 new bug
My system with Intel J3455 runs always at 1.5 ghz
Reported by: | LowTech | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System | Version: | R1/beta2 |
Keywords: | Enhanced Intel SpeedStep J3455 | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
Hi, installed Haiku R1/beta2 on my mini pc along with Windows and Linux. Haiku runs fine except a tiny boot glitch (https://discuss.haiku-os.org/t/r1-beta2-uefi-boot-issue/9915/7) and no audio.
The bug report is about a different issue: the cpu clock stucks at a single frequency. Not only programs run slower than on Windows/Linux, also the cpu gets hot and the fan spins most of the time. The cpu seems switching never to 600/800 mhz when idle. (https://discuss.haiku-os.org/t/why-do-chess-engines-run-slow-on-haiku/9929/14)
Issue supporting Enhanced Intel SpeedStep Technology
2543 KERN: no valid cpufreq module found
Because of the missing cpufreq module, Haiku can't change neither to lower clocks (down to 800mhz) when idle, nor higher (up to 2.3ghz) under load.
The cpu J3455 runs the whole time at it's default frequency of 1.5ghz. Windows and Linux don't have this problem on the same real hardware.
Attachments (3)
Change History (27)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
ACEPC AK2 (https://iacepc.com/Index/cases/caseinfo?case_id=213)
CPU: Intel Celeron J3455 GPU: Intel HD Graphics 500 RAM: 4GB DDR3L Hard Disk 1: 64 GB EMMC Hard Disk 2: 256GB mSATA SSD Expansion options: Install 2.5-Inch HDD/SSD, SD Card Wi-Fi: 2.4G/5G Built-in Wi-Fi Bluetooth: BT 4.0
comment:3 by , 4 years ago
They seem to have quite poor firmware handling. Here is the closest to official info, you need a BIOS update with an EC (embedded controller) that can control fans: https://www.iacepc.com/forum/viewtopic.php?p=1073#p1073
We are too small to handle bad manufacturer fw, so I recommend upgrading your fw first. Unless you can switch hardware.
comment:4 by , 4 years ago
Thanks for looking into!
The included EC firmware is for a different system (AK3 with cpu J4125). The fan on the AK2 has no problem with other os. It seems normal that it spins more on Haiku, because the cpu clock is stuck at 1.5ghz.
Isn't clocking managed by the cpu itself and the os via ACPI? But not by the embedded controller? Would it help to add some Linux log files?
comment:5 by , 4 years ago
Linux:
~> cat dmesg.txt | grep EC:
[ 0.227017] ACPI: EC: EC started [ 0.227019] ACPI: EC: interrupt blocked [ 0.338580] ACPI: \_SB_.PCI0.SBRG.H_EC: Used as first EC [ 0.338584] ACPI: \_SB_.PCI0.SBRG.H_EC: GPE=0x2c, EC_CMD/EC_SC=0x66, EC_DATA=0x62 [ 0.338586] ACPI: \_SB_.PCI0.SBRG.H_EC: Boot DSDT EC used to handle transactions [ 0.391832] ACPI: EC: interrupt unblocked [ 0.391901] ACPI: EC: event unblocked [ 0.391927] ACPI: \_SB_.PCI0.SBRG.H_EC: GPE=0x2c, EC_CMD/EC_SC=0x66, EC_DATA=0x62 [ 0.391930] ACPI: \_SB_.PCI0.SBRG.H_EC: Boot DSDT EC used to handle transactions and events
~> cat dmesg.txt | grep error
[ 6.651025] EDAC pnd2: Failed to register device with error -22. [ 6.735578] EDAC pnd2: Failed to register device with error -22. [ 6.779803] EDAC pnd2: Failed to register device with error -22. [ 6.866720] EDAC pnd2: Failed to register device with error -22.
comment:6 by , 4 years ago
Windows (and often Linux) install hw specific drivers for fan control. Haiku doesn't, as it is a huge undertaking, so it relies on ACPI and EC to handle it. In almost all ACPI specs it is requirement that ACPI does handle fan control unless OS takes over so not sure if I'd trust this manufacturer.
If fw upgrade doesn't fix things I think your hardware is very unlikely to run Haiku well. You can try to figure out what drivers control CPU/fan in Linux and it might be possible for you to port those over.
comment:7 by , 4 years ago
Sorry for following up. I don't request some fan control for my pc, because it works perfect!
But, as the cpu runs at a single frequency, Intel Speedstep is broken on Haiku for this system.
From Intels website:
CPU - supported
Chipset - supported
Motherboard - supported
BIOS - supported, it does SpeedStep on Windows & Linux
Drivers - No specific software or driver updates are currently required.
OS - An OS must support Enhanced Intel SpeedStep Technology.
https://www.intel.com/content/www/us/en/support/articles/000007073/processors.html
What are the system requirements to support Enhanced Intel Speedstep® Technology? The CPU, chipset, motherboard, BIOS, Operating System, and software/drivers must support Enhanced Intel SpeedStep Technology. CPU: Consult the product specifications and comparisons to see which processors support Enhanced Intel SpeedStep Technology. Chipset: A motherboard with one of the following chipsets is required to support Enhanced Intel SpeedStep Technology: Intel® 910 / 915x / 925X / XE Express Chipset Family or Intel® 945x / 946x / 955X / 975 / 965 / 963 Express Chipset Family, Intel® 3 Series Chipsets, Intel® 4 Series Chipsets, Intel® 5 Series Chipsets, or Intel® 6 Series Chipsets. Motherboard: The system board must support Dynamic Voltage Identification (Dynamic VID). All Intel® Desktop Boards support Dynamic VID. For all others, contact your motherboard manufacturer for specific Dynamic VID support. BIOS: A BIOS must support Enhanced Intel SpeedStep Technology. For Boxed Intel® Desktop Boards, see Intel® Desktop Boards For all others, contact your motherboard manufacturer. Operating system: An OS must support Enhanced Intel SpeedStep Technology. Current supporting operating systems include: Microsoft Windows Vista*, Microsoft Windows XP SP2*, and Microsoft Windows 7*. Linux* support is also available. Contact your OS vendor for more information. Software/Drivers: No specific software or driver updates are currently required. However, we recommend that you always have the latest drivers for your system hardware.
comment:8 by , 4 years ago
This might or might not be relevant -- they seem to be studying a similar problem : https://github.com/genodelabs/genode/issues/3871
comment:9 by , 4 years ago
Sorry I misread the description. Then it seems very likely that it is something like ttcoder suggests. We do have a driver for intel cpus, but maybe the celerons are special in some way.
comment:10 by , 4 years ago
Also, please don't gzip text-attachments, it's not readable without downloading and unzipping then. So please re-upload uncompressed.
by , 4 years ago
Attachment: | syslog.txt added |
---|
by , 4 years ago
Attachment: | sysinfo.txt added |
---|
by , 4 years ago
comment:11 by , 4 years ago
Ups .. sorry. While moving back in the browser they got uploaded twice.
Don't know how to delete the *.gz and *2 files.
comment:12 by , 4 years ago
Can't see anything in logs, so maybe check if there is any thread that is at 100% all the time? Here is Haiku cpu idle info:
2543 KERN: no valid cpufreq module found 2544 KERN: using Intel C-States: C0, C1, C3, C4, C5, C6, C7 2545 KERN: found cpuidle module: power/cpuidle/intel_cstates/v1
comment:13 by , 4 years ago
And Linux:
312 [ 0.183370] cpuidle: using governor ladder 313 [ 0.183370] cpuidle: using governor menu ... 571 [ 1.016541] intel_idle: MWAIT substates: 0x11242020 572 [ 1.016543] intel_idle: v0.4.1 model 0x5C 573 [ 1.017098] intel_idle: lapic_timer_reliable_states 0xffffffff
Not sure if there is more I can contribute.
comment:14 by , 4 years ago
Isn't the message
2543 KERN: no valid cpufreq module found
the key to the problem?
Haiku calls neither for lower clocks (down to 800mhz) when idle, nor higher (up to 2.3ghz) when under load. Because of the missing cpufreq module! So the J3455 runs the whole time at it's default frequency of 1.5ghz.
For proper working, I would have expected a Haiku log entry with something like
KERN: found cpufreq module: power/cpufreq/intel_pstates ...
comment:15 by , 4 years ago
Description: | modified (diff) |
---|
comment:16 by , 4 years ago
With the help of @korli I could build a modified module intel_pstates
with my cpu model number 92 (0x5c) added at line 141 in intel_pstates.cpp
.
But this doesn't change anything. Get some strange results for Intel Celeron J3455 4-core cpu from function is_cpu_model_supported
:
intel_pstates debug output:
Cpu Vendor Family Model 0 0 9 48 1 1207495615 5 128 2 739248128 4 0 3 87 4294967295 0
Vendor was only correct for cpu 0, family and model never.
sysinfo shows these values:
4 Intel Celeron® J3455, revision 506c9 running at 1497MHz CPU #0: "Intel(R) Celeron(R) CPU J3455 @ 1.50GHz" Signature: 0x0506c9; Type 0, family 6, model 92, stepping 9
My added debug info in line 133 of function is_cpu_model_supported
from haiku/src/add-ons/kernel/power/cpufreq/intel_pstates/intel_pstates.cpp
:
dprintf("Debug: found model number %u\n", model); dprintf("Debug: found vendor %u\n", cpu->arch.vendor); dprintf("Debug: found family number %u\n", cpu->arch.family);
comment:17 by , 4 years ago
Did you build just the module or the whole haiku.hpkg?
You should have some lines like these in the syslog:
KERN: Welcome to kernel debugger output! KERN: Haiku revision: hrev54550+1+dirty, debug level: 2 KERN: CPU: no microcode provided KERN: CPU 0: type 0 family 6 extended_family 0 model 5 extended_model 2 stepping 2, string 'GenuineIntel' KERN: CPU 0: vendor 'Intel' model name 'Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz'
Do they show the right info or crazy numbers?
Notice that, if I'm right with #16517, you won't get any benefit until that is solved, anyway.
comment:18 by , 4 years ago
Did you build just the module or the whole haiku.hpkg?
Just the module.
I patched function is_cpu_model_supported
for my cpu. Now syslog has these lines:
KERN: using Intel P-States: min 8, max 15, boost 23 KERN: found cpufreq module: power/cpufreq/intel_pstates/v1 KERN: using Intel C-States: C0, C1, C3, C4, C5, C6, C7 KERN: found cpuidle module: power/cpuidle/intel_cstates/v1
But all bench testing witch chess engines still shows the same low results.
It seems, you are right with #16517. Other p-states are never activated and the cpu remains at it’s default clock 1.5ghz (p-state 15).
comment:20 by , 4 years ago
Thanks, with hrev54579 higher p-states (like 23 in my case) are now choosen by the system. All benchmarks deliver now better scores!
But I'm not sure, if lowering p-states (down to 8) is working too. At least, after >15 minutes running idle, my fan is still spinning at max speed.
comment:21 by , 4 years ago
Is "Power saving" marked/enabled in the processcontroller menu? It should work with HWP active. Do you have HWP on this CPU?
comment:22 by , 4 years ago
With "Power saving" disabled, we run at 2.3 ghz. If it's enabled, than 1.5 ghz seems the limit. At least that's what the benchmark results suggest.
The cpu doesn't support HWP (hardware p-state).
comment:23 by , 4 years ago
OK I think this is the current behavior for non-hwp CPUs. What do you think would be better?
comment:24 by , 4 years ago
A solution, where idle threads run at the lowest found p-state (8), comes to mind. Leave other threads on the p-state according to the selected power saving mode (on/off), how it's now.
But I'm very glad. It's no issue on my desktop (except fan noise) for me. Laptop users, with non-hwp cpus, may suffer from higher power drain on Haiku.
Please describe hardware, exact model is preferable.