You are not logged in.
Pages: 1
Hi,
my system stopped booting after upgrade to 4.17.2.
It says something about battery extension.
Thinkpad_acpi: error probing battery 2
battery: error in extension, unloading: Thinkpad Battery Extension
I have Lenovo Thinkpad 13.
Any ideas how to fix this?
Thanks
Offline
I was running into the same issue after upgrading to 4.17.2. To fix it I disabled the thinkpad_acpi kernel module.
Boot into the Arch ISO and mount your filesystem. Then create/edit the /etc/modprobe.d/blacklist.conf file and add the line `blacklist thinkpad_acpi`.
After making this change I could boot into the desktop.
Offline
The kernel now includes support that used to be provided via acpi_call and tp-smapi itself, do you have either of those installed? This combination seems to result in an error now. Does it work if you remove acpi_call and tp-smapi instead? This might break TLP's battery handling if you use it for now , however support for the native kernel interface is already being added.
If you get that error despite not using these modules, you might have found a real bug.
Last edited by V1del (2018-06-22 07:08:57)
Offline
I was running into the same issue after upgrading to 4.17.2. To fix it I disabled the thinkpad_acpi kernel module.
Boot into the Arch ISO and mount your filesystem. Then create/edit the /etc/modprobe.d/blacklist.conf file and add the line `blacklist thinkpad_acpi`.
After making this change I could boot into the desktop.
Blacklisting the thinkpad_acpi solved it for me as well. Many thanks!
Shouldn't this be reported as a bug? I think the thinkpad_acpi module shouldn't be installed at all if it breaks the system (and loads by default).
Last edited by dundee (2018-06-20 13:45:11)
Offline
Reported here https://bugs.archlinux.org/task/59096
Offline
@V1del should the packages tp_smapi and acpi_call be removed the repositories if they can not be used with the kernel they are now built for?
Offline
@loqs Afaik acpi_call can have other relevant purposes (that's just what it will be used for by TLP), not sure aboout tp-smapi, documentation makes me think that it might have other uses as well.
@On-topic
A few similar threads popped up recently, did any of you explicitly redefine acpi_osi in your kernel params? Remove that line and try to reproduce if that's the case.
Offline
Just popping in to say that for me, this bug manifested itself as the system booting perfectly fine, then Xorg hanging on startup (specifically open("/dev/dri/card0", ...)). I initially didn't try this fix because it appeared not to fit the symptoms from this thread, but sure enough blacklisting thinkpad_acpi got X11 to start.
Offline
To my surprise, upstream appears to have picked up the fix faster than Arch.
The fix (see the Arch bug tracker) will be part of 4.17.6.
Hopefully, some future version of the kernel will implement full support for battery management on the Thinkpad 13. I have submitted a patch.
Offline
To my surprise, upstream appears to have picked up the fix faster than Arch.
Curious as to why that would be surprising?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
The patch on the tracker was in time for 4.17.4 and was accepted upstream (often a criterion) in time for 4.17.5. Despite that, it was not picked up. On the other hand, the Linux kernel has historically been known to be slow with patch review. Apparently their regression handling is pretty solid nowadays!
My surprise comes from the fact that Arch could have carried this patch two (or at least one) releases earlier to make life of those affected easier. Sometimes that happens, just not this time.
Offline
Based on my search results for "Thinkpad_acpi: error probing battery 2", I think the
- Thinkpad 11e (R0B)
- Thinkpad 13 gen 2 (R0J)
could also benefit from my patch. Is there anyone with either of these machines available for testing?
If you see the error in your dmesg output, but have a different model, I would like to know as well.
Offline
Based on my search results for "Thinkpad_acpi: error probing battery 2", I think the
- Thinkpad 11e (R0B)
- Thinkpad 13 gen 2 (R0J)
could also benefit from my patch. Is there anyone with either of these machines available for testing?
If you see the error in your dmesg output, but have a different model, I would like to know as well.
11e here; I'd be interested in taking a look.
I should note that I was having the same issue as RX14, namely that the system would boot without issue but Xorg would then hang on startup. This behavior was intermittent, however — although the dmesg output always displays the "Thinkpad_acpi: error probing battery 2" error, Xorg only hangs about ~50% of the time.
Offline
Thanks for being willing to test! Here is the procedure.
Make sure you have the latest version of the linux package installed and that the thinkpad_acpi module is not blacklisted. If your kernel does not complain about probing battery 2, then your laptop does not require my code. Please let me know your laptop model id if this is the case. In other words, you should be able to find the error message using
dmesg | grep "thinkpad_acpi: Error probing battery 2"
The testing requires patching a kernel driver, for which we need some packages. As root, run
pacman -Sy --asdeps asp xmlto kmod inetutils bc libelf
Now, as a regular user, run
cd /tmp
# or anywhere else
asp update linux
asp export linux
cd linux
curl -O https://gist.githubusercontent.com/joukewitteveen/8ae43aea7583e457ebe54250e9e77e17/raw/battery-quirk.patch
makepkg -o
# Or makepkg -o --skippgpcheck if you trust your sources
cd src/linux-4.*/
patch -Np1 -i ../../battery-quirk.patch
# This may produce some offset notifications
make modules_prepare
make M=drivers/platform/x86
xz drivers/platform/x86/thinkpad_acpi.ko
The module is now compiled. To install it, run, as root
cp -f drivers/platform/x86/thinkpad_acpi.ko.xz /usr/lib/modules/4.*-ARCH/kernel/drivers/platform/x86/
Reboot your machine and verify that the error message is gone
dmesg | grep "thinkpad_acpi: Error probing battery 2"
Moreover, advanced battery management should now be available. Verify that it is by running
ls /sys/class/power_supply/BAT1/charge_start_threshold
Please report whether this file exists.
Thanks again!
Last edited by jouke (2018-07-25 18:26:08)
Offline
Hmm, after running through all of your steps (a couple of times, just to make sure I didn't mess anything up), I still get the
thinkpad_acpi: Error probing battery 2
error, and the file
/sys/class/power_supply/BAT1/charge_start_threshold
does not exist. I'm also now noticing that my dmesg has
battery: extension failed to load: ThinkPad Battery Extension
battery: extension unregistered: ThinkPad Battery Extension
as well; not sure to what extent these are related.
Laptop model:
Lenovo ThinkPad 11e, model 20ED001HUS
Kernel version:
4.17.9
System is up-to-date, and thinkpad_acpi is not blacklisted.
Offline
That is somewhat unexpected.
Shortly after posting, I updated my post. The initial version had a part copied from the bug report and compiled the battery driver instead of the thinkpad_acpi driver. Is it possible that you have followed the steps from the unedited post? If so, I am terribly sorry and owe you a beer.
What is the output of the patch command? Does it apply?
Offline
It seems to have applied, as far as I can tell (I'm a newb though so it's not unthinkable that I might just be misinterpreting something).
Output of patch command is the following:
patching file drivers/platform/x86/thinkpad_acpi.c
Hunk #1 succeeded at 330 (offset -5 lines).
Hunk #2 succeeded at 339 (offset -5 lines).
Hunk #3 succeeded at 353 (offset -5 lines).
Hunk #4 succeeded at 439 (offset -5 lines).
Hunk #5 succeeded at 466 (offset -5 lines).
Hunk #6 succeeded at 480 (offset -5 lines).
Hunk #7 succeeded at 1651 (offset -5 lines).
Hunk #8 succeeded at 1802 (offset -5 lines).
Hunk #9 succeeded at 9417 (offset -12 lines).
Hunk #10 succeeded at 9594 (offset -12 lines).
Hunk #11 succeeded at 9821 (offset -12 lines).
Hunk #12 succeeded at 9863 (offset -12 lines).
Hunk #13 succeeded at 9883 (offset -12 lines).
patch unexpectedly ends in middle of line
Hunk #14 succeeded at 9906 with fuzz 1 (offset -12 lines).
Edit: forgot to mention that I did re-run the steps just a moment ago to verify, and nothing changed.
Last edited by jermizzey (2018-07-25 17:49:54)
Offline
You know what? That is actually a pretty cool result! I looked up your model number and apparently there are multiple versions of the 11e.
If I am not mistaken, the bios model of your thinkpad starts with JI
dmesg | grep thinkpad_acpi:.*model.*
I updated the patch so that it would also work for your model. I also updated the link to the gist in my earlier post so that it now downloads the latest version of the patch.
Inside /tmp/linux, you may remove the src/ directory (rm -r src/) and repeat the test from the curl -O ... step.
Offline
That seems to have done the trick!
If I am not mistaken, the bios model of your thinkpad starts with JI
Yes, BIOS version as given by dmesg is
thinkpad_acpi: ThinkPad BIOS JIET22WW (1.07 ), EC unknown
Re-ran the process from the curl -O ... step, and this time the patch command didn't have the patch unexpectedly ends in middle of line line, just the Hunk #[1-14] succeeded at...
Now dmesg no longer gives the battery error, and the
/sys/class/power_supply/BAT1/charge_start_threshold
file exists!
Thanks for the patch, and glad I could be of help with testing!
Offline
Bingo, that's one model verified. Thanks a lot jermizzey!
Anyone able to follow his example?
Documentation for the battery controls is being written: https://patchwork.kernel.org/patch/10396267/.
Offline
Pages: 1