mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-04 03:39:58 +00:00
Merge branch 'steam-patch'
This commit is contained in:
commit
98b1ef2530
@ -350,7 +350,8 @@ RUN rpm-ostree install \
|
||||
wget https://gitlab.com/evlaV/linux-firmware-neptune/-/raw/jupiter/cs35l41-dsp1-spk-prot.wmfw -O /tmp/linux-firmware-neptune/cs35l41-dsp1-spk-prot.wmfw && \
|
||||
xz --check=crc32 /tmp/linux-firmware-neptune/cs35l41-dsp1-spk-{cali.bin,cali.wmfw,prot.bin,prot.wmfw} && \
|
||||
mv -vf /tmp/linux-firmware-neptune/* /usr/lib/firmware/cirrus/ && \
|
||||
rm -rf /tmp/linux-firmware-neptune
|
||||
rm -rf /tmp/linux-firmware-neptune && \
|
||||
wget $(jq -r '.assets[].browser_download_url | select(endswith("steam-patch"))' <<< $(curl -s 'https://api.github.com/repos/Maclay74/steam-patch/releases' | jq -r "first(.[] | select(.prerelease == "false"))")) -O /usr/bin/steam-patch
|
||||
|
||||
# Install Steam and Lutris into their own OCI layer
|
||||
# Add bootstraplinux_ubuntu12_32.tar.xz used by gamescope-session (Thanks ChimeraOS! - https://chimeraos.org/)
|
||||
|
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Steam Patches Loader
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/pkexec /usr/bin/steam-patch --user=%u
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
|
||||
<vendor>Bazzite</vendor>
|
||||
<vendor_url>https://github.com/ublue-os/bazzite/</vendor_url>
|
||||
|
||||
<action id="org.bazzite.steam-patch.pkexec">
|
||||
<description>Some Steam patches, fixing broken Steam features on Asus Rog Ally and other third-party handhelds</description>
|
||||
<icon_name>package-x-generic</icon_name>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/steam-patch</annotate>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
@ -0,0 +1,6 @@
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.bazzite.steam-patch.pkexec" &&
|
||||
subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
@ -6,7 +6,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
|
||||
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
||||
|
||||
# SCRIPT VERSION
|
||||
HWS_VER=4
|
||||
HWS_VER=5
|
||||
HWS_VER_FILE="/etc/bazzite/hws_version"
|
||||
HWS_VER_RAN=$(cat $HWS_VER_FILE)
|
||||
|
||||
@ -19,6 +19,7 @@ KNOWN_IMAGE_FLAVOR=$(cat $KNOWN_IMAGE_FLAVOR_FILE)
|
||||
# GLOBAL
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
GPU_ID=$(lspci -k | grep -A 3 -E "(VGA|3D)")
|
||||
PRODUCT_NAME="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
KARGS=$(rpm-ostree kargs)
|
||||
NEEDED_KARGS=""
|
||||
echo "Current kargs: $KARGS"
|
||||
@ -139,12 +140,23 @@ if [[ -f $HWS_VER_FILE && $HWS_VER = $HWS_VER_RAN ]]; then
|
||||
fi
|
||||
|
||||
if [[ $IMAGE_NAME =~ "deck" ]]; then
|
||||
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
|
||||
# Future updates to deck on jupiter here
|
||||
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
|
||||
# Future updates to Deck on Jupiter here
|
||||
else
|
||||
echo "Generic device detected. Performing setup..."
|
||||
|
||||
systemctl enable --now handycon.service
|
||||
if [[ \
|
||||
":AYA NEO:AYANEO:AIR Plus:" =~ ":$PRODUCT_NAME:" || \
|
||||
"ONEXPLAYER" =~ "$PRODUCT_NAME" || \
|
||||
"AOKZOE" =~ "$PRODUCT_NAME" || \
|
||||
":G1619-01:G1621-02:MicroPC:" =~ ":$SYS_ID:" \
|
||||
]]; then
|
||||
echo "HandyGCCS supported handheld detected, enabling handycon & steam-patch."
|
||||
systemctl enable --now handycon.service
|
||||
systemctl enable --now --global steam-patch.service
|
||||
elif [[ ":ROG Ally RC71L_RC71L:" =~ ":$SYS_ID:" ]]
|
||||
echo "ROG Ally detected. Enabling steam-patch."
|
||||
systemctl enable --now --global steam-patch.service
|
||||
fi
|
||||
systemctl disable --now jupiter-fan-control.service
|
||||
systemctl disable --now vpower.service
|
||||
systemctl disable --now jupiter-biosupdate.service
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# SCRIPT VERSION
|
||||
USER_SETUP_VER=2
|
||||
USER_SETUP_VER=3
|
||||
USER_SETUP_VER_FILE="$HOME/.bazzite-configured"
|
||||
USER_SETUP_VER_RAN=$(cat $USER_SETUP_VER_FILE)
|
||||
|
||||
@ -14,6 +14,8 @@ fi
|
||||
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
|
||||
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
|
||||
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
PRODUCT_NAME="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
|
||||
if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
|
||||
echo 'Running setup for Kinoite'
|
||||
@ -109,6 +111,18 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Steam Patch setup
|
||||
if [[ \
|
||||
":ROG Ally RC71L_RC71L:" =~ ":$SYS_ID:" || \
|
||||
":AYA NEO:AYANEO:AIR Plus:" =~ ":$PRODUCT_NAME:" || \
|
||||
"ONEXPLAYER" =~ "$PRODUCT_NAME" || \
|
||||
"AOKZOE" =~ "$PRODUCT_NAME" || \
|
||||
":G1619-01:G1621-02:MicroPC:" =~ ":$SYS_ID:" \
|
||||
]]; then
|
||||
mkdir -p "$HOME/.steam/steam/"
|
||||
touch "$HOME/.steam/steam/.cef-enable-remote-debugging"
|
||||
fi
|
||||
|
||||
# Enable NTP
|
||||
timedatectl set-ntp true
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user