device-nokia-n900: upower: switch to config fragment
As of upower 1.91.0, UPower supports config fragments, thus there is no longer a need to ship a full UPower.conf. The device-specific upower package can therefore be dropped, and the config fragment will be installed unconditionally as part of the device package. NB: It is still necessary to use a custom udev script to initiate poweroff due to low battery on the N900, since the fuel gauge has a hardware limitation which results in reporting 0% if the calibration is off, causing unwanted device shutdowns if UPower's mechanism is active. Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
This commit is contained in:
parent
0b83a665db
commit
1de140f47f
2 changed files with 6 additions and 111 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer="Danct12 <danct12@disroot.org>"
|
||||
pkgname=device-nokia-n900
|
||||
pkgver=53
|
||||
pkgver=54
|
||||
pkgrel=0
|
||||
pkgdesc="Nokia N900"
|
||||
url="https://postmarketos.org"
|
||||
|
|
@ -33,7 +33,6 @@ subpackages="
|
|||
$pkgname-i3blocks
|
||||
$pkgname-i3wm
|
||||
$pkgname-openrc
|
||||
$pkgname-upower
|
||||
$pkgname-sway
|
||||
$pkgname-wayland
|
||||
$pkgname-x11
|
||||
|
|
@ -171,6 +170,10 @@ package() {
|
|||
"$pkgdir"/usr/lib/modprobe.d/n900-module-blocklist.conf
|
||||
install -D -m644 "$srcdir"/bq27k-options.conf \
|
||||
"$pkgdir"/usr/lib/modprobe.d/bq27xxx-battery.conf
|
||||
|
||||
# UPower
|
||||
install -Dm644 "$srcdir"/upower.conf \
|
||||
"$pkgdir"/etc/UPower/UPower.conf.d/99-n900-fg.conf
|
||||
}
|
||||
|
||||
x11() {
|
||||
|
|
@ -207,13 +210,6 @@ i3wm() {
|
|||
"$subpkgdir"/usr/bin/pwr-key-handler
|
||||
}
|
||||
|
||||
upower() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel upower"
|
||||
replaces="upower"
|
||||
install -Dm644 "$srcdir"/upower.conf \
|
||||
"$subpkgdir"/etc/UPower/UPower.conf
|
||||
}
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
depends="wl1251-cal-openrc"
|
||||
|
|
@ -300,7 +296,7 @@ e440ed7a3070c17e003b86b72dbe6d8194d01b577ca8dd56dd066f216b6dda32bb965c780950f178
|
|||
465b9a0d2b46d0981c64b47cb1f656c2456a90b91b1751a2efad10af38a96030dd99108b1fd76ce31bf1ea0f236d55bed38b114d6bd712f09f8968de034c946c 10-nokia-modem.rules
|
||||
1acc441b9f83dc91fd65fa3f89b8205bfd72a465286bc181b4e7e92dd4b8c0bc5c20a18dab46ff3ee8ae70940efd7d767b3dfb920edb4c74377bd418b838693d 15-bq27k.rules
|
||||
c6012aef28b096141b924fced226ec99fb93eb53b69c064a8887d8fecdf8dc08a3ba3db399e18d88374c6ef4c59013a30699c7e4d76e5cb771040582573a0527 90-touchscreen-dev.rules
|
||||
9b99feee42dd6bdd122769994c786d3127c41e0aa3321f19c82a9d3845cf07b522908621a31cbddd9599fe18c5c37127d9b4be4255cd7fa8e0e8983bf73eb41b upower.conf
|
||||
1087d9699f6c4325a1d7ba2e6faf7fda87953fc0d3b0ef97de1da05187ba8f942f78806916cfb2ae9456fa2e63b2adf08e1e8118dc834c31a677755bab0fbf9a upower.conf
|
||||
4de54d007bd354461fe4d6d455fe3f29694c132a3996c79b68070d606b5ca1839f9027202ebb731035f0bf6504b42fbd5ab15c7b47b7f308ce768a84d45024c4 xkb-keymap
|
||||
a91f98daa60efa2beb2ff6b405097f92edca5f1bbb9e7675499139be52ca2570712f8f06f9032ef29f636f99c8f8da8b992f746eab6424aac04260c16158bcc2 xorg.conf
|
||||
183dfdd545ba05e216209b1abe45e4af4e0ee16b2e73cff0e7ea7b9524ee35a1cf85213a77f32a1a94287aee6546885dbd71c6de1f4f1a1e2961e638ff27cdf6 xresources
|
||||
|
|
|
|||
|
|
@ -1,104 +1,3 @@
|
|||
# Only the system vendor should modify this file, ordinary users
|
||||
# should not have to change anything.
|
||||
|
||||
[UPower]
|
||||
|
||||
# Enable the Watts Up Pro device.
|
||||
#
|
||||
# The Watts Up Pro contains a generic FTDI USB device without a specific
|
||||
# vendor and product ID. When we probe for WUP devices, we can cause
|
||||
# the user to get a perplexing "Device or resource busy" error when
|
||||
# attempting to use their non-WUP device.
|
||||
#
|
||||
# The generic FTDI device is known to also be used on:
|
||||
#
|
||||
# - Sparkfun FT232 breakout board
|
||||
# - Parallax Propeller
|
||||
#
|
||||
# default=false
|
||||
EnableWattsUpPro=false
|
||||
|
||||
# Don't poll the kernel for battery level changes.
|
||||
#
|
||||
# Some hardware will send us battery level changes through
|
||||
# events, rather than us having to poll for it. This option
|
||||
# allows disabling polling for hardware that sends out events.
|
||||
#
|
||||
# default=false
|
||||
NoPollBatteries=false
|
||||
|
||||
# Do we ignore the lid state
|
||||
#
|
||||
# Some laptops are broken. The lid state is either inverted, or stuck
|
||||
# on or off. We can't do much to fix these problems, but this is a way
|
||||
# for users to make the laptop panel vanish, a state that might be used
|
||||
# by a couple of user-space daemons. On Linux systems, see also
|
||||
# logind.conf(5).
|
||||
#
|
||||
# default=false
|
||||
IgnoreLid=false
|
||||
|
||||
# Policy for warnings and action based on battery levels
|
||||
#
|
||||
# Whether battery percentage based policy should be used. The default
|
||||
# is to use the time left, change to true to use the percentage, which
|
||||
# should work around broken firmwares. It is also more reliable than
|
||||
# the time left (frantically saving all your files is going to use more
|
||||
# battery than letting it rest for example).
|
||||
# default=true
|
||||
UsePercentageForPolicy=true
|
||||
|
||||
# When UsePercentageForPolicy is true, the levels at which UPower will
|
||||
# consider the battery low, critical, or take action for the critical
|
||||
# battery level.
|
||||
#
|
||||
# This will also be used for batteries which don't have time information
|
||||
# such as that of peripherals.
|
||||
#
|
||||
# If any value is invalid, or not in descending order, the defaults
|
||||
# will be used.
|
||||
#
|
||||
# Defaults:
|
||||
# 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
|
||||
# the critical battery level.
|
||||
#
|
||||
# If any value is invalid, or not in descending order, the defaults
|
||||
# will be used.
|
||||
#
|
||||
# Defaults:
|
||||
# TimeLow=1200
|
||||
# TimeCritical=300
|
||||
# TimeAction=120
|
||||
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
|
||||
#
|
||||
# Possible values are:
|
||||
# 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=Ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue