device-nokia-n900: do not use upower for low-battery shutdown (MR 5868)

As of upower 1.90.5, it is possible to configure upower to not take an action
when the battery capacity is reported as critically low. Since the Nokia N900
now monitors its battery capacity using udev scripts, which is more accurate
than upower's calculation, enable the new ignore feature for the N900.
This commit is contained in:
Sicelo A. Mhlongo 2024-12-02 20:22:15 +02:00 committed by Oliver Smith
parent ea97c08fa6
commit 5f059f959e
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 19 additions and 9 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Sicelo <absicsz@gmail.com>
# Co-Maintainer: Danct12 <danct12@disroot.org>
pkgname=device-nokia-n900
pkgver=34
pkgver=35
pkgrel=0
pkgdesc="Nokia N900"
url="https://postmarketos.org"
@ -243,7 +243,7 @@ e440ed7a3070c17e003b86b72dbe6d8194d01b577ca8dd56dd066f216b6dda32bb965c780950f178
1acc441b9f83dc91fd65fa3f89b8205bfd72a465286bc181b4e7e92dd4b8c0bc5c20a18dab46ff3ee8ae70940efd7d767b3dfb920edb4c74377bd418b838693d 15-bq27k.rules
03079030237440080e833dbfeff80327c1ad6a8129c6c730b401a3052cd00a986783ec3473a526b14ae73ba1f20653b4c7b2a6590839bfe6cc156bbbc3b7bb74 80-feedbackd-twl4030.rules
c6012aef28b096141b924fced226ec99fb93eb53b69c064a8887d8fecdf8dc08a3ba3db399e18d88374c6ef4c59013a30699c7e4d76e5cb771040582573a0527 90-touchscreen-dev.rules
d46adf47194c02b434cb46751003e67ee008d60978458e69b1f59dc709a7135a70f542918c29e359ba8308bdeda58a21e8efa446d06625511af05403db90e455 upower.conf
9b99feee42dd6bdd122769994c786d3127c41e0aa3321f19c82a9d3845cf07b522908621a31cbddd9599fe18c5c37127d9b4be4255cd7fa8e0e8983bf73eb41b upower.conf
c7837e6688f09c7d650ac7479b8881d4bad709480a71a1dea8b5bba4f4215d6b48a3aebd3f58923bbd48813559478d4ef137dcc9838d321722e141f0aa6a6085 x11-keymap
183dfdd545ba05e216209b1abe45e4af4e0ee16b2e73cff0e7ea7b9524ee35a1cf85213a77f32a1a94287aee6546885dbd71c6de1f4f1a1e2961e638ff27cdf6 xdefaults
a91f98daa60efa2beb2ff6b405097f92edca5f1bbb9e7675499139be52ca2570712f8f06f9032ef29f636f99c8f8da8b992f746eab6424aac04260c16158bcc2 xorg.conf

View file

@ -59,12 +59,12 @@ UsePercentageForPolicy=true
# will be used.
#
# Defaults:
# PercentageLow=20
# PercentageCritical=5
# PercentageAction=2
PercentageLow=20
PercentageCritical=10
PercentageAction=2
# PercentageLow=20.0
# PercentageCritical=5.0
# PercentageAction=2.0
PercentageLow=20.0
PercentageCritical=5.0
PercentageAction=2.0
# When UsePercentageForPolicy is false, the time remaining in seconds at
# which UPower will consider the battery low, critical, or take action for
@ -81,6 +81,13 @@ TimeLow=1200
TimeCritical=300
TimeAction=120
# Enable the risky CriticalPowerAction-Suspend
# This option is not recommended, but it is here for users who
# want to enable the riscky CriticalPowerAction, such as "Suspend"
# to fulfil their needs.
# Default is false
AllowRiskyCriticalPowerAction=true
# The action to take when "TimeAction" or "PercentageAction" above has been
# reached for the batteries (UPS or laptop batteries) supplying the computer
#
@ -88,7 +95,10 @@ TimeAction=120
# PowerOff
# Hibernate
# HybridSleep
# Suspend (AllowRiskyCriticalPowerAction should be true to use this option but risky)
# Ignore (AllowRiskyCriticalPowerAction should be true to use this option but risky)
#
# If Suspend isn't available or AllowRiskyCriticalPowerAction=false, HybridSleep will be used
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
CriticalPowerAction=HybridSleep
CriticalPowerAction=Ignore