Port-amd64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD on Intel N100
On Sat, Aug 8, 2026 at 1:10 PM RVP <rvp%sdf.org@localhost> wrote:
>
> On Wed, 5 Aug 2026, Jukka Marin wrote:
>
> > I have tried 10.1 and 11 on a mini-PC with Intel N100 CPU. NetBSD runs
> > well and I was able to install pfSense in a virtual machine without
> > problems, but then I noticed that the system was running a bit slow.
> > I believe the reason is that the CPU clock is fixed at 800 MHz although
> > the CPU supports turbo modes up to 2-3 GHz.
> >
> > Here's what sysctl says:
> >
> > machdep.cpu.frequency.target = 801
> > machdep.cpu.frequency.current = 801
> > machdep.cpu.frequency.available = 801 800 700
> >
> > So, no higher frequencies than 800 MHz are available. I tried disabling
> > ACPI stuff in BIOS, but nothing changed. Under l*, the CPU clock goes
> > up to around 3 GHz under load and to 600 or 700 MHz when the system is
> > idle.
> >
> > Is there something I could do to make dynamic clock speed working?
> >
>
> It probably already is, but, on NetBSD, the actual current CPU frequency isn't
> being shown. See:
>
> sys/arch/x86/acpi/acpi_cpu_md.c:1068 -> cpufreq_get() ->
> sys/kern/subr_cpufreq.c:272 -> cpufreq_get_raw() ->
> sys/kern/subr_cpufreq.c:310 -> cf_get_freq() ->
> sys/dev/acpi/acpi_cpu.c:309 -> acpicpu_pstate_get() ->
> sys/dev/acpi/acpi_cpu_pstate.c:845 -> acpicpu_md_pstate_get() ->
> sys/arch/x86/acpi/acpi_cpu_md.c:711-740
>
> Code like FreeBSD's will need to be added for a new sysctl
> (machdep.cpu.frequency.real)?:
>
> https://github.com/freebsd/freebsd-src/blob/main/sys/x86/x86/cpu_machdep.c#L421
>
> If you're OK with ballpark values, then you could do the same thing in userspace
> as well.
>
> > I tested OpenBSD as well, but it had the same problem.
> >
>
> Did you also check (on OpenBSD):
>
> sysctl hw.sensors | fgrep freq
>
> -RVP
Hi,
If you have estd utility for dynamic frequency control from pkgsrc, I
believe it should be disabled and it is not useful for the for the
turbo modes, it depends only on older technologies and what sysctl
exposes.
Otherwise CPU should in theory control frequency itself if enabled...
The question is if BIOS provides this option to enable it (Intel Speed
Shift or some P states, I am not sure?) and what are default values
for the system...
On short research, it is basically some MSRs which controls the "mode"
on Intel CPUs, and Linux/FreeBSD seemingly has some code to check MSR
features and enables those bits.
NetBSD doesn't do that, so I guess it depends on defaults... I think
with right skills or using AI you can write C program to show 0x770
MSR value (maybe even write one to set required MSRs, but just
speculation now).
And yeah, I am not sure if NetBSD has any reliable CPU frequency
source, at least by default...
Regards,
Andrius V
Home |
Main Index |
Thread Index |
Old Index