No battery detected on Thinkpad X1

Hi

I recently got a Thinkpad X1 8th gen, and am having issues with the battery. It’s a bit difficult to give a precise diagnostics but I will try.

I use a fresh Manjaro installation running KDE/Wayland, recently upgraded to Plasma 6. Kernel 6.9.0

  • When I press the power button to wake from suspend, it typically does not respond unless power cord is connected.
  • When I disconnect the power cord there is no battery icon showing. It sometimes comes for a few seconds (with a sound alert), and then disappears again (with another sound alert).
  • tlp-stat --battery reports “No batteries detected.” under battery status
  • I upgraded to lastest bios version, did not help.
  • I tried to remove ~/.config/plasma-org.kde.plasma.desktop-appletsrc as suggested elsewhere on forum, did not help.
  • in journalctl I find the message kernel: thinkpad_acpi: battery 1 registered (start 0, stop 100, behaviours: 0x7) on regular intervals.
  • I tried to reload the thinkpad-acpi module, did not seem to help much.
  • I’m out of ideas pretty much…
$ inxi --full --verbosity=7 --filter --no-host
System:
  Kernel: 6.8.9-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc
  Desktop: KDE Plasma v: 6.0.4 tk: Qt v: N/A wm: kwin_wayland with: krunner
    vt: 1 dm: SDDM Distro: Manjaro base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20U90048MH v: ThinkPad X1 Carbon Gen 8
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20U90048MH v: SDK0J40697 WIN
    serial: <superuser required> part-nu: LENOVO_MT_20U9_BU_Think_FM_ThinkPad
    X1 Carbon Gen 8 uuid: <superuser required> UEFI: LENOVO
    v: N2WET45W (1.35 ) date: 03/18/2024
Memory:
  System RAM: total: 16 GiB available: 15.29 GiB used: 8.93 GiB (58.4%)
  Message: For most reliable report, use superuser + dmidecode.
  Array-1: capacity: 16 GiB slots: 2 modules: 2 EC: None
    max-module-size: 8 GiB note: est.
  Device-1: ChannelA-DIMM0 type: LPDDR3 detail: synchronous size: 8 GiB
    speed: 2133 MT/s volts: 1 width (bits): data: 64 total: 64
    manufacturer: SK Hynix part-no: N/A serial: N/A
  Device-2: ChannelB-DIMM0 type: LPDDR3 detail: synchronous size: 8 GiB
    speed: 2133 MT/s volts: 1 width (bits): data: 64 total: 64
    manufacturer: SK Hynix part-no: N/A serial: N/A
CPU:
  Info: quad core model: Intel Core i5-10210U bits: 64 type: MT MCP
    smt: enabled arch: Comet/Whiskey Lake note: check rev: C cache: L1: 256 KiB
    L2: 1024 KiB L3: 6 MiB
  Speed (MHz): avg: 500 high: 800 min/max: 400/4200 cores: 1: 400 2: 400
    3: 400 4: 800 5: 400 6: 400 7: 400 8: 800 bogomips: 33615
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs
    ibrs_enhanced ida intel_pt invpcid lahf_lm lm mca mce md_clear mmx
    monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq
    pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pts rdrand rdseed rdtscp
    rep_good sdbg sep sgx smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3
    stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx
    vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915
    v: kernel arch: Gen-9.5 ports: active: eDP-1 empty: DP-1,DP-2,HDMI-A-1
    bus-ID: 00:02.0 chip-ID: 8086:9b41 class-ID: 0300
  Device-2: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 1-8:2 chip-ID: 04f2:b6cb class-ID: fe01
    serial: <filter>
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 23.2.6
    compositor: kwin_wayland driver: X: loaded: modesetting
    alternate: fbdev,vesa dri: iris gpu: i915 display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast surfaceless: drv: iris wayland: drv: iris x11:
    drv: iris inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.0.6-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel UHD Graphics (CML GT2)
    device-ID: 8086:9b41 display-ID: :1.0
  API: Vulkan v: 1.3.279 layers: N/A surfaces: xcb,xlib,wayland device: 0
    type: integrated-gpu driver: mesa intel device-ID: 8086:9b41
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo
    driver: sof-audio-pci-intel-cnl bus-ID: 00:1f.3 chip-ID: 8086:02c8
    class-ID: 0403
  API: ALSA v: k6.8.9-3-MANJARO status: kernel-api with: aoss
    type: oss-emulator
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:0d4f class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  IF-ID-1: tun0 state: unknown speed: 10000 Mbps duplex: full mac: N/A
  IP v4: <filter> scope: global
  IP v6: <filter> virtual: stable-privacy proto kernel_ll scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 1-10:4 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 931.51 GiB used: 175.52 GiB (18.8%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WD BLACK SN850X 1000GB
    size: 931.51 GiB speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 620311WD temp: 36.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / size: 898.97 GiB used: 175.52 GiB (19.5%) fs: ext4
    dev: /dev/nvme0n1p2 label: N/A uuid: 9351ebe9-cf5c-4af2-a04f-2078c829c8be
  ID-2: /boot/efi size: 299.4 MiB used: 548 KiB (0.2%) fs: vfat
    dev: /dev/nvme0n1p1 label: N/A uuid: FC7C-67DE
Swap:
  ID-1: swap-1 type: partition size: 16.82 GiB used: 2.4 MiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 label: swap
    uuid: 42d7f1a8-bd63-43d3-bda3-69d2bec001e2
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s lanes: 1 chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-8:2 info: Chicony Integrated Camera type: video
    driver: uvcvideo interfaces: 5 rev: 2.0 speed: 480 Mb/s lanes: 1
    power: 500mA chip-ID: 04f2:b6cb class-ID: fe01 serial: <filter>
  Device-2: 1-9:13 info: Synaptics Prometheus MIS Touch Fingerprint Reader
    type: <vendor specific> driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s
    lanes: 1 power: 100mA chip-ID: 06cb:00bd class-ID: ff00 serial: <filter>
  Device-3: 1-10:4 info: Intel AX201 Bluetooth type: bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s lanes: 1 power: 100mA
    chip-ID: 8087:0026 class-ID: e001
  Hub-2: 2-0:1 info: super-speed hub ports: 6 rev: 3.1 speed: 10 Gb/s
    lanes: 1 chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s lanes: 1 chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 4-0:1 info: super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    lanes: 1 chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  Src: /sys System Temperatures: cpu: 44.0 C pch: 51.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 369 Power: uptime: 4h 51m states: freeze,mem,disk suspend: deep
    wakeups: 1 hibernate: platform Init: systemd v: 255 default: graphical
  Packages: pm: pacman pkgs: 2127 Compilers: clang: 17.0.6 gcc: 13.2.1
    Shell: Zsh v: 5.9 running-in: yakuake inxi: 3.3.34

Edit: clarifications

I have had a couple of thinkpads over the years - usually no issues - current using Lenovo ThinkPad X13 Gen 4 (AMD) - ArchWiki.

Please define suspend?

Do you mean a hibernate state - a state where the system is powered off and state is written to disk?

Are you using tlp to control power? In such case tlpui may be of help configuring this

From [tlp] web it is stated that using a kernel > 5.17 requires no extra kernel modules.

It seems strange the battery is not found.

Do you have any indication of the state of the battery - e.g. the party whom you aquired it from ?

The 8th gen X1 is fairly recent - I wouldn’t expect battery issues with this unless of course the battery is in worn out.

The following command line may provided further info

upower -e

then (assuming your device is battery_BAT0)

upower -i /org/freedesktop/UPower/devices/battery_BAT0

Thanks for feedback.

This is my 3rd ThinkPad (two former were from the T series), and the first time I have any larger issues running Linux on them. I am suspecting issues with the battery itself, but would prefer to exhaust any potential software/configuration issues before replacing. Battery health seems fine. The computer was acquired through my company from a previous colleague who was running Windows on it.

I mean suspend to memory, not hibernate to disk. Typical operation is I unplug the power cord at work, and close the lid which is set to “send it to suspend”. I normally then expect it to wake when I open the lid, but it does not always, and it does not always help to press the power button. What does still work is to hold the power button until the computer switches completely off, and turn it back on again (without a power cord). I’ve also experienced opening the lid when it is fully charged, only to see a “0% left” warning immediately and computer going down. In that case I needed power cord to wake it again.

I don’t really use tlp no, but I installed it to see if it could provide any useful info. The upower command you suggested instead seems to show more consistent information about the battery.

$ upower -i /org/freedesktop/UPower/devices/battery_BAT0                                                                                                   ✔ 
  native-path:          BAT0
  vendor:               Celxpert
  model:                5B10W13932
  serial:               4807
  power supply:         yes
  updated:              ons 22 maj 2024 09:37:46 CEST (8 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              42,23 Wh
    energy-empty:        0 Wh
    energy-full:         44,62 Wh
    energy-full-design:  51 Wh
    energy-rate:         9,769 W
    voltage:             16,531 V
    charge-cycles:       82
    time to empty:       4,3 hours
    percentage:          94%
    capacity:            87,4902%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1716363436  94,000  discharging
  History (rate):
    1716363466  9,769   discharging
    1716363436  9,869   discharging
    1716363406  9,364   discharging

This could be related to to the gpu - Iris - there is something with guc - perhaps you need to experiment with the arguments.

My tuxedo laptop with Iris requires a kernel argument to work correctly

i915.enable_guc=2

Thanks, I’ll have a look at this gpu/guc. I guess you refer to what is discussed here? Intel graphics - ArchWiki

Here’s another example of upower by the way, after a reboot this morning it did not find the battery:

$ upower -e                                                                                                                                                                   
/org/freedesktop/UPower/devices/line_power_AC
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o002
/org/freedesktop/UPower/devices/DisplayDevice
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0                                                                                                                      
  native-path:          (null)
  power supply:         no
  updated:              tor 01 jan 1970 01:00:00 CET (1716445564 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       unknown
    battery-level:       unknown
    percentage:          0% (should be ignored)
    icon-name:          '(null)'

with or without psu attached ?

I have seen this as well - just yester when I checked the upower cmdline - I was speculating what that meant - my laptop was booted on battery - but I forgot about it - obviously a glitch with upower - when communicating with the system.

Without any psu attached, from before the reboot. It seems a lot too regular though, I would say more than half the times I disconnect the psu the battery icon does not show up (which I guess somewhere it does not detect the battery status). The computer still runs “fine” on battery so the battery certainly isn’t flat out dead. Most times at least, a couple of times I’ve had it hibernating immediately due to “0% left”.

I set enable_guc to 2 and regenerated initramfs, and in journalctl I find the output below. The warning about “dangerous option” got me a bit concerned. Google suggested it might be related to enable_gvt, but I did not find that enabled (maybe I looked in the wrong place)

$ sudo dmesg | grep -i "[hg]uc"                                                                                                                                                                                                        
[    1.265480] Setting dangerous option enable_guc - tainting kernel
[    1.989636] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/kbl_guc_70.1.1.bin version 70.1.1
[    1.989641] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/kbl_huc_4.0.0.bin version 4.0.0
[    2.015441] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[    2.015443] i915 0000:00:02.0: [drm] GT0: GUC: submission disabled
[    2.015445] i915 0000:00:02.0: [drm] GT0: GUC: SLPC disabled
[ 1807.383465] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/kbl_guc_70.1.1.bin version 70.1.1
[ 1807.383480] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/kbl_huc_4.0.0.bin version 4.0.0
[ 1807.412230] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[ 1807.412243] i915 0000:00:02.0: [drm] GT0: GUC: submission disabled
[ 1807.412248] i915 0000:00:02.0: [drm] GT0: GUC: SLPC disabled
$ sudo cat /sys/kernel/debug/dri/1/gt0/uc/guc_info                                                                                                                                                                                            
GuC firmware: i915/kbl_guc_70.1.1.bin
        status: RUNNING
        version: found 70.1.1
        uCode: 206592 bytes
        RSA: 256 bytes
GuC status 0x8003f0ed:
        Bootrom status = 0x76
        uKernel status = 0xf0
        MIA Core status = 0x3
Scratch registers:
         0:     0xf0000000
         1:     0x1
         2:     0x1000
         3:     0x0
         4:     0x40
         5:     0x11fc
         6:     0x9b410002
         7:     0x0
         8:     0x0
         9:     0x0
        10:     0x0
        11:     0x0
        12:     0x0
        13:     0x0
        14:     0x0
        15:     0x0

GuC logging stats:
        Relay full count: 0
        DEBUG:  flush count          0, overflow count          0
        CRASH:  flush count          0, overflow count          0
        CAPTURE:        flush count          0, overflow count          0
$ sudo cat /sys/kernel/debug/dri/1/gt0/uc/huc_info                                                                                                                                                                                        
HuC firmware: i915/kbl_huc_4.0.0.bin
        status: RUNNING
        version: found 4.0.0
        uCode: 225664 bytes
        RSA: 256 bytes
HuC status: 0x00006080

https://www.kernel.org/doc/html/latest/admin-guide/tainted-kernels.html

I cannot know if your specific hardware supports a specific option - so my mention of guc should not be taken as a defacto standard.

I know my specific hardware - a Tuxedo InfinitiBookPro 14 requires this.

[nix@black ~]$ inxi -S
System:
  Host: black Kernel: 6.6.31-1-MANJARO arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.0.5 Distro: Manjaro Linux

And strangely my laptop does not produce any warnings - just switched to laptop

[nix@black ~]$ sudo dmesg | grep -i "[hg]uc"
[    2.398794] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/adlp_guc_70.bin version 70.20.0
[    2.398799] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3
[    2.416570] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[    2.416957] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[    2.416961] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[    2.417576] i915 0000:00:02.0: [drm] GT0: GUC: RC enabled

I just got curios - so I search and found this - looks interesting - it also has link to Arch

Absolutely, me “adopting” this option was after seeing on the Arch page that it should be supported from cpu gen 9 onwards (mine is gen 10). In any case it’s fully on me if there was an issue obviously, I never (completely :slight_smile: ) blindly follow suggestions. I will try to investigate further when I find time.

1 Like