Issue #440 has been updated by Nicholas Chin.
I found this comment on this GitHub issue, which might explain the strange behaviour we are seeing: https://github.com/zamaudio/intelmetool/issues/20#issuecomment-751562837
I got this error too, and tracked the issue down.
iopl() returns an error EPERM (Operation not permitted) - even when invoked as root - if the kernel is in "lockdown mode". One of the things that lockdown mode does is disables userspace access to privileged I/O.
You can check if you are in lockdown mode as follows:
$ cat /sys/kernel/security/lockdown
none [integrity] confidentiality
Modern Linux distributions - such as Debian, in my case - will automatically enter lockdown mode (integrity) when the kernel is booted with EFI Secure Boot enabled. To fix the issue I simply disabled Secure Boot and restarted my machine.
Could you check if your system is in lockdown mode and if you have secure boot enabled?
---------------------------------------- Bug #440: superiotool tells you to run it as root and stops even when ran as root https://ticket.coreboot.org/issues/440#change-1484
* Author: J Nky * Status: Response Needed * Priority: Normal * Target version: none * Start date: 2022-11-24 * Affected versions: 4.15 * Affected OS: ubuntu 22.10 ---------------------------------------- On ubuntu 22.10:
**sudo superiotool** iopl: Function not implemented Superiotool must be run as root.
superiotool tells you to run it as root and stops even when ran as root