| 12 Mar 2023 |
Rampoina | In reply to @rampoina:matrix.org
[rampoina@nixos:~]$ cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 800 MHz - 3.90 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 800 MHz and 3.90 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 800 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
[rampoina@nixos:~]$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
powersave
powersave
powersave
you can see here it was set to performance | 17:07:50 |
Rampoina | but the freq was 800 | 17:08:01 |
Rampoina | oh no nvm | 17:08:08 |
Rampoina | it wasn't performance | 17:08:11 |
Rampoina | duh | 17:08:12 |
Rampoina | shouldn't musnix activate that? | 17:08:22 |
Rampoina | I have
musnix.enable = true;
musnix.kernel.realtime = true;
so why wasn't it set to performance :|
| 17:09:52 |
Rampoina | yeah I just rebooted, it's set to powersave | 17:19:36 |
Rampoina | sudo cpupower frequency-set -g performance works | 17:19:43 |
Rampoina | and it changes the frequency | 17:19:48 |
Minijackson | It might be set in your hardware-configuration.nix | 17:20:20 |
| * Rampoina checks | 17:21:18 |
Minijackson | but it's still weird, the powersave governor shouldn't just set the frequency to the minimum 😕 | 17:21:52 |
Rampoina | it definitely is set there | 17:22:05 |
Minijackson | https://github.com/musnix/musnix/blob/0bac3f9b14ac767d81c8b19134fb23e3959b8cef/modules/base.nix#L85 huh | 17:22:58 |
Rampoina | removing the line from hardware-configuration.nix didn't fix it | 17:45:26 |
Rampoina | this is getting really annoying | 18:14:41 |
Rampoina | setting it on configuration.nix doesn't do anything either | 18:14:53 |
Rampoina | but | 18:14:57 |
Rampoina | restarting the service applies the performance governor :| | 18:15:09 |
Rampoina | systemctl restart cpufreq.service | 18:15:21 |
Minijackson | what happens if you reboot, and run journalctl -xeu cpufreq ? | 18:16:27 |
Rampoina | let's see | 18:18:05 |
Rampoina | [rampoina@nixos:~]$ LANG=EN_US journalctl -xeu cpufreq
~
~
~
~
~
~
~
~
~
~
Mar 12 19:19:27 nixos systemd[1]: Starting CPU Frequency Setup...
â–‘â–‘ Subject: A start job for unit cpufreq.service has begun execution
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ A start job for unit cpufreq.service has begun execution.
â–‘â–‘
â–‘â–‘ The job identifier is 98.
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 0
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 1
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 2
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 3
Mar 12 19:19:29 nixos systemd[1]: Finished CPU Frequency Setup.
â–‘â–‘ Subject: A start job for unit cpufreq.service has finished successfully
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ A start job for unit cpufreq.service has finished successfully.
â–‘â–‘
â–‘â–‘ The job identifier is 98
| 18:22:04 |
Rampoina | [rampoina@nixos:~]$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
powersave
powersave
powersave
| 18:22:17 |
Minijackson | huh, it seems something or other overrides the governor in the boot process? | 18:22:49 |
Minijackson | journalctl -x -b 0 | rg 'gover|cpu|powersave' ? | 18:23:42 |
Minijackson | * journalctl -x -b 0 | rg -i 'gover|cpu|powersave' ? | 18:24:00 |
Rampoina | [nix-shell:~]$ LANG=EN_US journalctl -x -b 0 | rg 'gover|cpu|powersave'
Mar 12 19:19:18 nixos kernel: setup_percpu: NR_CPUS:384 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
Mar 12 19:19:18 nixos kernel: percpu: Embedded 57 pages/cpu s193920 r8192 d31360 u524288
Mar 12 19:19:18 nixos kernel: pcpu-alloc: s193920 r8192 d31360 u524288 alloc=1*2097152
Mar 12 19:19:18 nixos kernel: pcpu-alloc: [0] 0 1 2 3
Mar 12 19:19:18 nixos kernel: rcu: RCU restricting CPUs from NR_CPUS=384 to nr_cpu_ids=4.
Mar 12 19:19:18 nixos kernel: rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
Mar 12 19:19:18 nixos kernel: x86/cpu: SGX disabled by BIOS.
Mar 12 19:19:18 nixos kernel: thermal_sys: Registered thermal governor 'bang_bang'
Mar 12 19:19:18 nixos kernel: thermal_sys: Registered thermal governor 'step_wise'
Mar 12 19:19:18 nixos kernel: thermal_sys: Registered thermal governor 'user_space'
Mar 12 19:19:18 nixos kernel: cpuidle: using governor menu
Mar 12 19:19:20 nixos systemd-modules-load[544]: Module 'cpufreq_performance' is built in
Mar 12 19:19:22 nixos kernel: cryptd: max_cpu_qlen set to 1000
â–‘â–‘ Subject: A start job for unit cpufreq.service has begun execution
â–‘â–‘ A start job for unit cpufreq.service has begun execution.
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 0
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 1
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 2
Mar 12 19:19:29 nixos cpupower[814]: Setting cpu: 3
â–‘â–‘ Subject: A start job for unit cpufreq.service has finished successfully
â–‘â–‘ A start job for unit cpufreq.service has finished successfully.
Mar 12 19:19:29 nixos audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=cpufreq comm="systemd" exe="/nix/store/ahd7gadpy67gjiiqr2fwmhkf9wz7g2gw-systemd-251.12/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 12 19:20:34 nixos kernel: Modules linked in: af_packet ip6_tables xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 msr ip6t_rpfilter ipt_rpfilter xt_pkttype xt_LOG nf_log_syslog xt_tcpudp nft_compat uvcvideo snd_seq_midi snd_seq_midi_event videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_usb_audio nf_tables videodev intel_rapl_msr snd_usbmidi_lib uas libcrc32c mc input_leds nfnetlink mousedev joydev sch_fq_codel nvidia_uvm(PO) nvidia_drm(PO) intel_rapl_common nvidia_modeset(PO) intel_tcc_cooling x86_pkg_temp_thermal snd_hda_codec_realtek intel_powerclamp snd_hda_codec_generic snd_hda_codec_hdmi mei_pxp iTCO_wdt coretemp snd_hda_intel intel_pmc_bxt mei_hdcp snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec watchdog crc32_pclmul snd_hda_core mfd_core polyval_clmulni polyval_generic gf128mul snd_hwdep ghash_clmulni_intel ee1004 sha512_ssse3 sha512_generic snd_pcm drm_kms_helper e1000e aesni_intel
...
| 18:25:27 |
Rampoina | I skipped the module list, it's long | 18:26:01 |