device-*: switch to UPower config fragments

As of upower 1.91.0, UPower supports config fragments, thus there is no longer
a need to ship a full UPower.conf.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8794>
This commit is contained in:
Sicelo A. Mhlongo
2026-06-11 17:25:47 +00:00
parent 2edcb111d8
commit b495aa576b
8 changed files with 27 additions and 387 deletions
@@ -2,8 +2,8 @@
# Co-Maintainer: Jan Jasper de Kroon <jajadekroon@gmail.com>
maintainer="Arnav Singh <me@arnavion.dev>"
pkgname=device-pine64-pinephone
pkgver=11
pkgrel=1
pkgver=12
pkgrel=0
pkgdesc="PINE64 PinePhone"
url="https://postmarketos.org"
license="MIT"
@@ -188,11 +188,10 @@ plasma_mobile() {
upower() {
install_if="$pkgname=$pkgver-r$pkgrel upower"
replaces="upower"
# Shutdown when PMIC reports critical battery level
install -Dm644 "$srcdir"/UPower.conf \
"$subpkgdir"/etc/UPower/UPower.conf
"$subpkgdir"/etc/UPower/UPower.conf.d/50-pinephone.conf
}
shelli() {
@@ -258,7 +257,7 @@ bac664c504d9a3adc6e3d25f24ac63cf7c449a82374544a5b56c259dc25af580897b9dc992865ac8
9170da7ac869254644f2fc8d914102f2c16e917dbeb53e33b96c76936711d0540f55fa5c2526d73d5fe244500bc2728bc9d629e2524cf52c573d11e833aee666 60-flashlight.rules
8b6fa7b12c15f439c561901f3ffe24a1ef2a0c343401c0a79281060854ab29e08a1fb5e7adae8684b12aa9f535ed99e2dad993dce9724822cb0fbf2497dd86e5 70-wifi-pm.rules
7dc2b7c20b4a2b15f597a6417bd01797643dad84a3683b0dee648e030fb6326e9d020307643fdcdf1bb43fc44af9975697e417003bd359610bae2d8ce614fc00 90-modem-eg25.rules
ed0e03f7e1c0348c06be9a7922414469245604ce813bbf0c8910ef211cb993bbb0d0d4615c9c961d50712415f85d6b73e0cf02780ac784666aac56e4889341e4 UPower.conf
46458e2981dbfad6d671d24aacf78aff127d7b8d5c3f35915f442bc36a5009f5fccede09a7ec53612ff2a6784d8961bcf99c5c8dc9ff5f9178bcc46b4373a0c3 UPower.conf
681c096e3cc99850aa87c8c3dcf941e68c9d30046fa8989382f2f80d238c01496fb1cadde3df3a1a7e90883058c6badfe24855edb927211f2f665bfcfb4af75a deviceinfo
b8482111e6fa805779c5c8d56c83ccf9ad360fe6481ea4e8e1fa3b71c82fe0c8de948c6f69d2b53fbcf43b4420a976f783f5d52947eccca95f24034bd4f3e32a modules-initfs
3dd6d612c381cb0002049d1974d8fb5aa5a53a1eb4d6bcbf62eb2ad52cfdc45f0f6ad24a699716d3513b0371aa1316f25dc72afc10d7176cc3b99d0965c3f030 hwtest.ini
@@ -1,94 +1,5 @@
# 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=10
# PercentageCritical=3
# PercentageAction=2
PercentageLow=20
PercentageCritical=17
PercentageAction=15
# When UsePercentageForPolicy is false, the time remaining 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
# 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
#
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
PercentageLow=20.0
PercentageCritical=17.0
PercentageAction=15.0
CriticalPowerAction=PowerOff
+3 -4
View File
@@ -2,7 +2,7 @@
maintainer="Casey Connolly <kcxt@postmarketos.org>"
pkgname=soc-qcom
pkgdesc="Common package for Qualcomm devices"
pkgver=8
pkgver=9
pkgrel=0
url="https://postmarketos.org"
license="BSD-3-Clause"
@@ -17,7 +17,6 @@ depends="
replaces="
soc-qcom-sdm845
soc-qcom-sdm845-nonfree-firmware
upower
"
subpackages="
$pkgname-gstreamer-openrc:gstreamer_openrc
@@ -54,7 +53,7 @@ package() {
# Shutdown when battery is critical instead of sleep
install -Dm644 "$srcdir"/UPower.conf \
"$pkgdir"/etc/UPower/UPower.conf
"$pkgdir"/etc/UPower/UPower.conf.d/50-soc-qcom.conf
install -Dm644 "$srcdir"/51-qcom.conf \
-t "$pkgdir"/usr/share/wireplumber/wireplumber.conf.d
@@ -189,7 +188,7 @@ pulseaudio_systemd() {
sha512sums="
28c14f47eaedec577d152001c51753537c98f267ac4a0acf78a304efebe5f6a1b4dc6d501497da9a0a925806a1d9c80b25e001cf9b1eb21efa22cd6a41ff753b 51-qcom.conf
9d455b56558d453d501a1ad869ffa79f9952ed43485a9847d506db6a78bfcd9f9c9d855660ee1d368eb74f4429385ec166addc30d802261c75562e785fe84c52 UPower.conf
72e8ed55499976574fa09e6c3b79c0e046c786932179cfd30788a80037906a45861f09f6663fa1bc15a4571be97b3a40ee3631988bffd1c9ee9f360358b6486a UPower.conf
6fb4c0bd8b7ed534d855a6732ccff783960e3cfa0e0cc7effcbb93afa00798dec15361a37a3200081bc114c8d266b7a0851cc4e819ad36eabdb47a50c72620d9 call_audio_idle_suspend_workaround.confd
5a58475b6e2ee1d655f3f23d8dc19e1cb2f32f1dfff3b9a9337d9c5baad1ec24bfaec0fb9cc03f00e5a291bee27c6b8bffbc65157e2bee5d65ef6d1adcb0910b call_audio_idle_suspend_workaround.initd
6f08583574782c01d826ee6b67dd0ceca7b700559efa49042c4b9f182fcd7a4f390c8b011d8ede1820f0ac151eaee24e31a8bac127e2aaf9a6fd605eb17fbea9 call-audio-idle-suspend-workaround.service
+3 -92
View File
@@ -1,94 +1,5 @@
# 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
# PercentageCritical=5
# PercentageAction=2
PercentageLow=10
PercentageCritical=5
PercentageAction=3
# 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
# 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
#
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
PercentageLow=10.0
PercentageCritical=5.0
PercentageAction=3.0
CriticalPowerAction=PowerOff
@@ -2,8 +2,8 @@
maintainer=""
pkgname=device-pine64-pinetab
pkgdesc="PINE64 PineTab"
pkgver=4
pkgrel=1
pkgver=5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@@ -155,11 +155,10 @@ plasma_mobile() {
upower() {
install_if="$pkgname=$pkgver-r$pkgrel upower"
replaces="upower"
# Shutdown when PMIC reports critical battery level
install -Dm644 "$srcdir"/UPower.conf \
"$subpkgdir"/etc/UPower/UPower.conf
"$subpkgdir"/etc/UPower/UPower.conf.d/50-pinetab.conf
}
sha512sums="
@@ -174,5 +173,5 @@ a2fd8037c9a1af000f31c7005436d791525317f818c553d1e2f472b4df76c71d769ecbf67b369a47
7a19bfc3bf08c11bf34943f822fcae9de57dbdae4759281386e77f711c5d9f7a58fd4970166c4db751e9c29585291fe52f58bc622d80b835d6c645eb339a7263 PineTab.conf
9c472065b19141dd4c7555869b955de2e679b36e597f9fa3bdac18d0e9460986b0e2fffe1e04751301305f1b6474c1375803afb7d6212eeae91b4905d0bf8ff8 pulse-pinetab.conf
6374ef977eab14b71fa88057ebd52ca03035e387e5f41504598a990f24b2e92bccd2db476c545dc541000e08fccdecb6f1cd63e25b5835df706269e0384dacc7 weston.ini
ed0e03f7e1c0348c06be9a7922414469245604ce813bbf0c8910ef211cb993bbb0d0d4615c9c961d50712415f85d6b73e0cf02780ac784666aac56e4889341e4 UPower.conf
46458e2981dbfad6d671d24aacf78aff127d7b8d5c3f35915f442bc36a5009f5fccede09a7ec53612ff2a6784d8961bcf99c5c8dc9ff5f9178bcc46b4373a0c3 UPower.conf
"
@@ -1,94 +1,5 @@
# 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=10
# PercentageCritical=3
# PercentageAction=2
PercentageLow=20
PercentageCritical=17
PercentageAction=15
# When UsePercentageForPolicy is false, the time remaining 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
# 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
#
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
PercentageLow=20.0
PercentageCritical=17.0
PercentageAction=15.0
CriticalPowerAction=PowerOff
+4 -5
View File
@@ -1,7 +1,7 @@
maintainer="Nikroks <nikroks@mainlining.org>"
pkgname=soc-qcom-sm7125
pkgver=2
pkgrel=1
pkgver=3
pkgrel=0
pkgdesc="Common package for Qualcomm SM7125 devices"
url="https://postmarketos.org"
license="BSD-3-Clause"
@@ -11,7 +11,6 @@ depends="
msm-modem-uim-selection
bootmac
"
replaces="upower"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-nonfree-firmware-openrc:nonfree_firmware_openrc
@@ -28,7 +27,7 @@ source="
package() {
# Shutdown when battery is critical instead of sleep
install -Dm644 "$srcdir"/UPower.conf \
"$pkgdir"/etc/UPower/UPower.conf
"$pkgdir"/etc/UPower/UPower.conf.d/50-sm7125.conf
}
nonfree_firmware() {
@@ -60,5 +59,5 @@ ucm() {
sha512sums="
18058e4ed1a2416841d63269d262ae1cbe9be828882580d934501fc842340b6e8641c3a79202c7c27ddad81ef3f2efffdf5dbc24e39fd7282700fd1bd5ba1454 30-gpu-firmware.files
7b383b931932a85812040a8a445a2d45cb6f31fa966073b1709b2d922e8a5fad0c39d0b9501c835bcf016d2e999f9bdb990fe946d4b3c811002105d2ab84b8f5 alsa-ucm-conf-a34eab049098b78ac5f586b11d93060046da3247.tar.gz
9d455b56558d453d501a1ad869ffa79f9952ed43485a9847d506db6a78bfcd9f9c9d855660ee1d368eb74f4429385ec166addc30d802261c75562e785fe84c52 UPower.conf
72e8ed55499976574fa09e6c3b79c0e046c786932179cfd30788a80037906a45861f09f6663fa1bc15a4571be97b3a40ee3631988bffd1c9ee9f360358b6486a UPower.conf
"
+3 -92
View File
@@ -1,94 +1,5 @@
# 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
# PercentageCritical=5
# PercentageAction=2
PercentageLow=10
PercentageCritical=5
PercentageAction=3
# 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
# 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
#
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
PercentageLow=10.0
PercentageCritical=5.0
PercentageAction=3.0
CriticalPowerAction=PowerOff