Power and voltage monitoring via ryzen-smu - module not loading

Good day,

Noticed ryzen-smu has been added to the Extra Repo recently, previously it was only available from the AUR.
Though I could never get the module to load when building it from the AUR.

Tested the package again now it’s in Extra and running into the same issue:
modprobe: FATAL: Module ryzen_smu not found in directory /lib/modules/6.9.5-1-MANJARO

A quick find -name ryzen_smu did not result into any hits.

Adding ‘Kernel-modules’ and debugging them is not something I have lots experience with if any.

Any help is appreciated

inxi -v7azy
System:
  Kernel: 6.9.5-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.9-x86_64
    root=UUID=c2c92475-3f6d-43c2-9ed5-ce58e4c5b93f rw plymouth.enable=0
    disablehooks=plymouth quiet splash udev.log_priority=3 amd_pstate=passive
    amd_pstate.shared_mem=1 amd_prefcore=enable
    amdgpu.ppfeaturemask=0xffffffff
  Desktop: KDE Plasma v: 6.0.5 tk: Qt v: N/A info: frameworks v: 6.3.0
    wm: kwin_wayland vt: 1 dm: SDDM Distro: Manjaro base: Arch Linux
Machine:
  Type: Desktop Mobo: Micro-Star model: B450 TOMAHAWK MAX (MS-7C02) v: 1.0
    serial: <superuser required> uuid: <superuser required> UEFI: American
    Megatrends LLC. v: 3.D0 date: 04/01/2022
Battery:
  Message: No system battery data found. Is one present?
Memory:
  System RAM: total: 32 GiB available: 31.27 GiB used: 6.69 GiB (21.4%)
  Message: For most reliable report, use superuser + dmidecode.
  Array-1: capacity: 128 GiB slots: 4 modules: 2 EC: None
    max-module-size: 32 GiB note: est.
  Device-1: Channel-A DIMM 0 type: no module installed
  Device-2: Channel-A DIMM 1 type: DDR4 detail: synchronous unbuffered
    (unregistered) size: 16 GiB speed: 3600 MT/s volts: note: check curr: 1
    min: 1 max: 1 width (bits): data: 64 total: 64 manufacturer: G.Skill
    part-no: F4-3600C16-16GVKC serial: N/A
  Device-3: Channel-B DIMM 0 type: no module installed
  Device-4: Channel-B DIMM 1 type: DDR4 detail: synchronous unbuffered
    (unregistered) size: 16 GiB speed: 3600 MT/s volts: note: check curr: 1
    min: 1 max: 1 width (bits): data: 64 total: 64 manufacturer: G.Skill
    part-no: F4-3600C16-16GVKC serial: N/A
CPU:
  Info: model: AMD Ryzen 7 5700X bits: 64 type: MT MCP arch: Zen 3+ gen: 4
    level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)
    model-id: 0x21 (33) stepping: 2 microcode: 0xA201205
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB L3: 32 MiB
    desc: 1x32 MiB
  Speed (MHz): avg: 553 high: 571 min/max: 550/4822 boost: enabled scaling:
    driver: amd-pstate governor: conservative cores: 1: 550 2: 550 3: 550 4: 550
    5: 550 6: 550 7: 550 8: 550 9: 550 10: 568 11: 550 12: 568 13: 550 14: 550
    15: 550 16: 571 bogomips: 108836
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de debug_swap decodeassists erms extapic
    extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht
    hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq
    pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt
    pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni
    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor
    svm svm_lock syscall tce topoext tsc tsc_scale umip user_shstk v_spec_ctrl
    v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt
    x2apic xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves xtopology
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Vulnerable: Safe RET, no microcode
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW;
    STIBP: always-on; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not
    affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
    vendor: Sapphire driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16
    ports: active: DP-1 empty: DP-2, DP-3, HDMI-A-1, Writeback-1
    bus-ID: 28:00.0 chip-ID: 1002:73df class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: 0
  Monitor-1: DP-1 res: 1920x1080 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
    drv: radeonsi inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.1-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6700 XT (radeonsi
    navi22 LLVM 17.0.6 DRM 3.57 6.9.5-1-MANJARO) device-ID: 1002:73df
    memory: 11.72 GiB unified: no display-ID: :1.0
  API: Vulkan v: 1.3.279 layers: 9 device: 0 type: discrete-gpu name: AMD
    Radeon RX 6700 XT (RADV NAVI22) driver: mesa radv v: 24.1.1-manjaro1.1
    device-ID: 1002:73df surfaces: xcb,xlib,wayland
Audio:
  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 28:00.1 chip-ID: 1002:ab28
    class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 2a:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Texas Instruments PCM2902 Audio Codec
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 3-2:2 chip-ID: 08bb:2902 class-ID: 0300
  API: ALSA v: k6.9.5-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin 4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: f000 bus-ID: 22:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp34s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: noprefixroute scope: global broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Info: services: NetworkManager,smbd
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 5.05 TiB used: 1.4 TiB (27.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Reletech model: M.2 SSD 1024GB
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: ECFM32.1 temp: 25.9 C
    scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:3 vendor: Lexar model: SSD NM620 1TB
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: V1.23 temp: 36.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 2TB
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 3B6Q scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 vendor: Crucial model: CT500MX500SSD1
    size: 465.76 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 022 scheme: GPT
  ID-5: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST1000DM010-2EP102
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B type: USB
    rev: 3.0 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: HDD rpm: 7200
    serial: <filter> fw-rev: 0104 scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 857.7 GiB size: 843.16 GiB (98.31%)
    used: 406.85 GiB (48.3%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: N/A uuid: c2c92475-3f6d-43c2-9ed5-ce58e4c5b93f
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 304 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A
    uuid: 4A19-EA19
  ID-3: /mnt/data raw-size: 858.48 GiB size: 843.93 GiB (98.31%)
    used: 222.96 GiB (26.4%) fs: ext4 dev: /dev/nvme1n1p1 maj-min: 259:4
    label: DATA uuid: 74423f52-a944-4f61-9500-f4bc683c2cef
  ID-4: /mnt/data2 raw-size: 1.64 TiB size: 1.61 TiB (98.37%)
    used: 309.13 GiB (18.7%) fs: ext4 dev: /dev/sda1 maj-min: 8:1 label: DATA2
    uuid: 4de3dfe5-98c9-438d-9fef-7bd41d5bf67f
  ID-5: /mnt/storage raw-size: 755.73 GiB size: 755.73 GiB (100.00%)
    used: 491.17 GiB (65.0%) fs: ntfs dev: /dev/sdc1 maj-min: 8:33 label: STORAGE
    uuid: B0A0696BA069394C
Swap:
  Kernel: swappiness: 10 (default 60) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: file size: 8 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Unmounted:
  ID-1: /dev/sdb1 maj-min: 8:17 size: 529 MiB fs: ntfs label: Recovery
    uuid: AC98EB3A98EB01A6
  ID-2: /dev/sdb2 maj-min: 8:18 size: 100 MiB fs: vfat label: N/A
    uuid: A8EF-469B
  ID-3: /dev/sdb3 maj-min: 8:19 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-4: /dev/sdb4 maj-min: 8:20 size: 79.88 GiB fs: ntfs label: MAIN_SSD
    uuid: 5C828893828872F6
  ID-5: /dev/sdb5 maj-min: 8:21 size: 331.05 GiB fs: ntfs label: DATA_GAMES
    uuid: FC8038908038537E
  ID-6: /dev/sdc2 maj-min: 8:34 size: 175.78 GiB fs: ext4 label: BACKUP
    uuid: b2548556-eb55-44c4-bc73-91b7499dee60
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 10 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-2: 1-1:2 info: Realtek RTS5411 Hub ports: 5 rev: 2.1
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 0bda:5411
    class-ID: 0900
  Device-1: 1-8:3 info: SONiX USB DEVICE type: keyboard,mouse
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s)
    lanes: 1 mode: 1.1 power: 100mA chip-ID: 320f:500c class-ID: 0301
  Device-2: 1-9:4 info: A4Tech XL-730K / XL-747H XL-750BK XL-755BK Mice
    type: keyboard,mouse driver: hid-generic,usbhid interfaces: 2 rev: 1.1
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 100mA
    chip-ID: 09da:9090 class-ID: 0301
  Hub-3: 2-0:1 info: super-speed hub ports: 4 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-4: 2-1:2 info: Realtek Hub ports: 4 rev: 3.2
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 0bda:0411
    class-ID: 0900
  Hub-5: 3-0:1 info: hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 3-2:2 info: Texas Instruments PCM2902 Audio Codec type: audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 4 rev: 1.1
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 100mA
    chip-ID: 08bb:2902 class-ID: 0300
  Hub-6: 4-0:1 info: super-speed hub ports: 4 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Device-1: 4-1:2 info: JMS578 based SATA bridge type: mass storage
    driver: uas interfaces: 1 rev: 3.0 speed: 5 Gb/s (596.0 MiB/s) lanes: 1
    mode: 3.2 gen-1x1 power: 8mA chip-ID: 0080:a001 class-ID: 0806
    serial: <filter>
Sensors:
  System Temperatures: cpu: 28.0 C mobo: 27.0 C gpu: amdgpu temp: 30.0 C
    mem: 38.0 C
  Fan Speeds (rpm): fan-1: 617 fan-2: 498 fan-3: 0 fan-4: 820 fan-5: 0
    fan-6: 0 gpu: amdgpu fan: 0
Info:
  Processes: 470 Power: uptime: 8h 14m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 1 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 12.49 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
    tool: systemctl
  Packages: pm: pacman pkgs: 1667 libs: 485 tools: pamac pm: flatpak pkgs: 0
    Compilers: clang: 17.0.6 gcc: 14.1.1 Shell: Bash v: 5.2.26
    running-in: konsole inxi: 3.3.35

Hi @Gkirmathal,

There seems to be something of a mismatch. Please provide the outputs of:

pamac search --installed headers$

and

mhwd-kernel --listinstalled

The package is called ryzen_smu-dkms, and being a DKMS module, it should automatically compile itself for the running kernel and load itself at boot time, even when you switch to another kernel.

Should ryzen_smu also be seen in dmesg output when it’s loaded at boot time?
Cause when I checked it was not.

The two checks mentioned on the Github page came out empty.

@Mirdarthos sry the copy/paste got borked and pasted an old selection, correct inxi output is included now. Running 6.9.5-1 btw.

Have you tried what @Aragorn suggested?

1 Like

I didn’t know about this utility which I found interesting, I tried it and the module doesn’t appear anywhere after installing ryzen_smu-dkms

Yes.

Read [root tip] [How To] Kernel - Headers - DKMS and I now did noticed I was missing the kernel headers for ryzen_smu-dkms.

I’ll see if this solves it, it prolly it will. Brb.

1 Like

I just bulit it with:
yay -S ryzen_smu-dkms
and it is then available in /lib/modules/xyz-MANJARO/updates/

Kernel headers for all installed kernels need to be present for dkms to work.

I cannot load it because I don’t have the hardware for it.

2 Likes

Now it compiles without errors, it also gives no errors after sudo modprobe ryzen_smu, but it still doesn’t work.

Edit:
I rebooted, the output of dmesg | grep ryzen_smu shows nothing.

Solution was: to install the missing kernel headers.

It is not shown in the package dependencies in Pamac, but it needs kernel headers to be installed to work.

But if you want to run ryzen_monitor from AUR, it depends on the AUR ryzen_smu-dkms-git to work and will thus conflict with ryzen_smu-dkms from Extra repo.

Personally I do avoid AUR as much as I can so I hope ryzen_monitor will be included in the Extra repo with proper dependency.

1 Like

I try to simply run monitor_cpu which is included:

sudo monitor_cpu 
SMU Driver Not Present Or Fault

Remove ryzen_smu-dkms, reboot.
Install kernel headers, reboot.
Install ryzen_smu-dkms again, reboot.

Check with

# ls -lah /sys/kernel/ryzen_smu_drv
total 0
drwxr-xr-x  2 root root    0  4 jul 19:14 .
drwxr-xr-x 17 root root    0  4 jul 19:14 ..
-r--------  1 root root 4,0K  4 jul 19:14 codename
-r--------  1 root root 4,0K  4 jul 19:14 drv_version
-rw-------  1 root root 4,0K  4 jul 19:14 hsmp_smu_cmd
-r--------  1 root root 4,0K  4 jul 19:14 mp1_if_version
-rw-------  1 root root 4,0K  4 jul 19:14 mp1_smu_cmd
-r--------  1 root root 4,0K  4 jul 19:14 pm_table
-r--------  1 root root 4,0K  4 jul 19:14 pm_table_size
-r--------  1 root root 4,0K  4 jul 19:14 pm_table_version
-rw-------  1 root root 4,0K  4 jul 19:14 rsmu_cmd
-rw-------  1 root root 4,0K  4 jul 19:14 smn
-rw-------  1 root root 4,0K  4 jul 19:14 smu_args
-r--------  1 root root 4,0K  4 jul 19:14 version

It should now show this.
Then sudo monitor_cpu will work.

ls -lah /sys/kernel/ryzen_smu_drv                                                             ✔ 
ls: cannot access '/sys/kernel/ryzen_smu_drv': No such file or directory

I can see this:

/lib/modules/6.6.34-1-MANJARO/updates/dkms/ryzen_smu.ko.zst
/lib/modules/6.9.5-1-MANJARO/updates/dkms/ryzen_smu.ko.zst

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.