Skip to content

Commit 91ae917

Browse files
authored
feat: Add RyzenAdj to desktop images (#1179)
* feat: Ship ryzenadj on desktop images Signed-off-by: RJ Trujillo <eyecantcu@pm.me> * fix(framework/amd): Allow MMIO access in userspace for RyzenAdj Signed-off-by: RJ Trujillo <eyecantcu@pm.me> * fix(framework/amd): Load Ryzen SMU on startup for RyzenAdj Signed-off-by: RJ Trujillo <eyecantcu@pm.me> * chore(README): Note RyzenAdj support for AMD Framework Laptops Signed-off-by: RJ Trujillo <eyecantcu@pm.me> --------- Signed-off-by: RJ Trujillo <eyecantcu@pm.me>
1 parent f64fb7b commit 91ae917

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ RUN rpm-ostree install \
290290
compsize \
291291
input-remapper \
292292
system76-scheduler \
293+
ryzenadj \
293294
powertop \
294295
i2c-tools \
295296
udica \
@@ -694,7 +695,6 @@ RUN rpm-ostree install \
694695
vpower \
695696
ds-inhibit \
696697
steam_notif_daemon \
697-
ryzenadj \
698698
sdgyrodsu \
699699
ibus-pinyin \
700700
ibus-table-chinese-cangjie \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Variant designed for usage as an alternative to SteamOS on the Steam Deck, and f
129129
- Applies SteamOS's kernel parameters.
130130
- Color calibrated display profiles for matte and reflective Steam Deck screens included.
131131
- Default-disabled power-user features, including:
132-
- Service for low-risk undervolting of the Steam Deck via [RyzenAdj](https://github.com/FlyGoat/RyzenAdj) and [Ryzen SMU](https://gitlab.com/leogx9r/ryzen_smu), see `ryzenadj.service` and `/etc/default/ryzenadj`.
132+
- Service for low-risk undervolting of the Steam Deck as well as AMD Framework Laptops via [RyzenAdj](https://github.com/FlyGoat/RyzenAdj) and [Ryzen SMU](https://gitlab.com/leogx9r/ryzen_smu), see `ryzenadj.service` and `/etc/default/ryzenadj`.
133133
- Service for limiting the max charge level of the battery, see `batterylimit.service` and `/etc/default/batterylimit`. <sup><sub>(Works even when the device is off)</sub></sup>
134134
- Built in support for display overclocking. For example, add `GAMESCOPE_OVERRIDE_REFRESH_RATE=40,70` to `/etc/environment`.
135135
- 32GB RAM mod your Steam Deck? Enjoy double the maximum VRAM amount, automatically applied. <sup><sub>(Can you share your soldering skills?)</sub></sup>
File renamed without changes.

system_files/deck/shared/usr/lib/systemd/system/ryzenadj.service renamed to system_files/desktop/shared/usr/lib/systemd/system/ryzenadj.service

File renamed without changes.

system_files/desktop/shared/usr/libexec/bazzite-hardware-setup

100755100644
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
77
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
88

99
# SCRIPT VERSION
10-
HWS_VER=40
10+
HWS_VER=41
1111
HWS_VER_FILE="/etc/bazzite/hws_version"
1212
HWS_VER_RAN=$(cat $HWS_VER_FILE)
1313

@@ -59,7 +59,12 @@ if [[ $IMAGE_NAME =~ "deck" && ":AOKZOE A1 AR07:" =~ ":$SYS_ID:" ]]; then
5959
fi
6060

6161
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then
62-
if [[ "GenuineIntel" == "$CPU_VENDOR" ]]; then
62+
if [[ "AuthenticAMD" == "$CPU_VENDOR" ]]; then
63+
if [[ ! $KARGS =~ "iomem" ]]; then
64+
echo "AMD Framework Laptop detected, adding needed kargs for ryzenadj"
65+
NEEDED_KARGS+=("--append-if-missing=iomem=relaxed")
66+
fi
67+
elif [[ "GenuineIntel" == "$CPU_VENDOR" ]]; then
6368
if [[ ! $KARGS =~ "hid_sensor_hub" ]]; then
6469
echo "Intel Framework Laptop detected, applying needed keyboard fix"
6570
NEEDED_KARGS+=("--append-if-missing=module_blacklist=hid_sensor_hub");
@@ -177,10 +182,16 @@ else
177182
echo "No minimum-free ZRAM changes needed"
178183
fi
179184

180-
# FRAMEWORK 13 AMD FIXES
185+
# FRAMEWORK AMD FIXES
181186
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then
182-
if [[ $SYS_ID == "Laptop ("* ]]; then
183-
if [[ "AuthenticAMD" == "$CPU_VENDOR" ]]; then
187+
if [[ "AuthenticAMD" == "$CPU_VENDOR" ]]; then
188+
# Load Ryzen SMU on AMD Framework Laptops
189+
if ! [[ -f "/etc/modules-load.d/ryzen_smu.conf" ]]; then
190+
mkdir -p "/etc/modules-load.d"
191+
printf "# Load ryzen_smu driver upon startup\nryzen_smu\n" >> "/etc/modules-load.d/ryzen_smu.conf"
192+
fi
193+
# Framework 13 AMD fixes
194+
if [[ $SYS_ID == "Laptop ("* ]]; then
184195
if [[ ! -f /etc/modprobe.d/alsa.conf ]]; then
185196
echo 'Fixing 3.5mm jack'
186197
sudo tee /etc/modprobe.d/alsa.conf <<< "options snd-hda-intel index=1,0 model=auto,dell-headset-multi"

0 commit comments

Comments
 (0)