on_ac_power says false, but real answer is true
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
powermgmt-base (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
On a Dell 7000 Micro (Intel 12700T), plugged into mains power, on_ac_power reports false.
As the micro computer is plugged into mains power, I had expected it instead to report true.
/sys/class/
ucsi-source-
/sys/class/
USB
/sys/class/
0
The initial logic in /usr/bin/
if [ -d /sys/class/
for FN in /sys/class/
if test -d "${FN}" && test -r "${FN}/type"; then
case "${type}" in
if [ -r "${FN}/online" ]; then
esac
fi
done
[ "${OFF_LINE_P}" = "yes" ] && exit 1
fi
Due the adapter being of type USB and the online status being 0, OFF_LINE_P is set to "yes" and the script exits with status code 1.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: powermgmt-base 1.36
Uname: Linux 5.17.0-
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
Date: Fri May 13 11:50:59 2022
Dependencies:
InstallationDate: Installed on 2022-04-22 (21 days ago)
InstallationMedia: Ubuntu-Server 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220421)
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: powermgmt-base
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.