You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"thinklmi getsettings" returns "query_apps open: No such file or directory" #21
Hi,
Not sure on why that's not working - will have to check that out - but as you're on a 5.16 kernel you'll be better off using the upstream driver. I think you just need to do: sudo modprobe think-lmi
And then you can access the attributes under /sys/class/firmware-attributes/thinklmi/attributes
There is some kernel documentation on the firmware-attributes class - but let me know if any questions
Mark
Yes.
We need to an updated user space utility to make this easier - I believe it's on Sugu's todo list. But using the built-in kernel driver avoids the hassle of having to build a kernel module, and it's using the standard firmware-attributes class which is better.
Mark
Hi - I did just check this out on my P1G4 with the same Fedora kernel - and it worked for me correctly so it's curious it's not working for you. Still recommend the built in one (especially as it's already in Fedora) but :
Do you have /dev/thinklmi on your system?
Any clues in the dmesg as to issues loading the module?
OK - I think you might have the built-in kernel think_lmi module loaded...which is stopping your self-built version loading.
Do 'rmmod think_lmi', then load the version you built - and that should work.
Afraid not currently @sugudsl is looking at it I think.
I guess the big question here is: "how do I authenticate using sysfs so I can make changes?" Sysfs works very well for retrieving parameters, but I'm not sure where or what to echo into a device to change a setting.
Device: Lenovo ThinkPad T14 Gen 2a, model 20XK001BUS
Distro: Ubuntu 20.04.4 LTS
Kernel: 5.14.0-1045-oem #51-Ubuntu SMP Mon Jul 4 06:41:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Are you saying that the Dell auth method - echo password into /sys/class/firmware-attributes/thinklmi/authentication/Admin/current_password, do stuff, echo null into current_password- also works for Lenovo? Huh, I didn't think to try that, since it looked like it was Dell-specific.
Yep - the firmware-attributes class is generic. We implemented think-lmi on top of it (with some differences in between the two to, but for the basics it should behave the same). Under the hood the implementation of this driver (which uses ioctl''s) and the upstream one (using the class) are very different :)
Activity
mrhpearson commentedon Feb 22, 2022
Hi,
Not sure on why that's not working - will have to check that out - but as you're on a 5.16 kernel you'll be better off using the upstream driver. I think you just need to do:
sudo modprobe think-lmiAnd then you can access the attributes under /sys/class/firmware-attributes/thinklmi/attributes
There is some kernel documentation on the firmware-attributes class - but let me know if any questions
Mark
aravindhp commentedon Feb 23, 2022
So just interact directly with
/sys/class/firmware-attributes/thinklmi/attributesand not usethinklmi?mrhpearson commentedon Feb 23, 2022
Yes.
We need to an updated user space utility to make this easier - I believe it's on Sugu's todo list. But using the built-in kernel driver avoids the hassle of having to build a kernel module, and it's using the standard firmware-attributes class which is better.
Mark
mrhpearson commentedon Feb 23, 2022
Hi - I did just check this out on my P1G4 with the same Fedora kernel - and it worked for me correctly so it's curious it's not working for you. Still recommend the built in one (especially as it's already in Fedora) but :
Do you have /dev/thinklmi on your system?
Any clues in the dmesg as to issues loading the module?
Mark
aravindhp commentedon Mar 3, 2022
No
Not that I can see.
mrhpearson commentedon Mar 3, 2022
OK - I think you might have the built-in kernel think_lmi module loaded...which is stopping your self-built version loading.
Do 'rmmod think_lmi', then load the version you built - and that should work.
aravindhp commentedon Mar 4, 2022
Yes I was using the built-in kernel module. Sorry for not calling that out clearly. Does the CLI not work with the built-in module?
mrhpearson commentedon Mar 4, 2022
Afraid not currently
@sugudsl is looking at it I think.
ckuethe commentedon Jul 15, 2022
I guess the big question here is: "how do I authenticate using sysfs so I can make changes?" Sysfs works very well for retrieving parameters, but I'm not sure where or what to echo into a device to change a setting.
Device:
Lenovo ThinkPad T14 Gen 2a, model 20XK001BUSDistro:
Ubuntu 20.04.4 LTSKernel:
5.14.0-1045-oem #51-Ubuntu SMP Mon Jul 4 06:41:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linuxmrhpearson commentedon Jul 15, 2022
If you're using the upstream version (not the one on github) that uses the /sys/class/firmware-attributes interface - and documentation is available here: https://github.com/torvalds/linux/blob/master/Documentation/ABI/testing/sysfs-class-firmware-attributes
I'm not sure if the think module is in 20.04.4 though - can you do a 'modprobe think-lmi' and see if it's there. In the long term it's the way to go.
ckuethe commentedon Jul 15, 2022
Derp, I forgot to include
think-lmiinfo.Are you saying that the Dell auth method - echo password into
/sys/class/firmware-attributes/thinklmi/authentication/Admin/current_password, do stuff, echo null intocurrent_password- also works for Lenovo? Huh, I didn't think to try that, since it looked like it was Dell-specific.mrhpearson commentedon Jul 17, 2022
Yep - the firmware-attributes class is generic. We implemented think-lmi on top of it (with some differences in between the two to, but for the basics it should behave the same). Under the hood the implementation of this driver (which uses ioctl''s) and the upstream one (using the class) are very different :)
Mark
ckuethe commentedon Jul 17, 2022
Ah. Will have to do up a PR, then, to move the description of the auth mechanism to indicate that it's not just a dell-specific thing. Thanks.