Merge ~ghadi-rahme/ubuntu/+source/powermgmt-base:lp-1980991 into ubuntu/+source/powermgmt-base:ubuntu/devel
Status: | Needs review |
---|---|
Proposed branch: | ~ghadi-rahme/ubuntu/+source/powermgmt-base:lp-1980991 |
Merge into: | ubuntu/+source/powermgmt-base:ubuntu/devel |
Diff against target: |
115 lines (+54/-34) 2 files modified
debian/changelog (+7/-0) on_ac_power (+47/-34) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Sponsors | Pending | ||
git-ubuntu import | Pending | ||
Review via email:
|
Commit message
on_ac_power: improve reporting of AC power status in more scenarios
- If no battery is detected, do not report that the machine is offline.
This fixes an issue with intel nuc devices that incorrectly report
their typec ports as sink ports.
- Improve how the typec power role is determined by checking only
the typec ports that are part of the UCSI device rather than checking
the entire array of typec ports.
(LP: #1980991)
Description of the change
This adds a battery check that is already available in systemd: https:/
The only difference with this implementation is that it will run the other checks instead of directly assuming that the power is online. If other checks fail 255 will be returned.
It also makes typec power role checks tighter by only checking the typec ports related to each UCSI interface instead of checking all of them.
These two changes should massively improve the accuracy of on_ac_power