Skip to content

Commit 1a877ba

Browse files
committed
chore: Restore steam-patch thanks to latest updates
feat(legion): Support 30W TDP control on Legion Go from gamemode.
1 parent da6b18b commit 1a877ba

File tree

5 files changed

+41
-1
lines changed

5 files changed

+41
-1
lines changed

Containerfile

+2
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,8 @@ RUN rpm-ostree install \
454454
xz --check=crc32 /tmp/linux-firmware-neptune/cs35l41-dsp1-spk-{cali.bin,cali.wmfw,prot.bin,prot.wmfw} && \
455455
mv -vf /tmp/linux-firmware-neptune/* /usr/lib/firmware/cirrus/ && \
456456
rm -rf /tmp/linux-firmware-neptune && \
457+
wget $(jq -r '.assets[].browser_download_url | select(endswith("steam-patch"))' <<< $(curl -s 'https://api.github.com/repos/KyleGospo/steam-patch/releases' | jq -r "first(.[] | select(.prerelease == "false"))")) -O /usr/bin/steam-patch && \
458+
chmod +x /usr/bin/steam-patch && \
457459
if [[ "${FEDORA_MAJOR_VERSION}" -lt "39" ]]; then \
458460
rpm-ostree install \
459461
mesa-va-drivers \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
systemctl enable --now steam-patch@$(systemd-escape $1).service
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE policyconfig PUBLIC
3+
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
4+
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
5+
<policyconfig>
6+
7+
<vendor>Bazzite</vendor>
8+
<vendor_url>https://github.com/ublue-os/bazzite/</vendor_url>
9+
10+
<action id="org.bazzite.steam-patch.pkexec">
11+
<description>Some Steam patches, fixing broken Steam features on Asus Rog Ally and other third-party handhelds</description>
12+
<icon_name>package-x-generic</icon_name>
13+
<defaults>
14+
<allow_any>yes</allow_any>
15+
<allow_inactive>yes</allow_inactive>
16+
<allow_active>yes</allow_active>
17+
</defaults>
18+
<annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/bazzite-enable-steam-patch</annotate>
19+
</action>
20+
21+
</policyconfig>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
polkit.addRule(function(action, subject) {
2+
if (action.id == "org.bazzite.steam-patch.pkexec" &&
3+
subject.isInGroup("wheel")) {
4+
return polkit.Result.YES;
5+
}
6+
});

system_files/desktop/shared/usr/bin/bazzite-user-setup

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
77
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
88

99
# SCRIPT VERSION
10-
USER_SETUP_VER=10
10+
USER_SETUP_VER=11
1111
USER_SETUP_VER_FILE="$HOME/.bazzite-configured"
1212
USER_SETUP_VER_RAN=$(cat $USER_SETUP_VER_FILE)
1313
USER_SETUP_FEDORA_VER_FILE="$HOME/.bazzite-configured-fedora-version"
@@ -127,6 +127,14 @@ else
127127
fi
128128
fi
129129

130+
# Steam Patch setup
131+
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
132+
if [[ ! ":Jupiter:" =~ ":$SYS_ID:" ]]; then
133+
echo 'Enabling Steam-Patch'
134+
pkexec /usr/libexec/bazzite-enable-steam-patch "$USER"
135+
fi
136+
fi
137+
130138
# Prevent future executions
131139
echo "Writing state file"
132140
echo $USER_SETUP_VER > $USER_SETUP_VER_FILE

0 commit comments

Comments
 (0)