Open sanderboom opened 5 years ago
Ooops. I forgot to add gzip.open
! Thanks for pointing this out!
Still doesn't work:
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: main()
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: File "/usr/lib/lenovo-throttling-fix/lenovo_fix.py", line 544, in main
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: check_kernel()
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: File "/usr/lib/lenovo-throttling-fix/lenovo_fix.py", line 490, in check_kernel
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: elif not re.search('CONFIG_DEVMEM=y', kernel_config):
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: File "/usr/lib/python3.7/re.py", line 183, in search
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: return _compile(pattern, flags).search(string)
nov. 07 13:38:28 laptop lenovo_fix.py[11540]: TypeError: cannot use a string pattern on a bytes-like object
It doesn't work because you need
modprobe configs
Doc should tell to create
/etc/modules-load.d/configs.conf
with
configs
Maybe the bug is in the AUR package
Meh, I still hate py3... gzip.open defaults to 'rb' mode.
I know that /proc/config.gz
requires the configs
module, I can try to load it but the point is that this is already a fallback. Don't you have /boot/config-xxx
?
Don't you have /boot/config-xxx
Nope. Relative fresh/default install of Manjaro KDE here.
sander@t480s /boot
λ find -name "config-"
sander@t480s /boot
λ uname -a
Linux t480s 4.19.0-4-MANJARO #1 SMP PREEMPT Thu Nov 1 15:20:23 UTC 2018 x86_64 GNU/Linux
Meh, I still hate py3... gzip.open defaults to 'rb' mode.
Maybe use a gunzipped tempfile as a last fallback?
It's find -name "config*"
, or just ls /boot
Yea, tried that before as well, nothing here :/
sander@t480s /boot
λ find -name "config*"
./grub/x86_64-efi/configfile.mod
sander@t480s /boot
λ ls
efi grub vmlinuz-4.14-x86_64 vmlinuz-4.19-x86_64 vmlinuz-4.18-x86_64 initramfs-4.14-x86_64.img initramfs-4.18-x86_64.img initramfs-4.19-x86_64.img
memtest86+ intel-ucode.img linux414-x86_64.kver linux419-x86_64.kver linux418-x86_64.kver initramfs-4.14-x86_64-fallback.img initramfs-4.18-x86_64-fallback.img initramfs-4.19-x86_64-fallback.img
Hmm, nice to know thanks. The /proc/config.gz
way should be working now.
Awesome! Thanks for the quick fix. Man, you do great stuff on your bad days ;-)
This is sexy, or what?!
Ahahah thanks a lot, very appreciated! :D
I'll add some more monitoring stuff and polish the output as soon as I can, stay tuned ;)
Hello!
Eager to test the throttling monitoring (awesome!) I reinstalled the tool completely (default config).
Upon starting the script I run into the following error message:
I'm not a Python dev, but are you sure you can do this:
on a binary file?
On a side note I was fooled for a moment by
vim
just opening/proc/config.gz
in extracted/text format.The
CONFIG_X86_MSR=
&CONFIG_DEVMEM=y
are present.Thanks for looking into this!