Closed katonagl closed 6 years ago
Are you sure you're using 2.3.3? Please confirm if this issue still happens in 2.4.0.
Yes, it is 2.3.3. I'm using Opensuse Tumbleweed, thought it has the latest version. Sorry for that.
Now I have removed the version installed from repo, cloned from git, followed install instructions and now I have
Traceback (most recent call last):
File "/usr/local/sbin/smbios-keyboard-ctl", line 33, in <module>
import cli
File "/usr/local/share/smbios-utils/cli.py", line 7, in <module>
from libsmbios_c import memory, smi, cmos, pkgconfdir, localedir, GETTEXT_PACKAGE
ImportError: bad magic number in 'libsmbios_c': b'\x03\xf3\r\n'
What version of python are you using? That looks strikingly like trying to use python 2 instead of 3.
Or are you using a non english locale? Can you share your locale details?
Actually I have both python 2 and 3 installed, but /usr/bin/python3 is explicitly stated in the files and python3 is indeed python 3.6.4
OK, so maybe locale related issue? What's your locale?
My locale is Hungarian, hu_HU.UTF-8
changing to en_US.UTF-8 does not help
Can you try to narrow down which of the imports if causing the problem for you?
Definitely, although I would need some hint on what to do.
From a python terminal:
from libsmbios_c import memory
from libsmbios_c import smi
from libsmbios_c import cmos
Etc to cover each of those and see which fails.
All of these resulted in
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: bad magic number in 'libsmbios_c': b'\x03\xf3\r\n'
I guess this is not much help.
Looking over a similar complaint https://github.com/Miserlou/Zappa/issues/854 there are old pyc files sitting around. Can you look around and remove them?
OK, here what I have done.
I have run find . -name \*.pyc -delete
and git clean -fdx
in git cone directory
Then ./autogen.sh
, make
, make install
Nothing changed. Have I interpreted the linked issue correctly?
The pyc files are probably on your filesystem under /usr/local/
or /usr/
OK, I have removed pyc files. Now the result is:
Libsmbios version : 2.4.1
smbios-keyboard-ctl version : 2.4.1
Capabilities of KeyBoard Illumination on your system:
-------------------------------------------------------------------
ERROR: Could not execute SMI.
The smi library returned this error:
b'\xc0}\xf2K\xf9U'
Common problems are:
-- 'SMM Mitigations' is enabled in BIOS setup.
Run kernel 4.15 or later with
dell-smbios-wmi enabled.
or
Disable 'SMM mitigations' in BIOS setup.
-- Insufficient permissions to perform operation.
Try running as a more privileged account.
Linux : run as 'root' user
Windows: run as 'administrator' user
-- dell-smbios-wmi driver not loaded
Try loading the dell-smbios-wmi driver
Linux : modprobe dell-smbios-wmi
-- Call filtered by Linux kernel
Some functionality is natively supported
by the Linux kernel
-- dcdbas device driver not loaded.
Try loading the dcdbas driver
Linux : modprobe dcdbas
Running as root, modprobes done
What hardware? Do you have SMM mitigations turned on in BIOS setup? Is this kernel 4.15 or later?
Dell E7470, Kernel 4.15.7. I do not know what SMM mitigation mean in the bios
Ah, so kernel 4.15. This is probably what's going on.
-- Call filtered by Linux kernel
Some functionality is natively supported
by the Linux kernel
If you check in your system log you'll probably see a message about the call being filtered from the kernel. Starting with 4.15 the kernel locks out userspace from accessing some of these requests. Use the dell-laptop kernel interface for changing it instead.
OK. I see. I will check that. Thanks
dmesg says:
dell-smbios A80593CE-A997-11DA-B012-B622A1EF5492: Invalid call 4/11: 0
Yep, so that is kernel filtering. You'll want to use this instead. https://github.com/torvalds/linux/blob/master/Documentation/ABI/testing/sysfs-platform-dell-laptop
I have tried to run smbios-keyboard-ctl -vi, but I encountered the following error: