Skip to content

Commit 11c6efc

Browse files
committed
feat(deck): Add service for setting the max battery charge level exposed by the latest steamdeck_hwmon driver
1 parent 0ea2139 commit 11c6efc

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Maximum amount the battery will charge to, including when the device is off.
2+
MAX_BATTERY_CHARGE_LEVEL=80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=Service for setting the Steam Deck Battery Charging Limit
3+
4+
[Service]
5+
Type=oneshot
6+
EnvironmentFile=-/etc/default/%p
7+
ExecStart=echo ${MAX_BATTERY_CHARGE_LEVEL} > /sys/class/hwmon/hwmon*/max_battery_charge_level
8+
9+
[Install]
10+
WantedBy=multi-user.target

system_files/deck/shared/etc/systemd/system/ryzenadj.service

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description=CPU Curve Undervolt for Steam Deck
44
[Service]
55
Type=oneshot
66
EnvironmentFile=-/etc/default/%p
7-
ExecStart=/usr/sbin/ryzenadj --set-coall={UNDERVOLT_AMOUNT}
7+
ExecStart=/usr/sbin/ryzenadj --set-coall=${UNDERVOLT_AMOUNT}
88

99
[Install]
1010
WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target ac.target battery.target

0 commit comments

Comments
 (0)