Skip to content

Commit

Permalink
feat: Add patched switcheroo-control by Sentry, fixes dGPU/iGPU switc…
Browse files Browse the repository at this point in the history
…hing
  • Loading branch information
KyleGospo committed Feb 15, 2024
1 parent 0b14aae commit 3f3a1eb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/repo/fedora-$
wget https://copr.fedorainfracloud.org/coprs/kylegospo/webapp-manager/repo/fedora-$(rpm -E %fedora)/kylegospo-webapp-manager-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_kylegospo-webapp-manager.repo && \
wget https://copr.fedorainfracloud.org/coprs/hhd-dev/hhd/repo/fedora-$(rpm -E %fedora)/hhd-dev-hhd-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_hhd-dev-hhd.repo && \
wget https://copr.fedorainfracloud.org/coprs/che/nerd-fonts/repo/fedora-$(rpm -E %fedora)/che-nerd-fonts-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_che-nerd-fonts.repo && \
wget https://copr.fedorainfracloud.org/coprs/sentry/switcheroo-control_discrete/repo/fedora-$(rpm -E %fedora)/sentry-switcheroo-control_discrete-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_sentry-switcheroo-control_discrete.repo && \
wget https://pkgs.tailscale.com/stable/fedora/tailscale.repo -O /etc/yum.repos.d/tailscale.repo && \
sed -i 's@gpgcheck=1@gpgcheck=0@g' /etc/yum.repos.d/tailscale.repo

Expand Down Expand Up @@ -184,6 +185,7 @@ RUN rpm-ostree override replace \
|| true

# Install Valve's patched Mesa, Pipewire and Bluez
# Install patched switcheroo control with proper discrete GPU support
RUN rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:kylegospo:bazzite-multilib \
Expand All @@ -209,7 +211,11 @@ RUN rpm-ostree override replace \
bluez-obexd \
xorg-x11-server-Xwayland && \
rpm-ostree install \
mesa-vdpau-drivers-freeworld.x86_64
mesa-vdpau-drivers-freeworld.x86_64 && \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:sentry:switcheroo-control_discrete \
switcheroo-control

# Remove unneeded packages
RUN rpm-ostree override remove \
Expand Down Expand Up @@ -523,6 +529,7 @@ RUN /tmp/image-info.sh && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-webapp-manager.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_hhd-dev-hhd.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_che-nerd-fonts.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_sentry-switcheroo-control_discrete.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/tailscale.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/charm.repo && \
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/user.conf && \
Expand Down

0 comments on commit 3f3a1eb

Please sign in to comment.