Skip to content

Commit

Permalink
Merge pull request #9 from ublue-os/main
Browse files Browse the repository at this point in the history
[pull] main from ublue-os:main
  • Loading branch information
pull[bot] authored Oct 8, 2024
2 parents c28f2df + b608772 commit c9eb239
Show file tree
Hide file tree
Showing 20 changed files with 154 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
is_latest_version: true
is_stable_version: true
kernel_flavor: fsync-ba # must match a kernel_flavor from akmods repo
kernel_version: 6.9.12-207.fsync.fc40.x86_64 # must match a cached version of the above flavor
kernel_version: 6.9.12-208.fsync.fc40.x86_64 # must match a cached version of the above flavor
exclude:
- base_name: bazzite
target_nvidia_flavor: nvidia
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Comment filter
uses: DecimalTurn/Comment-Filter@558e9a0b05c9a211a581ee365c90a0a3e3ff9476 #v0.1.3
uses: DecimalTurn/Comment-Filter@9683f002007cc8739893f27123f6d3d857ea7808 #v0.1.4
2 changes: 1 addition & 1 deletion .github/workflows/sign_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
echo "NAME=$name" >> $GITHUB_OUTPUT
- name: Setup Cosign
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0

- name: Sign Image
env:
Expand Down
65 changes: 26 additions & 39 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG BASE_IMAGE_FLAVOR="${BASE_IMAGE_FLAVOR:-main}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG NVIDIA_FLAVOR=${NVIDIA_FLAVOR:-nvidia}""
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-fsync-ba}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.12-207.fsync.fc40.x86_64}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.12-8.fsync.fc40.x86_64}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$BASE_IMAGE_FLAVOR}"
ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}"
Expand All @@ -24,7 +24,7 @@ ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG NVIDIA_FLAVOR=${NVIDIA_FLAVOR:-nvidia}""
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-fsync-ba}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.12-207.fsync.fc40.x86_64}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.12-208.fsync.fc40.x86_64}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-kinoite}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
Expand Down Expand Up @@ -215,7 +215,12 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
curl -Lo /etc/yum.repos.d/_copr_rodoma92-kde-cdemu-manager.repo https://copr.fedorainfracloud.org/coprs/rodoma92/kde-cdemu-manager/repo/fedora-"${FEDORA_MAJOR_VERSION}"/rodoma92-kde-cdemu-manager-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
curl -Lo /etc/yum.repos.d/_copr_rodoma92-rmlint.repo https://copr.fedorainfracloud.org/coprs/rodoma92/rmlint/repo/fedora-"${FEDORA_MAJOR_VERSION}"/rodoma92-rmlint-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
curl -Lo /etc/yum.repos.d/tailscale.repo https://pkgs.tailscale.com/stable/fedora/tailscale.repo && \
rpm-ostree install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
sed -i 's@gpgcheck=1@gpgcheck=0@g' /etc/yum.repos.d/tailscale.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
curl -Lo /etc/yum.repos.d/negativo17-fedora-steam.repo https://negativo17.org/repos/fedora-steam.repo && \
/usr/libexec/containerbuild/cleanup.sh && \
ostree container commit

Expand Down Expand Up @@ -300,12 +305,11 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
/usr/libexec/containerbuild/cleanup.sh && \
ostree container commit

# Add ublue packages, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion
# Add ublue packages
RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=akmods,src=/rpms,dst=/tmp/akmods-rpms \
--mount=type=bind,from=akmods-extra,src=/rpms,dst=/tmp/akmods-extra-rpms \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo && \
rpm-ostree install \
/tmp/akmods-rpms/kmods/*kvmfr*.rpm \
/tmp/akmods-rpms/kmods/*xone*.rpm \
Expand All @@ -321,26 +325,23 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
/tmp/akmods-extra-rpms/kmods/*bmi260*.rpm \
/tmp/akmods-extra-rpms/kmods/*ryzen-smu*.rpm \
/tmp/akmods-extra-rpms/kmods/*evdi*.rpm && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
fwupd \
fwupd-plugin-flashrom \
fwupd-plugin-modem-manager \
fwupd-plugin-uefi-capsule-data && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-*.repo && \
/usr/libexec/containerbuild/cleanup.sh && \
ostree container commit

# Install Valve's patched Mesa, Pipewire, Bluez, and Xwayland
# Install patched switcheroo control with proper discrete GPU support
RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
rpm-ostree override remove \
mesa-va-drivers-freeworld && \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:kylegospo:bazzite-multilib \
mesa-filesystem \
mesa-libxatracker \
mesa-libglapi \
mesa-dri-drivers \
Expand All @@ -362,12 +363,12 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
bluez-cups \
bluez-libs \
xorg-x11-server-Xwayland && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/rpmfusion-*.repo && \
rpm-ostree install \
mesa-va-drivers-freeworld \
mesa-vdpau-drivers-freeworld.x86_64 \
libaacs \
libbdplus \
libbluray && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-*.repo && \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:sentry:switcheroo-control_discrete \
Expand Down Expand Up @@ -502,23 +503,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
pipewire-alsa.i686 \
gobject-introspection \
clinfo \
https://kojipkgs.fedoraproject.org//packages/SDL2/2.30.3/1.fc40/i686/SDL2-2.30.3-1.fc40.i686.rpm && \
sed -i '0,/enabled=1/s//enabled=0/' /etc/yum.repos.d/fedora-updates.repo && \
rpm-ostree install \
mesa-vulkan-drivers.i686 \
mesa-va-drivers-freeworld.i686 \
mesa-vdpau-drivers-freeworld.i686 && \
sed -i '0,/enabled=0/s//enabled=1/' /etc/yum.repos.d/rpmfusion-nonfree-steam.repo && \
sed -i '0,/enabled=1/s//enabled=0/' /etc/yum.repos.d/rpmfusion-nonfree.repo && \
sed -i '0,/enabled=1/s//enabled=0/' /etc/yum.repos.d/rpmfusion-nonfree-updates.repo && \
sed -i '0,/enabled=1/s//enabled=0/' /etc/yum.repos.d/rpmfusion-nonfree-updates-testing.repo && \
rpm-ostree install \
steam && \
sed -i '0,/enabled=1/s//enabled=0/' /etc/yum.repos.d/rpmfusion-nonfree-steam.repo && \
sed -i '0,/enabled=0/s//enabled=1/' /etc/yum.repos.d/rpmfusion-nonfree.repo && \
sed -i '0,/enabled=0/s//enabled=1/' /etc/yum.repos.d/rpmfusion-nonfree-updates.repo && \
sed -i '0,/enabled=0/s//enabled=1/' /etc/yum.repos.d/rpmfusion-nonfree-updates-testing.repo && \
sed -i '0,/enabled=0/s//enabled=1/' /etc/yum.repos.d/fedora-updates.repo && \
rpm-ostree install \
lutris \
umu-launcher \
Expand All @@ -529,18 +514,16 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
libFAudio.x86_64 \
libFAudio.i686 \
winetricks \
protontricks \
latencyflex-vulkan-layer \
mesa-vulkan-drivers.i686 \
mesa-va-drivers.i686 \
vkBasalt.x86_64 \
vkBasalt.i686 \
mangohud.x86_64 \
mangohud.i686 \
obs-vkcapture.x86_64 \
libobs_vkcapture.x86_64 \
libobs_glcapture.x86_64 \
obs-vkcapture.i686 \
libobs_vkcapture.i686 \
libobs_glcapture.i686 \
mangohud.x86_64 \
mangohud.i686 && \
libobs_glcapture.x86_64 && \
ln -s wine32 /usr/bin/wine && \
ln -s wine32-preloader /usr/bin/wine-preloader && \
ln -s wineserver64 /usr/bin/wineserver && \
Expand Down Expand Up @@ -740,9 +723,8 @@ RUN rm -f /etc/profile.d/toolbox.sh && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_hikariknight-looking-glass-kvmfr.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@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-nonfree.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-nonfree-updates.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-nonfree-updates-testing.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-steam.repo && \
mkdir -p /etc/flatpak/remotes.d && \
curl -Lo /etc/flatpak/remotes.d/flathub.flatpakrepo https://dl.flathub.org/repo/flathub.flatpakrepo && \
systemctl enable tuned.service && \
Expand All @@ -751,15 +733,15 @@ RUN rm -f /etc/profile.d/toolbox.sh && \
systemctl disable brew-upgrade.timer && \
systemctl disable brew-update.timer && \
systemctl enable [email protected] && \
systemctl enable displaylink.service && \
systemctl disable displaylink.service && \
systemctl enable input-remapper.service && \
systemctl unmask bazzite-flatpak-manager.service && \
systemctl enable bazzite-flatpak-manager.service && \
systemctl disable rpm-ostreed-automatic.timer && \
systemctl enable ublue-update.timer && \
systemctl enable incus-workaround.service && \
systemctl enable bazzite-hardware-setup.service && \
systemctl enable tailscaled.service && \
systemctl disable tailscaled.service && \
systemctl enable dev-hugepages1G.mount && \
systemctl --global enable bazzite-user-setup.service && \
systemctl --global enable podman.socket && \
Expand Down Expand Up @@ -938,7 +920,7 @@ ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-nvidia}"
ARG NVIDIA_FLAVOR=${NVIDIA_FLAVOR:-nvidia}""
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-fsync-ba}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.12-207.fsync.fc40.x86_64}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.12-208.fsync.fc40.x86_64}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-kinoite}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
Expand All @@ -965,6 +947,10 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
# Install NVIDIA driver
RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=nvidia-akmods,src=/rpms,dst=/tmp/akmods-rpms \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
rpm-ostree install \
mesa-vdpau-drivers.x86_64 \
mesa-vdpau-drivers.i686 && \
curl -Lo /tmp/nvidia-install.sh https://raw.githubusercontent.com/ublue-os/hwe/main/nvidia-install.sh && \
chmod +x /tmp/nvidia-install.sh && \
IMAGE_NAME="${BASE_IMAGE_NAME}" /tmp/nvidia-install.sh && \
Expand All @@ -975,6 +961,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \

# Cleanup & Finalize
RUN echo "import \"/usr/share/ublue-os/just/95-bazzite-nvidia.just\"" >> /usr/share/ublue-os/justfile && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
mkdir -p /var/tmp && chmod 1777 /var/tmp && \
/usr/libexec/containerbuild/image-info && \
/usr/libexec/containerbuild/build-initramfs && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,4 @@ We also ship a config for the popular [pull app](https://github.com/apps/pull) i

- Follow Universal Blue on [Mastodon](https://fosstodon.org/@UniversalBlue).

[**View the full list of Bazzite resources and social presence**](https://universal-blue.discourse.group/docs?topic=8).
[**View the full list of Bazzite resources and social presence**](https://docs.bazzite.gg/Resources/).
1 change: 1 addition & 0 deletions installer/gnome_flatpaks/flatpaks
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
app/org.mozilla.firefox/x86_64/stable
app/com.mattjakeman.ExtensionManager/x86_64/stable
app/com.github.Matoking.protontricks/stable
app/io.github.fastrizwaan.WineZGUI/x86_64/stable
app/io.github.dvlv.boxbuddyrs/x86_64/stable
app/it.mijorus.gearlever/x86_64/stable
Expand Down
1 change: 1 addition & 0 deletions installer/kde_flatpaks/flatpaks
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ app/io.github.fastrizwaan.WineZGUI/x86_64/stable
app/io.github.dvlv.boxbuddyrs/x86_64/stable
app/it.mijorus.gearlever/x86_64/stable
app/com.github.tchx84.Flatseal/x86_64/stable
app/com.github.Matoking.protontricks/stable
app/io.github.flattool.Warehouse/x86_64/stable
app/net.davidotek.pupgui2/x86_64/stable
runtime/org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/23.08
Expand Down
4 changes: 2 additions & 2 deletions spec_files/gamescope/gamescope-legacy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name: gamescope-legacy
Version: 3.14.2
Release: 3.bazzite
Release: 4.bazzite
Summary: Legacy builds of gamescope, a micro-compositor for video games on Wayland

License: BSD
Expand All @@ -18,7 +18,7 @@ Source2: https://github.com/Joshua-Ashton/reshade/archive/%{reshade_commi
Patch0: 0001-cstdint.patch

# https://hhd.dev/
Patch1: v2-0001-always-send-ctrl-1-2-to-steam-s-wayland-session.patch
Patch1: v2-0001-steam-overlay-hotkeys.patch

# ChimeraOS
Patch2: legacy-720p.patch
Expand Down
4 changes: 2 additions & 2 deletions spec_files/gamescope/gamescope.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Name: gamescope
Version: 100.%{gamescope_tag}
Release: 2.bazzite
Release: 3.bazzite
Summary: Micro-compositor for video games on Wayland

License: BSD
Expand All @@ -22,7 +22,7 @@ Patch1: chimeraos.patch

# https://hhd.dev/
Patch2: disable-steam-touch-click-atom.patch
Patch3: v2-0001-always-send-ctrl-1-2-to-steam-s-wayland-session.patch
Patch3: v2-0001-steam-overlay-hotkeys.patch

# https://github.com/ValveSoftware/gamescope/issues/1369
Patch4: revert-299bc34.patch
Expand Down

This file was deleted.

44 changes: 44 additions & 0 deletions spec_files/gamescope/v2-0001-steam-overlay-hotkeys.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index 3535c9b..d29a3d5 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -290,6 +290,9 @@ static void wlserver_handle_modifiers(struct wl_listener *listener, void *data)
bump_input_counter();
}

+// false if GS_ENABLE_CTRL_12 exists and is 0, true otherwise
+bool env_gs_enable_ctrl_12 = getenv("GS_ENABLE_CTRL_12") ? (getenv("GS_ENABLE_CTRL_12")[0] != '0') : true;
+
static void wlserver_handle_key(struct wl_listener *listener, void *data)
{
struct wlserver_keyboard *keyboard = wl_container_of( listener, keyboard, key );
@@ -310,7 +313,14 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data)
keysym == XKB_KEY_XF86AudioLowerVolume ||
keysym == XKB_KEY_XF86AudioRaiseVolume ||
keysym == XKB_KEY_XF86PowerOff;
- if ( ( event->state == WL_KEYBOARD_KEY_STATE_PRESSED || event->state == WL_KEYBOARD_KEY_STATE_RELEASED ) && forbidden_key )
+
+ // Check for steam overlay key (ctrl/super + 1/2)
+ bool is_steamshortcut =
+ ((env_gs_enable_ctrl_12 && (keyboard->wlr->modifiers.depressed & WLR_MODIFIER_CTRL)) ||
+ (keyboard->wlr->modifiers.depressed & WLR_MODIFIER_LOGO)) &&
+ (keysym == XKB_KEY_1 || keysym == XKB_KEY_2);
+
+ if ( ( event->state == WL_KEYBOARD_KEY_STATE_PRESSED || event->state == WL_KEYBOARD_KEY_STATE_RELEASED ) && (forbidden_key || is_steamshortcut) )
{
// Always send volume+/- to root server only, to avoid it reaching the game.
struct wlr_surface *old_kb_surf = wlserver.kb_focus_surface;
@@ -319,6 +329,13 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data)
{
wlserver_keyboardfocus( new_kb_surf, false );
wlr_seat_set_keyboard( wlserver.wlr.seat, keyboard->wlr );
+ if (is_steamshortcut)
+ {
+ // send ctrl down modifier to trigger the overlay
+ wlr_keyboard_modifiers ctrl_down_modifier;
+ ctrl_down_modifier.depressed = WLR_MODIFIER_CTRL;
+ wlr_seat_keyboard_notify_modifiers(wlserver.wlr.seat, &ctrl_down_modifier);
+ }
wlr_seat_keyboard_notify_key( wlserver.wlr.seat, event->time_msec, event->keycode, event->state );
wlserver_keyboardfocus( old_kb_surf, false );
return;
Loading

0 comments on commit c9eb239

Please sign in to comment.