linux-thinkpad / tp_smapi

173 stars 13 forks source link

T400 tp_smapi no longer detected/loads #60

Closed dchmelik closed 9 months ago

dchmelik commented 9 months ago

After upgrading to v0.44, tp_smapi kernel module no longer loads on Slackware 15 (up-to-date 64-bit) Lenovo ThinkPad T400. I do have LibreBoot on this with which Slackware 14.2 tp_smapi v0.43 worked, and I think setting battery charge thresholds currently works on FreeBSD UNIX 14 (I don't use windows).

root@oldoldmicrocosmos:~# ls -l /lib/modules/5.15.145/kernel/drivers/firmware/tp_smapi.ko 
-rw-r--r-- 1 root root 74456 Feb  5 21:29 /lib/modules/5.15.145/kernel/drivers/firmware/tp_smapi.ko
root@oldoldmicrocosmos:~# modprobe tp_smapi
modprobe: ERROR: could not insert 'tp_smapi': No such device or address

root@oldoldmicrocosmos:~/tp_smapi-0.44# make load HDAPS=1 DEBUG=1
if lsmod | grep -q '^hdaps '; then rmmod hdaps; fi
make -C /lib/modules/5.15.145/build M=/root/tp_smapi-0.44 O=/lib/modules/5.15.145/build modules
if lsmod | grep -q '^tp_smapi '; then rmmod tp_smapi; fi
if lsmod | grep -q '^thinkpad_ec '; then rmmod thinkpad_ec; fi
make[1]: Entering directory '/usr/src/linux-5.15.145'
if lsmod | grep -q '^tp_base '; then rmmod tp_base; fi  # old thinkpad_ec
  CC [M]  /root/tp_smapi-0.44/thinkpad_ec.o
  CC [M]  /root/tp_smapi-0.44/tp_smapi.o
  CC [M]  /root/tp_smapi-0.44/hdaps.o
  MODPOST /root/tp_smapi-0.44/Module.symvers
  CC [M]  /root/tp_smapi-0.44/hdaps.mod.o
  CC [M]  /root/tp_smapi-0.44/thinkpad_ec.mod.o
  CC [M]  /root/tp_smapi-0.44/tp_smapi.mod.o
  LD [M]  /root/tp_smapi-0.44/hdaps.ko
  LD [M]  /root/tp_smapi-0.44/thinkpad_ec.ko
  LD [M]  /root/tp_smapi-0.44/tp_smapi.ko
make[1]: Leaving directory '/usr/src/linux-5.15.145'
{ insmod ./thinkpad_ec.ko  && insmod ./tp_smapi.ko debug=1 && insmod ./hdaps.ko; }; :
insmod: ERROR: could not insert module ./tp_smapi.ko: No such device or address

Recent dmesg output:
[   48.427740] SMAPI not supported (ID=0x6f)
[   48.427742] tp_smapi init failed (ret=-6)!
[   90.149992] tp_smapi 0.44 loading...
[   90.150009] SMAPI not supported (ID=0x6f)
[   90.150016] tp_smapi init failed (ret=-6)!
[  501.003729] thinkpad_ec: unloaded.
[  508.754390] thinkpad_ec: thinkpad_ec 0.44 loaded.
[  508.757543] tp_smapi 0.44 loading...
[  508.757553] SMAPI not supported (ID=0x6f)
[  508.757555] tp_smapi init failed (ret=-6)!

root@oldoldmicrocosmos:~/tp_smapi-0.44# dmidecode | grep -C5 Product
        Firmware Revision: 0.0

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: LENOVO
        Product Name: 2087W25
        Version: ThinkPad T500
        Serial Number: R8MEZGP
        UUID: 032b0481-4b0d-11cb-9b3c-c28e532474c4
        Wake-up Type: Reserved
        SKU Number: Not Specified
        Family: Not Specified

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
        Manufacturer: LENOVO
        Product Name: 2087W25
        Version: ThinkPad T500
        Serial Number: R8MEZGP

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
evgeni commented 9 months ago

There are no changes between .43 and .44 that could have influenced this.

We've had reports that libreboot devices behave weirdly in the past (https://github.com/linux-thinkpad/tp_smapi/issues/44) and weren't able to pinpoint why.

dchmelik commented 9 months ago

Well, that was my report, and you said LibreBoot doesn't overwrite/erase the relevant part. I'd tried older kernels it used to work on and determined this may be a hardware problem. I might keep trying in the future, or reinstall older Slackware in addition to try on, but guess I should close this as it doesn't appear the problem is actually tp_smapi rather than hardware got damaged or something else changed.