Closed simonstratmann closed 1 year ago
possible duplicate of #3
But there's no crash? The UI still works. But yes the stacktrace is the same.
I get the same error running the python script directly and none of the files contain "$@"
.
I am looking into it right now, while I have not been able to reproduce this issue yet, I think I found the problem.
Would you be willing to try a new version for me to see if that fixes the issue?
Sure, happy to.
On Mon, 7 Aug 2023, 19:35 zocker-160, @.***> wrote:
I am looking into it right now, while I have not been able to reproduce this issue yet, I think I found the problem.
Would you be willing to try a new version for me to see if that fixes the issue?
— Reply to this email directly, view it on GitHub https://github.com/zocker-160/thinkfan-ui/issues/9#issuecomment-1668309337, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYMMR7YDCX5IWQ346OPPODLXUERN5ANCNFSM6AAAAAA3GT6QTM . You are receiving this because you authored the thread.Message ID: @.***>
Could you give this a try?
Unfortunately that doesn't work.
I tried debugging it and it's really weird. The checkPermission()
function works fine with the code
with open(PROC_FAN, "w"):
return True
but replacing the first line with with open(PROC_FAN, "w") as foo:
produces the error. On the other hand removing the as soc
(and replacing the next line) in setFanSpeed()
prevents the error. I wouldn't expect the as soc
to actually make any difference.
Trying to open the file in nano I get [ Directory '/proc/acpi/ibm' is not writable ]
and trying to open it in nano using sudo I get [ Error writing lock file /proc/acpi/ibm/.fan.swp: No such file or directory ]
. No idea what's going on there.
Right, apparently python reports the wrong line, the exception actually is produced by soc.write(f"level {speed}")
. So it's a permission issue or something.
sist@LIAG0012:~/Downloads$ echo "\n" >> /proc/acpi/ibm/fan
bash: echo: write error: Invalid argument
sist@LIAG0012:~/Downloads$ sudo !!
sudo echo "\n" >> /proc/acpi/ibm/fan
echo: write error: Invalid argument
Ok, this is embarrassing. My changes to /etc/modprobe.d/thinkpad_acpi.conf
were reverted somehow. With writing to ACPI disabled you get this error... I found out by seeing https://askubuntu.com/questions/1048379/tee-proc-acpi-ibm-fan-invalid-argument and checking the conf file again.
Perhaps you could check that file for the correct entry? I suspect the other issues may be caused by this as well.
FWIW if I read the readme correctly this is supposed to be not needed when installing it using the package manager and only needed when installing manually? If that's the case that didn't work.
Yep, that fixed it.
Oh yeah I see now, thank you for looking into it. I see multiple bugs here on my end.
Perhaps you could check that file for the correct entry?
Yep, the permission check I do is not enough, checking the config file is also needed.
Also I need to catch the error with a proper error message.
FWIW if I read the readme correctly this is supposed to be not needed when installing it using the package manager and only needed when installing manually? If that's the case that didn't work.
Yes that is the case and this is a bug in the distro package.
I pushed a new version which adds a useful error message for your mentioned error and when using the DEB, the config will now get correctly set up and initialized.
Thank you for your help!
Current version, Ubuntu 22.04, Thinkpad P15 v3.
Thanks.