Systemd thinks I'm on external power? Lenovo ThinkPad X270 secondary battery behavior

Abstract: Resolve ThinkPad X270 systemd misinterpreting external power status by verifying kernel power supply reports and adjusting BIOS settings.

Created: 2026-08-06 by

The Lenovo ThinkPad X270 secondary battery behavior on Linux is often a firmware-level power management feature rather than a systemd configuration error. When the system reports external power status incorrectly, it is usually due to how the Embedded Controller (EC) handles AC adapter detection or charging thresholds. Verifying the actual hardware state through kernel logs and adjusting BIOS settings typically resolves the discrepancy without requiring complex systemd workarounds.

Understanding the Power State Discrepancy

Users of the ThinkPad X270 may notice that the operating system behaves as if it is connected to an external power source even when running solely on the internal or secondary battery. This confusion often stems from how systemd-logind interprets power supply events. The logind service monitors changes in power states to manage user sessions, suspend policies, and screen brightness. However, if the underlying hardware reports an incorrect state, systemd will react accordingly.

It is crucial to distinguish between what the OS *thinks* is happening and what the hardware *is* doing. The ThinkPad embedded controller manages power delivery independently of the main CPU. If the EC detects a stable voltage from the AC adapter, it may signal "AC present" to the OS. Conversely, if there is a glitch in this signaling, the OS might fail to enter battery-optimized modes or might display misleading indicators in the desktop environment. Misattributing this to systemd alone leads to unnecessary troubleshooting of service files when the root cause lies in firmware communication.

Differentiating Hardware vs. Software Signals

Before modifying any system services, you must verify the raw input from the kernel. The Linux kernel exposes power supply information through the sysfs interface. By examining these virtual files, you can see exactly what the hardware is reporting. Look for entries under /sys/class/power_supply/. Specifically, check the online file for your AC adapter (often named ACAD or similar) and the status file for your batteries (BAT0, BAT1). If online returns 1 while unplugged, the hardware or driver is sending false positive signals.

Verifying Kernel Power Supply Reports

To confirm whether the issue is at the firmware level, inspect the kernel's view of the power supplies. Open a terminal and list the available power supplies using ls /sys/class/power_supply/. You will likely see entries for both AC adapters and batteries. Check the status of the AC adapter by reading /sys/class/power_supply/ACAD/online. A value of 1 indicates AC power is detected, while 0 indicates battery only.

Next, examine the battery status files. The capacity file shows the current charge percentage, while status indicates whether the battery is Charging, Discharging, or Fully Charged. If the system claims to be on AC power but the battery is discharging, there is a conflict in the reported state. This conflict is where systemd-logind gets confused, leading to unexpected behavior such as failing to suspend properly or ignoring battery thresholds.

Checking System Journal for Power Events

The systemd journal records all power supply events. Use journalctl -f | grep -i power to watch real-time events. Unplug and replug the charger while watching. If you see messages indicating a change in AC state that does not match physical reality, the issue is upstream of systemd. In many cases, the thinkpad_acpi kernel module handles these communications. Ensuring this module is loaded correctly is vital for accurate reporting.

BIOS and Firmware Settings

ThinkPad laptops have advanced power management features controlled by the BIOS. One common setting is "Battery Charge Threshold" or "Conservation Mode." These features are designed to extend battery lifespan by limiting the maximum charge level or stopping charging at certain percentages. Sometimes, enabling or disabling these modes can affect how the AC adapter state is perceived by the OS.

Enter the BIOS setup (usually by pressing F1 during boot) and navigate to the Power section. Check if Conservation Mode is enabled. If you are experiencing issues with power state detection, try toggling this setting. Additionally, ensure your BIOS is up to date. Lenovo frequently releases firmware updates that fix EC bugs related to power detection. Updating the BIOS can resolve persistent misreporting issues that older firmware versions exhibit.

Updating Embedded Controller Firmware

If the BIOS update does not resolve the issue, consider updating the Embedded Controller firmware separately. Some ThinkPad models allow EC updates via Windows utilities or specific Linux tools. Since you are migrating or managing Linux systems, refer to guides on maintaining firmware integrity. For example, learning how to handle firmware updates during OS transitions can help prevent such discrepancies. See Updating BIOS on Lenovo Laptop while Migrating from Win11 to Linux OS for best practices in managing firmware across different operating environments.

Systemd Configuration Adjustments

If the hardware reports correctly but systemd still behaves oddly, you may need to adjust logind settings. The /etc/systemd/logind.conf file contains parameters like HandleLidSwitch and IdleAction. While these do not directly fix power detection, they control how the system responds to it. Ensure that HandleLidSwitch is set appropriately for your needs. If the system is waking up unexpectedly or not suspending, this setting is a primary candidate.

After making changes to logind.conf, restart the service with sudo systemctl restart systemd-logind. Monitor the journal again to see if the behavior aligns with the new configuration. It is rare for logind to be the sole cause of power state misreporting, but it can exacerbate symptoms if the underlying hardware signal is unstable.

Related Considerations for Linux on ThinkPads

Managing power on ThinkPads involves more than just battery detection. Service ordering during shutdown can also impact power state consistency. If services do not close in the correct order, hardware states may become inconsistent. Reviewing service dependencies ensures a clean transition between power states. For insights on managing service lifecycles, consult Preserve Order of Closing Services While Shutting Down Linux.

Additionally, if you are using custom scripts or daemons to monitor battery levels, ensure they are compatible with the current kernel interfaces. Older tools may rely on deprecated sysfs attributes, leading to confusion. Always use current kernel documentation for power supply interfaces.

Frequently Asked Questions

Why does my ThinkPad show AC power when unplugged?

This is usually caused by a glitch in the Embedded Controller firmware or a loose connection in the DC-in jack. The EC may briefly detect residual voltage or experience a signal bounce that it interprets as a continuous AC presence. Restarting the laptop often clears this transient state, but persistent issues require a BIOS update.

Does systemd-control the battery charging threshold?

No, systemd does not control hardware charging thresholds. Those settings are managed by the BIOS/UEFI firmware or the thinkpad_acpi kernel module. Systemd-logind only reacts to the power state signals provided by the kernel. Changing logind settings cannot override hardware-defined charging limits.

How do I reset the embedded controller on a ThinkPad?

You can perform an EC reset by shutting down the laptop, unplugging the AC adapter, and removing the internal battery if accessible. Hold the power button for 30 seconds to drain residual capacitors. Reconnect the battery and AC adapter, then power on. This forces the EC to re-initialize its hardware sensors.

Is conservation mode bad for the battery?

Conservation mode is generally beneficial for longevity as it prevents the battery from staying at 100% charge continuously, which causes chemical degradation. It limits charging to around 55-60%. This is ideal for users who keep their laptops plugged in most of the time, such as desktop replacements.

Can outdated BIOS cause systemd errors?

An outdated BIOS can cause incorrect power supply reports, which systemd then misinterprets. This leads to logical errors in session management, such as failing to suspend or wake improperly. Updating the BIOS ensures the hardware communicates accurately with the operating system, preventing these downstream software issues.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More