kevinlekiller / amdctl

Set P-State voltages and clock speeds on recent AMD CPUs on Linux.
GNU General Public License v3.0
244 stars 22 forks source link

ERROR: Could not open CPU for reading! Is the msr kernel module loaded? #26

Closed EljoDev closed 2 years ago

EljoDev commented 3 years ago

When I try to do something ex: $ ./amdctl -g :

Voltage ID encodings: SVI (serial) Detected CPU model 30h, from family 16h with 4 CPU cores. ERROR: Could not open CPU for reading! Is the msr kernel module loaded?

I have tryed modprobe msr but noting

How do I solve this error ?

kevinlekiller commented 3 years ago

If you're running Linux >= 5.9 ; MSR is not available to user space, see https://github.com/kevinlekiller/amdctl/pull/25

https://www.phoronix.com/scan.php?page=news_item&px=Linux-Filter-Tightening-MSRs

kevinlekiller commented 3 years ago

Also, you'd have to run amdctl as root (sudo ./amdctl).

I have tryed modprobe msr but noting

You can check if the module is loaded : lsmod | grep msr

Then you should see something like msr 16384 0

You can also check if the module is available: sudo modinfo msr :

filename:       /lib/modules/5.13.4-1-default/kernel/arch/x86/kernel/msr.ko.xz
license:        GPL
description:    x86 generic MSR driver
author:         H. Peter Anvin <hpa@zytor.com>
suserelease:    openSUSE Tumbleweed
srcversion:     85BAD85AC4133DB42A2C6C6