Merge branch 'testing' into test_web_ui

This commit is contained in:
Noel Miller 2024-04-30 12:54:06 -05:00 committed by GitHub
commit 64c2e87f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
65 changed files with 843 additions and 2099 deletions

View File

@ -189,18 +189,29 @@ jobs:
podman pull ${{ env.IMAGE_REGISTRY }}/akmods:${{ matrix.kernel_flavor}}-${{ matrix.fedora_version }}
podman pull ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ matrix.kernel_flavor}}-${{ matrix.fedora_version }}
- name: Get kernel version
- name: Get source versions
id: labels
shell: bash
run: |
set -eo pipefail
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods:${{ matrix.kernel_flavor }}-${{ matrix.fedora_version }} > akmods.json
linux=$(jq -r '.Labels["ostree.linux"]' akmods.json)
if [ -z "$linux" ] || [ "null" = "$linux" ]; then
echo "inspected image linux version must not be empty or null"
exit 1
fi
echo "KERNEL_VERSION=$linux" >> $GITHUB_ENV
uses: Wandalen/wretry.action@v3.4.0
with:
attempt_limit: 3
attempt_delay: 15000
command: |
set -eo pipefail
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/${{ matrix.base_image_name }}-${{ matrix.base_image_flavor }}:${{ matrix.fedora_version }} > source.json
ver=$(jq -r '.Labels["org.opencontainers.image.version"]' source.json)
if [ -z "$ver" ] || [ "null" = "$ver" ]; then
echo "inspected image version must not be empty or null"
exit 1
fi
echo "SOURCE_IMAGE_VERSION=$ver" >> $GITHUB_ENV
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods:${{ matrix.kernel_flavor }}-${{ matrix.fedora_version }} > akmods.json
linux=$(jq -r '.Labels["ostree.linux"]' akmods.json)
if [ -z "$linux" ] || [ "null" = "$linux" ]; then
echo "inspected image linux version must not be empty or null"
exit 1
fi
echo "KERNEL_VERSION=$linux" >> $GITHUB_ENV
# Build metadata
- name: Image Metadata
@ -210,9 +221,10 @@ jobs:
images: |
${{ env.IMAGE_NAME }}
labels: |
ostree.linux=${{ env.KERNEL_VERSION }}
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.description=Bazzite is an OCI image that serves as an alternative operating system for the Steam Deck, and a ready-to-game SteamOS-like for desktop computers, living room home theater PCs, and numerous other handheld PCs.
org.opencontainers.image.version=${{ env.SOURCE_IMAGE_VERSION }}
ostree.linux=${{ env.KERNEL_VERSION }}
io.artifacthub.package.readme-url=https://bazzite.gg/
io.artifacthub.package.logo-url=https://raw.githubusercontent.com/ublue-os/bazzite/main/repo_content/logo.png

View File

@ -129,6 +129,7 @@ jobs:
enable_flatpak_dependencies: "false"
extra_boot_params: ${{ steps.generate-extra-params.outputs.extra-boot-params }}
web_ui: "true"
additional_templates: '/github/workspace/installer/lorax_templates/remove_root_password_prompt.tmpl'
- name: Move ISOs to Upload Directory
id: upload-directory

View File

@ -22,8 +22,12 @@ COPY system_files/desktop/shared system_files/desktop/${BASE_IMAGE_NAME} /
# Setup Copr repos
RUN curl -Lo /usr/bin/copr https://raw.githubusercontent.com/ublue-os/COPR-command/main/copr && \
chmod +x /usr/bin/copr && \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite-multilib/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-multilib-fedora-"${FEDORA_MAJOR_VERSION}".repo?arch=x86_64 && \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite-testing.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib-testing.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite-multilib/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-multilib-fedora-"${FEDORA_MAJOR_VERSION}".repo?arch=x86_64 && \
if [[ "${IMAGE_BRANCH}" != "main" ]]; then \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite-testing/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-testing-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite-multilib-testing/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-multilib-testing-fedora-"${FEDORA_MAJOR_VERSION}".repo?arch=x86_64 \
; fi && \
curl -Lo /etc/yum.repos.d/_copr_ublue-os-staging.repo https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo?arch=x86_64 && \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-system76-scheduler.repo https://copr.fedorainfracloud.org/coprs/kylegospo/system76-scheduler/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-system76-scheduler-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
curl -Lo /etc/yum.repos.d/_copr_kylegospo-latencyflex.repo https://copr.fedorainfracloud.org/coprs/kylegospo/LatencyFleX/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-LatencyFleX-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
@ -105,6 +109,7 @@ RUN mkdir -p /tmp/linux-firmware-neptune && \
# Add ublue packages, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion
COPY --from=ghcr.io/ublue-os/akmods:${KERNEL_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms
COPY --from=ghcr.io/ublue-os/akmods-extra:${KERNEL_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms
RUN 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 \
@ -121,6 +126,7 @@ RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
/tmp/akmods-rpms/kmods/*ayaneo-platform*.rpm \
/tmp/akmods-rpms/kmods/*ayn-platform*.rpm \
/tmp/akmods-rpms/kmods/*framework-laptop*.rpm \
/tmp/akmods-rpms/kmods/*bmi260*.rpm \
/tmp/akmods-rpms/kmods/*ryzen-smu*.rpm && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
ostree container commit
@ -267,13 +273,6 @@ RUN rpm-ostree override remove \
firefox \
firefox-langpacks \
htop && \
rpm-ostree override remove \
power-profiles-daemon \
|| true && \
rpm-ostree override remove \
tlp \
tlp-rdw \
|| true && \
ostree container commit
# Install new packages
@ -288,12 +287,6 @@ RUN rpm-ostree install \
compsize \
input-remapper \
system76-scheduler \
tuned \
tuned-ppd \
tuned-utils \
tuned-gtk \
tuned-profiles-atomic \
tuned-profiles-cpu-partitioning \
powertop \
i2c-tools \
udica \
@ -349,7 +342,6 @@ RUN rpm-ostree install \
sed -i 's/max_cpu_load_percent.*/max_cpu_load_percent = 100.0/' /usr/etc/ublue-update/ublue-update.toml && \
sed -i 's/max_mem_percent.*/max_mem_percent = 90.0/' /usr/etc/ublue-update/ublue-update.toml && \
sed -i 's/dbus_notify.*/dbus_notify = false/' /usr/etc/ublue-update/ublue-update.toml && \
sed -i 's@Name=tuned-gui@Name=TuneD Manager@g' /usr/share/applications/tuned-gui.desktop && \
curl -Lo /usr/bin/installcab https://raw.githubusercontent.com/KyleGospo/steam-proton-mf-wmv/master/installcab.py && \
chmod +x /usr/bin/installcab && \
curl -Lo /usr/bin/install-mf-wmv https://github.com/KyleGospo/steam-proton-mf-wmv/blob/master/install-mf-wmv.sh && \
@ -360,6 +352,7 @@ RUN rpm-ostree install \
# Install Steam & Lutris, plus supporting packages
# Remove Feral gamemode, System76 Scheduler supersedes this
RUN rpm-ostree install \
jupiter-sd-mounting-btrfs \
at-spi2-core.i686 \
atk.i686 \
vulkan-loader.i686 \
@ -453,7 +446,7 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
plasma-welcome && \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:kylegospo:bazzite \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
kf6-kio-doc \
kf6-kio-widgets-libs \
kf6-kio-core-libs \
@ -486,11 +479,8 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
; else \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:kylegospo:bazzite \
gnome-shell && \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
gnome-shell \
vte291 \
vte-profile && \
rpm-ostree install \
@ -503,6 +493,7 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
gnome-shell-extension-gsconnect \
gnome-shell-extension-system76-scheduler \
gnome-shell-extension-compiz-windows-effect \
gnome-shell-extension-compiz-alike-magic-lamp-effect \
gnome-shell-extension-just-perfection \
gnome-shell-extension-blur-my-shell \
gnome-shell-extension-hanabi \
@ -510,6 +501,7 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
gnome-shell-extension-bazzite-menu \
gnome-shell-extension-hotedge \
gnome-shell-extension-caffeine \
gnome-shell-extension-power-profile-switcher \
rom-properties-gtk3 \
openssh-askpass && \
rpm-ostree override remove \
@ -575,6 +567,10 @@ RUN /usr/libexec/containerbuild/build-initramfs && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib.repo && \
if [[ "${IMAGE_BRANCH}" != "main" ]]; then \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-testing.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib-testing.repo \
; fi && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-staging.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-system76-scheduler.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-latencyflex.repo && \
@ -597,7 +593,6 @@ RUN /usr/libexec/containerbuild/build-initramfs && \
mkdir -p /usr/etc/flatpak/remotes.d && \
curl -Lo /usr/etc/flatpak/remotes.d/flathub.flatpakrepo https://dl.flathub.org/repo/flathub.flatpakrepo && \
systemctl enable com.system76.Scheduler.service && \
systemctl enable tuned.service && \
systemctl enable btrfs-dedup@var-home.timer && \
systemctl enable displaylink.service && \
systemctl enable input-remapper.service && \
@ -645,6 +640,10 @@ COPY system_files/deck/shared system_files/deck/${BASE_IMAGE_NAME} /
RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib.repo && \
if [[ "${IMAGE_BRANCH}" != "main" ]]; then \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-testing.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib-testing.repo \
; fi && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-latencyflex.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-obs-vkcapture.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-wallpaper-engine-kde-plugin.repo && \
@ -653,7 +652,9 @@ RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
ostree container commit
# Configure KDE & GNOME
RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
RUN rpm-ostree override remove \
jupiter-sd-mounting-btrfs && \
if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
rpm-ostree override remove \
steamdeck-kde-presets-desktop && \
rpm-ostree install \
@ -739,6 +740,10 @@ RUN /usr/libexec/containerbuild/image-info && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib.repo && \
if [[ "${IMAGE_BRANCH}" != "main" ]]; then \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-testing.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib-testing.repo \
; fi && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-latencyflex.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-obs-vkcapture.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-wallpaper-engine-kde-plugin.repo && \

View File

@ -49,7 +49,6 @@ Bazzite is built from [ublue-os/main](https://github.com/ublue-os/main) and [ubl
- Includes Valve's KDE themes from SteamOS.
- Features optional Valve-inspired GTK3/4 themes matching Vapor and VGUI2 from SteamOS. Install [Gradience](https://flathub.org/apps/com.github.GradienceTeam.Gradience) to make use of them.
- [LatencyFleX](https://github.com/ishitatsuyuki/LatencyFleX), [vkBasalt](https://github.com/DadSchoorse/vkBasalt), [MangoHud](https://github.com/flightlessmango/Mangohud), and [OBS VkCapture](https://github.com/nowrep/obs-vkcapture) installed and available by default
- Uses [TuneD](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/monitoring_and_managing_system_status_and_performance/getting-started-with-tuned_monitoring-and-managing-system-status-and-performance) in place of PPD, with full integration into GNOME, KDE, and Game mode. This is an incredibly powerful tool that Red Hat offers [entire classes on](https://www.redhat.com/en/services/training/rh442-red-hat-enterprise-performance-tuning).
- [Patched Switcheroo-Control](https://copr.fedorainfracloud.org/coprs/sentry/switcheroo-control_discrete/) fixing default-broken iGPU/dGPU switching.
- Support for [Wallpaper Engine](https://www.wallpaperengine.io/en). <sub><sup>(Only on KDE)</sup></sub>
- [ROM Properties Page shell extension](https://github.com/GerbilSoft/rom-properties) included.
@ -126,7 +125,6 @@ Variant designed for usage as an alternative to SteamOS on the Steam Deck, and f
- Default-disabled power-user features, including:
- 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>
- Built in support for display overclocking. For example, add `GAMESCOPE_OVERRIDE_REFRESH_RATE=40,70` to `/etc/environment`.
- Ability to use X11 on the desktop if desired by editing `/etc/default/desktop-wayland`.
- 32GB RAM mod your Steam Deck? Enjoy double the maximum VRAM amount, automatically applied. <sup><sub>(Can you share your soldering skills?)</sub></sup>
- Steam Deck hardware-specific services can be disabled by running `ujust disable-bios-updates` and `ujust disable-firmware-updates` in the terminal. These are automatically disabled on non-Deck hardware, and on Decks with DeckHD displays or 32GB RAM mods.
- More information can be found [here](https://universal-blue.discourse.group/docs?topic=37) on the Bazzite Steam Deck images.

View File

@ -0,0 +1 @@
append etc/anaconda/profile.d/fedora-kinoite.conf "\\n[User Interface]\\nhidden_spokes =\\n PasswordSpoke"

View File

@ -1,32 +0,0 @@
From d98d69ad4238288fa4f79e6563a4cac68cd9c667 Mon Sep 17 00:00:00 2001
From: antheas <git@antheas.dev>
Date: Sun, 31 Mar 2024 21:54:56 +0200
Subject: [PATCH] disable steam touch click atom
Steam sets this atom to 4 (which is the default) in certain games. Then sets it
back to 1 when it exits the game. Setting this atom to 1 makes a cursor appear
and breaks touchscreen functionality. So disable steam from being able to
play with the touch screen.
---
src/steamcompmgr.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 3bd958c..3d9ff74 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -3603,7 +3603,9 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
}
if (ev->atom == ctx->atoms.steamTouchClickModeAtom )
{
- g_nTouchClickMode = (enum wlserver_touch_click_mode) get_prop(ctx, ctx->root, ctx->atoms.steamTouchClickModeAtom, g_nDefaultTouchClickMode );
+ // When steam changes this to 1 stuff breaks, make it not shoot itself
+ // in the foot
+ // g_nTouchClickMode = (enum wlserver_touch_click_mode) get_prop(ctx, ctx->root, ctx->atoms.steamTouchClickModeAtom, g_nDefaultTouchClickMode );
#if HAVE_OPENVR
if (BIsVRSession())
vrsession_update_touch_mode();
--
2.44.0

View File

@ -1,56 +0,0 @@
From 1345e658091848195ace5f94b8662deb49236a6b Mon Sep 17 00:00:00 2001
From: Joshua Ashton <joshua@froggi.es>
Date: Tue, 9 Apr 2024 23:46:35 +0100
Subject: [PATCH 1/2] wlserver: use unordered_map for content_overrides
---
src/wlserver.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wlserver.hpp b/src/wlserver.hpp
index 852a5a1..6854ebf 100644
--- a/src/wlserver.hpp
+++ b/src/wlserver.hpp
@@ -84,7 +84,7 @@ private:
struct wlr_output *output;
- std::map<uint32_t, wlserver_content_override *> content_overrides;
+ std::unordered_map<uint32_t, wlserver_content_override *> content_overrides;
bool xwayland_ready = false;
_XDisplay *dpy = NULL;
--
2.44.0
From c59b09dbc0c100f604ae603c5f0026c42c62d49c Mon Sep 17 00:00:00 2001
From: Joshua Ashton <joshua@froggi.es>
Date: Wed, 10 Apr 2024 00:04:06 +0100
Subject: [PATCH 2/2] wlserver: Clear x11_surface when content override is
destroyed
---
src/wlserver.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index 3fbc4ff..42d20e9 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -532,6 +532,13 @@ static struct wl_listener new_surface_listener = { .notify = wlserver_new_surfac
void gamescope_xwayland_server_t::destroy_content_override( struct wlserver_content_override *co )
{
+ if ( co->surface )
+ {
+ wlserver_wl_surface_info *wl_surface_info = get_wl_surface_info( co->surface );
+ if ( wl_surface_info )
+ wl_surface_info->x11_surface = nullptr;
+ }
+
wl_list_remove( &co->surface_destroy_listener.link );
content_overrides.erase( co->x11_window );
free( co );
--
2.44.0

View File

@ -0,0 +1,18 @@
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 52dd8d1..05337c1 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -5202,6 +5202,13 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
size_t server_idx = size_t{ xwayland_mode_ctl[ 0 ] };
int width = xwayland_mode_ctl[ 1 ];
int height = xwayland_mode_ctl[ 2 ];
+
+ if ( g_nOutputWidth != 1280 && width == 1280 && !env_to_bool(getenv("GAMESCOPE_ENABLE_720P_RESTRICT")) )
+ {
+ width = g_nOutputWidth;
+ height = g_nOutputHeight;
+ }
+
bool allowSuperRes = !!xwayland_mode_ctl[ 3 ];
if ( !allowSuperRes )

View File

@ -1,35 +0,0 @@
From 19c6635d5e20dd429cb23b4a7c728afa306fae0a Mon Sep 17 00:00:00 2001
From: Sterophonick <sterophonick@gmail.com>
Date: Sat, 10 Feb 2024 22:00:36 -0700
Subject: [PATCH] steamcompmgr: add env var to enable/disable 720p restriction
---
src/steamcompmgr.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 00c00e9..795898c 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -137,6 +137,9 @@ extern float g_flInternalDisplayBrightnessNits;
extern float g_flHDRItmSdrNits;
extern float g_flHDRItmTargetNits;
+// define env_to_bool to point to the function in drm: remove in later patches pl0x
+extern bool env_to_bool(const char *env);
+
uint64_t g_lastWinSeq = 0;
static std::shared_ptr<wlserver_ctm> s_scRGB709To2020Matrix;
@@ -5657,7 +5660,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
int width = xwayland_mode_ctl[ 1 ];
int height = xwayland_mode_ctl[ 2 ];
- if ( g_nOutputWidth != 1280 && width == 1280 )
+ if ( g_nOutputWidth != 1280 && width == 1280 && !env_to_bool(getenv("GAMESCOPE_ENABLE_720P_RESTRICT")) )
{
width = g_nOutputWidth;
height = g_nOutputHeight;
--
2.43.0

View File

@ -1,349 +0,0 @@
diff --git a/src/drm.cpp b/src/drm.cpp
index c975bfd..686c9b0 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -1044,15 +1044,15 @@ static bool refresh_state( drm_t *drm )
crtc->has_vrr_enabled = crtc->props.contains( "VRR_ENABLED" );
if (!crtc->has_vrr_enabled)
drm_log.infof("CRTC %" PRIu32 " has no VRR_ENABLED support", crtc->id);
- crtc->has_valve1_regamma_tf = crtc->props.contains( "VALVE1_CRTC_REGAMMA_TF" );
- if (!crtc->has_valve1_regamma_tf)
- drm_log.infof("CRTC %" PRIu32 " has no VALVE1_CRTC_REGAMMA_TF support", crtc->id);
+ crtc->has_amd_regamma_tf = crtc->props.contains( "AMD_CRTC_REGAMMA_TF" );
+ if (!crtc->has_amd_regamma_tf)
+ drm_log.infof("CRTC %" PRIu32 " has no AMD_CRTC_REGAMMA_TF support", crtc->id);
crtc->current.active = crtc->initial_prop_values["ACTIVE"];
if (crtc->has_vrr_enabled)
drm->current.vrr_enabled = crtc->initial_prop_values["VRR_ENABLED"];
- if (crtc->has_valve1_regamma_tf)
- drm->current.output_tf = (drm_valve1_transfer_function) crtc->initial_prop_values["VALVE1_CRTC_REGAMMA_TF"];
+ if (crtc->has_amd_regamma_tf)
+ drm->current.output_tf = (amdgpu_transfer_function) crtc->initial_prop_values["AMD_CRTC_REGAMMA_TF"];
}
for (size_t i = 0; i < drm->planes.size(); i++) {
@@ -1060,7 +1060,7 @@ static bool refresh_state( drm_t *drm )
if (!get_object_properties(drm, plane->id, DRM_MODE_OBJECT_PLANE, plane->props, plane->initial_prop_values)) {
return false;
}
- plane->has_color_mgmt = plane->props.contains( "VALVE1_PLANE_BLEND_TF" );
+ plane->has_color_mgmt = plane->props.contains( "AMD_PLANE_BLEND_TF" );
}
return true;
@@ -1597,8 +1597,8 @@ void finish_drm(struct drm_t *drm)
add_crtc_property(req, &drm->crtcs[i], "CTM", 0);
if ( drm->crtcs[i].has_vrr_enabled )
add_crtc_property(req, &drm->crtcs[i], "VRR_ENABLED", 0);
- if ( drm->crtcs[i].has_valve1_regamma_tf )
- add_crtc_property(req, &drm->crtcs[i], "VALVE1_CRTC_REGAMMA_TF", 0);
+ if ( drm->crtcs[i].has_amd_regamma_tf )
+ add_crtc_property(req, &drm->crtcs[i], "AMD_CRTC_REGAMMA_TF", 0);
add_crtc_property(req, &drm->crtcs[i], "ACTIVE", 0);
}
for ( size_t i = 0; i < drm->planes.size(); i++ ) {
@@ -1617,22 +1617,22 @@ void finish_drm(struct drm_t *drm)
add_plane_property(req, plane, "rotation", DRM_MODE_ROTATE_0);
if (plane->props.count("alpha") > 0)
add_plane_property(req, plane, "alpha", 0xFFFF);
- if (plane->props.count("VALVE1_PLANE_DEGAMMA_TF") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_DEGAMMA_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- if (plane->props.count("VALVE1_PLANE_HDR_MULT") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_HDR_MULT", 0x100000000ULL);
- if (plane->props.count("VALVE1_PLANE_SHAPER_TF") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_SHAPER_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- if (plane->props.count("VALVE1_PLANE_SHAPER_LUT") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_SHAPER_LUT", 0 );
- if (plane->props.count("VALVE1_PLANE_LUT3D") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_LUT3D", 0 );
- if (plane->props.count("VALVE1_PLANE_BLEND_TF") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_BLEND_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- if (plane->props.count("VALVE1_PLANE_BLEND_LUT") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_BLEND_LUT", 0 );
- if (plane->props.count("VALVE1_PLANE_CTM") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_CTM", 0 );
+ if (plane->props.count("AMD_PLANE_DEGAMMA_TF") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_DEGAMMA_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ if (plane->props.count("AMD_PLANE_HDR_MULT") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_HDR_MULT", 0x100000000ULL);
+ if (plane->props.count("AMD_PLANE_SHAPER_TF") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_SHAPER_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ if (plane->props.count("AMD_PLANE_SHAPER_LUT") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_SHAPER_LUT", 0 );
+ if (plane->props.count("AMD_PLANE_LUT3D") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_LUT3D", 0 );
+ if (plane->props.count("AMD_PLANE_BLEND_TF") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ if (plane->props.count("AMD_PLANE_BLEND_LUT") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_BLEND_LUT", 0 );
+ if (plane->props.count("AMD_PLANE_CTM") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_CTM", 0 );
}
// We can't do a non-blocking commit here or else risk EBUSY in case the
// previous page-flip is still in flight.
@@ -2222,37 +2222,37 @@ struct LiftoffStateCacheEntryKasher
std::unordered_set<LiftoffStateCacheEntry, LiftoffStateCacheEntryKasher> g_LiftoffStateCache;
-static inline drm_valve1_transfer_function colorspace_to_plane_degamma_tf(GamescopeAppTextureColorspace colorspace)
+static inline amdgpu_transfer_function colorspace_to_plane_degamma_tf(GamescopeAppTextureColorspace colorspace)
{
switch ( colorspace )
{
default: // Linear in this sense is SRGB. Linear = sRGB image view doing automatic sRGB -> Linear which doesn't happen on DRM side.
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SRGB:
- return DRM_VALVE1_TRANSFER_FUNCTION_SRGB;
+ return AMDGPU_TRANSFER_FUNCTION_SRGB_EOTF;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_PASSTHRU:
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SCRGB:
// Use LINEAR TF for scRGB float format as 80 nit = 1.0 in scRGB, which matches
// what PQ TF decodes to/encodes from.
// AMD internal format is FP16, and generally expected for 1.0 -> 80 nit.
// which just so happens to match scRGB.
- return DRM_VALVE1_TRANSFER_FUNCTION_LINEAR;
+ return AMDGPU_TRANSFER_FUNCTION_IDENTITY;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_HDR10_PQ:
- return DRM_VALVE1_TRANSFER_FUNCTION_PQ;
+ return AMDGPU_TRANSFER_FUNCTION_PQ_EOTF;
}
}
-static inline drm_valve1_transfer_function colorspace_to_plane_shaper_tf(GamescopeAppTextureColorspace colorspace)
+static inline amdgpu_transfer_function colorspace_to_plane_shaper_tf(GamescopeAppTextureColorspace colorspace)
{
switch ( colorspace )
{
default:
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SRGB:
- return DRM_VALVE1_TRANSFER_FUNCTION_SRGB;
+ return AMDGPU_TRANSFER_FUNCTION_SRGB_INV_EOTF;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SCRGB: // scRGB Linear -> PQ for shaper + 3D LUT
case GAMESCOPE_APP_TEXTURE_COLORSPACE_HDR10_PQ:
- return DRM_VALVE1_TRANSFER_FUNCTION_PQ;
+ return AMDGPU_TRANSFER_FUNCTION_PQ_INV_EOTF;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_PASSTHRU:
- return DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ return AMDGPU_TRANSFER_FUNCTION_DEFAULT;
}
}
@@ -2403,8 +2403,8 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
if ( drm_supports_color_mgmt( drm ) )
{
- drm_valve1_transfer_function degamma_tf = colorspace_to_plane_degamma_tf( entry.layerState[i].colorspace );
- drm_valve1_transfer_function shaper_tf = colorspace_to_plane_shaper_tf( entry.layerState[i].colorspace );
+ amdgpu_transfer_function degamma_tf = colorspace_to_plane_degamma_tf( entry.layerState[i].colorspace );
+ amdgpu_transfer_function shaper_tf = colorspace_to_plane_shaper_tf( entry.layerState[i].colorspace );
if ( entry.layerState[i].ycbcr )
{
@@ -2416,27 +2416,27 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
//
// Doing LINEAR/DEFAULT here introduces banding so... this is the best way.
// (sRGB DEGAMMA does NOT work on YUV planes!)
- degamma_tf = DRM_VALVE1_TRANSFER_FUNCTION_BT709;
- shaper_tf = DRM_VALVE1_TRANSFER_FUNCTION_BT709;
+ degamma_tf = AMDGPU_TRANSFER_FUNCTION_BT709_OETF;
+ shaper_tf = AMDGPU_TRANSFER_FUNCTION_BT709_INV_OETF;
}
if (!g_bDisableDegamma)
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", degamma_tf );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", degamma_tf );
else
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", 0 );
if ( !g_bDisableShaperAnd3DLUT )
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", drm->pending.shaperlut_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", shaper_tf );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", drm->pending.lut3d_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", drm->pending.shaperlut_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", shaper_tf );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", drm->pending.lut3d_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
// Josh: See shaders/colorimetry.h colorspace_blend_tf if you have questions as to why we start doing sRGB for BLEND_TF despite potentially working in Gamma 2.2 space prior.
}
else
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", 0 );
}
}
}
@@ -2444,25 +2444,25 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
{
if ( drm_supports_color_mgmt( drm ) )
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", 0 );
}
}
if ( drm_supports_color_mgmt( drm ) )
{
if (!g_bDisableBlendTF && !bSinglePlane)
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_BLEND_TF", drm->pending.output_tf );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
else
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_BLEND_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
if (frameInfo->layers[i].ctm != nullptr)
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", frameInfo->layers[i].ctm->blob );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", frameInfo->layers[i].ctm->blob );
else
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", 0 );
}
}
else
@@ -2474,12 +2474,12 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
if ( drm_supports_color_mgmt( drm ) )
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_BLEND_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", 0 );
}
}
}
@@ -2575,17 +2575,17 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
if ( !g_bDisableRegamma && !bSinglePlane )
{
drm->pending.output_tf = g_bOutputHDREnabled
- ? DRM_VALVE1_TRANSFER_FUNCTION_PQ
- : DRM_VALVE1_TRANSFER_FUNCTION_SRGB;
+ ? AMDGPU_TRANSFER_FUNCTION_PQ_EOTF
+ : AMDGPU_TRANSFER_FUNCTION_SRGB_EOTF;
}
else
{
- drm->pending.output_tf = DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ drm->pending.output_tf = AMDGPU_TRANSFER_FUNCTION_DEFAULT;
}
}
else
{
- drm->pending.output_tf = DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ drm->pending.output_tf = AMDGPU_TRANSFER_FUNCTION_DEFAULT;
}
uint32_t flags = DRM_MODE_ATOMIC_NONBLOCK;
@@ -2666,9 +2666,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
if (ret < 0)
return ret;
}
- if (crtc->has_valve1_regamma_tf)
+ if (crtc->has_amd_regamma_tf)
{
- int ret = add_crtc_property(drm->req, crtc, "VALVE1_CRTC_REGAMMA_TF", 0);
+ int ret = add_crtc_property(drm->req, crtc, "AMD_CRTC_REGAMMA_TF", 0);
if (ret < 0)
return ret;
}
@@ -2719,9 +2719,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
return ret;
}
- if (drm->crtc->has_valve1_regamma_tf)
+ if (drm->crtc->has_amd_regamma_tf)
{
- ret = add_crtc_property(drm->req, drm->crtc, "VALVE1_CRTC_REGAMMA_TF", drm->pending.output_tf);
+ ret = add_crtc_property(drm->req, drm->crtc, "AMD_CRTC_REGAMMA_TF", drm->pending.output_tf);
if (ret < 0)
return ret;
}
@@ -2763,9 +2763,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
return ret;
}
- if ( drm->crtc->has_valve1_regamma_tf && drm->pending.output_tf != drm->current.output_tf )
+ if ( drm->crtc->has_amd_regamma_tf && drm->pending.output_tf != drm->current.output_tf )
{
- int ret = add_crtc_property(drm->req, drm->crtc, "VALVE1_CRTC_REGAMMA_TF", drm->pending.output_tf );
+ int ret = add_crtc_property(drm->req, drm->crtc, "AMD_CRTC_REGAMMA_TF", drm->pending.output_tf );
if (ret < 0)
return ret;
}
diff --git a/src/drm.hpp b/src/drm.hpp
index 6810797..bc0befb 100644
--- a/src/drm.hpp
+++ b/src/drm.hpp
@@ -150,7 +150,7 @@ struct crtc {
bool has_degamma_lut;
bool has_ctm;
bool has_vrr_enabled;
- bool has_valve1_regamma_tf;
+ bool has_amd_regamma_tf;
struct {
bool active;
@@ -212,19 +212,22 @@ struct fb {
std::atomic< uint32_t > n_refs;
};
-enum drm_valve1_transfer_function {
- DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT,
-
- DRM_VALVE1_TRANSFER_FUNCTION_SRGB,
- DRM_VALVE1_TRANSFER_FUNCTION_BT709,
- DRM_VALVE1_TRANSFER_FUNCTION_PQ,
- DRM_VALVE1_TRANSFER_FUNCTION_LINEAR,
- DRM_VALVE1_TRANSFER_FUNCTION_UNITY,
- DRM_VALVE1_TRANSFER_FUNCTION_HLG,
- DRM_VALVE1_TRANSFER_FUNCTION_GAMMA22,
- DRM_VALVE1_TRANSFER_FUNCTION_GAMMA24,
- DRM_VALVE1_TRANSFER_FUNCTION_GAMMA26,
- DRM_VALVE1_TRANSFER_FUNCTION_MAX,
+enum amdgpu_transfer_function {
+ AMDGPU_TRANSFER_FUNCTION_DEFAULT,
+ AMDGPU_TRANSFER_FUNCTION_SRGB_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_BT709_INV_OETF,
+ AMDGPU_TRANSFER_FUNCTION_PQ_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_IDENTITY,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA22_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA24_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA26_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_SRGB_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_BT709_OETF,
+ AMDGPU_TRANSFER_FUNCTION_PQ_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA22_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA24_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA26_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_COUNT
};
struct drm_t {
@@ -267,7 +270,7 @@ struct drm_t {
uint32_t shaperlut_id[ EOTF_Count ];
enum drm_screen_type screen_type = DRM_SCREEN_TYPE_INTERNAL;
bool vrr_enabled = false;
- drm_valve1_transfer_function output_tf = DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ amdgpu_transfer_function output_tf = AMDGPU_TRANSFER_FUNCTION_DEFAULT;
} current, pending;
bool wants_vrr_enabled = false;

View File

@ -1,974 +0,0 @@
From 4cafbd696c342c1f45eea6242dcaadd26e8e4a3d Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Fri, 6 Oct 2023 17:22:41 -0500
Subject: [PATCH 1/9] Add initial rotation atom controls
---
src/drm.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++
src/drm.hpp | 11 +++++++++++
src/steamcompmgr.cpp | 32 ++++++++++++++++++++++++++++++++
src/xwayland_ctx.hpp | 1 +
4 files changed, 86 insertions(+)
diff --git a/src/drm.cpp b/src/drm.cpp
index c2694f0..de5e3ca 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -45,6 +45,7 @@ struct drm_t g_DRM = {};
uint32_t g_nDRMFormat = DRM_FORMAT_INVALID;
uint32_t g_nDRMFormatOverlay = DRM_FORMAT_INVALID; // for partial composition, we may have more limited formats than base planes + alpha.
bool g_bRotated = false;
+bool g_rotate_ctl_enable = false;
bool g_bUseLayers = true;
bool g_bDebugLayers = false;
const char *g_sOutputName = nullptr;
@@ -65,6 +66,7 @@ bool g_bSupportsAsyncFlips = false;
enum drm_mode_generation g_drmModeGeneration = DRM_MODE_GENERATE_CVT;
enum g_panel_orientation g_drmModeOrientation = PANEL_ORIENTATION_AUTO;
+enum g_rotate_ctl g_drmRotateCTL;
std::atomic<uint64_t> g_drmEffectiveOrientation[DRM_SCREEN_TYPE_COUNT]{ {DRM_MODE_ROTATE_0}, {DRM_MODE_ROTATE_0} };
bool g_bForceDisableColorMgmt = false;
@@ -2010,6 +2012,27 @@ static void update_drm_effective_orientation(struct drm_t *drm, struct connector
static void update_drm_effective_orientations(struct drm_t *drm, struct connector *conn, const drmModeModeInfo *mode)
{
drm_screen_type screenType = drm_get_connector_type(conn->connector);
+
+ if (g_rotate_ctl_enable)
+ {
+ switch (g_drmRotateCTL)
+ {
+ default:
+ case NORMAL:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_0;
+ break;
+ case LEFT_UP:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_90;
+ break;
+ case UPSIDEDOWN:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_180;
+ break;
+ case RIGHT_UP:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_270;
+ break;
+ }
+ return;
+ }
if (screenType == DRM_SCREEN_TYPE_INTERNAL)
{
update_drm_effective_orientation(drm, conn, mode);
@@ -3083,6 +3106,25 @@ bool drm_set_refresh( struct drm_t *drm, int refresh )
return drm_set_mode(drm, &mode);
}
+void drm_set_orientation( struct drm_t *drm, bool isRotated)
+{
+ int width = g_nOutputWidth;
+ int height = g_nOutputHeight;
+ g_bRotated = isRotated;
+ if ( g_bRotated ) {
+ int tmp = width;
+ width = height;
+ height = tmp;
+ }
+
+ if (!drm->connector || !drm->connector->connector)
+ return;
+
+ drmModeConnector *connector = drm->connector->connector;
+ const drmModeModeInfo *mode = find_mode(connector, width, height, 0);
+ update_drm_effective_orientations(drm, drm->connector, mode);
+}
+
bool drm_set_resolution( struct drm_t *drm, int width, int height )
{
if (!drm->connector || !drm->connector->connector)
diff --git a/src/drm.hpp b/src/drm.hpp
index 6810797..b2ab49f 100644
--- a/src/drm.hpp
+++ b/src/drm.hpp
@@ -325,13 +325,24 @@ enum g_panel_orientation {
PANEL_ORIENTATION_AUTO,
};
+enum g_rotate_ctl{
+ NORMAL,
+ LEFT_UP,
+ UPSIDEDOWN,
+ RIGHT_UP,
+};
+
extern enum drm_mode_generation g_drmModeGeneration;
extern enum g_panel_orientation g_drmModeOrientation;
+extern enum g_rotate_ctl g_drmRotateCTL;
+extern bool g_rotate_ctl_enable;
extern std::atomic<uint64_t> g_drmEffectiveOrientation[DRM_SCREEN_TYPE_COUNT]; // DRM_MODE_ROTATE_*
extern bool g_bForceDisableColorMgmt;
+void drm_set_orientation( struct drm_t *drm, bool isRotated );
+
bool init_drm(struct drm_t *drm, int width, int height, int refresh, bool wants_adaptive_sync);
void finish_drm(struct drm_t *drm);
int drm_commit(struct drm_t *drm, const struct FrameInfo_t *frameInfo );
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index b02fa33..277a54c 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -5644,6 +5644,37 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
if ( g_upscaleFilter == GamescopeUpscaleFilter::FSR || g_upscaleFilter == GamescopeUpscaleFilter::NIS )
hasRepaint = true;
}
+ if ( ev->atom == ctx->atoms.gamescopeRotateControl )
+ {
+ std::vector< uint32_t > drm_rot_ctl;
+ bool rotate = get_prop( ctx, ctx->root, ctx->atoms.gamescopeRotateControl, drm_rot_ctl );
+ bool rotated = false;
+ if ( rotate && drm_rot_ctl.size() == 1 )
+ {
+ xwm_log.debugf("drm_rot_ctl %d", drm_rot_ctl[0]);
+ g_rotate_ctl_enable = true;
+ switch ( drm_rot_ctl[0] )
+ {
+ case 0:
+ g_drmRotateCTL = NORMAL;
+ rotated = false;
+ break;
+ case 1:
+ g_drmRotateCTL = LEFT_UP;
+ rotated = true;
+ break;
+ case 2:
+ g_drmRotateCTL = UPSIDEDOWN;
+ rotated = false;
+ break;
+ case 3:
+ g_drmRotateCTL = RIGHT_UP;
+ rotated = true;
+ break;
+ }
+ drm_set_orientation(&g_DRM, rotated);
+ }
+ }
if ( ev->atom == ctx->atoms.gamescopeXWaylandModeControl )
{
std::vector< uint32_t > xwayland_mode_ctl;
@@ -7248,6 +7279,7 @@ void init_xwayland_ctx(uint32_t serverId, gamescope_xwayland_server_t *xwayland_
ctx->atoms.gamescopeFSRSharpness = XInternAtom( ctx->dpy, "GAMESCOPE_FSR_SHARPNESS", false );
ctx->atoms.gamescopeSharpness = XInternAtom( ctx->dpy, "GAMESCOPE_SHARPNESS", false );
+ ctx->atoms.gamescopeRotateControl = XInternAtom( ctx->dpy, "GAMESCOPE_ROTATE_CONTROL", false );
ctx->atoms.gamescopeXWaylandModeControl = XInternAtom( ctx->dpy, "GAMESCOPE_XWAYLAND_MODE_CONTROL", false );
ctx->atoms.gamescopeFPSLimit = XInternAtom( ctx->dpy, "GAMESCOPE_FPS_LIMIT", false );
ctx->atoms.gamescopeDynamicRefresh[DRM_SCREEN_TYPE_INTERNAL] = XInternAtom( ctx->dpy, "GAMESCOPE_DYNAMIC_REFRESH", false );
diff --git a/src/xwayland_ctx.hpp b/src/xwayland_ctx.hpp
index 5764c4b..6231007 100644
--- a/src/xwayland_ctx.hpp
+++ b/src/xwayland_ctx.hpp
@@ -146,6 +146,7 @@ struct xwayland_ctx_t final : public gamescope::IWaitable
Atom gamescopeFSRSharpness;
Atom gamescopeSharpness;
+ Atom gamescopeRotateControl;
Atom gamescopeXWaylandModeControl;
Atom gamescopeFPSLimit;
--
2.42.0
From 4d8f1c32f1be873bf009b3d14b1ff3756495da63 Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Sat, 7 Oct 2023 10:38:09 -0500
Subject: [PATCH 2/9] Flag drm_out_of_date to ensure rotation logic gets reset
---
src/steamcompmgr.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 277a54c..236bba4 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -5673,6 +5673,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
break;
}
drm_set_orientation(&g_DRM, rotated);
+ g_DRM.out_of_date = 2;
}
}
if ( ev->atom == ctx->atoms.gamescopeXWaylandModeControl )
--
2.42.0
From b145e5cde74d026ffceddee7f4096a23e60e6112 Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Tue, 25 Apr 2023 06:45:01 -0500
Subject: [PATCH 3/9] Add --force-panel-type and --force-external-orientation
arguments (#2)
* Add --force-panel-type and --force-external-orientation arguments.
* Rotate only the internal display when faked as "external"
* Try to prevent the external display from being rotated when --force-panel-type external is used.
* Fixed docking issue when --force-panel-type external is used and you dock/undock the handheld.
---
src/drm.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++-------
src/drm.hpp | 15 +++++++++++++++
src/main.cpp | 36 +++++++++++++++++++++++++++++++++++
3 files changed, 98 insertions(+), 7 deletions(-)
diff --git a/src/drm.cpp b/src/drm.cpp
index de5e3ca..f4fe8fd 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -46,6 +46,7 @@ uint32_t g_nDRMFormat = DRM_FORMAT_INVALID;
uint32_t g_nDRMFormatOverlay = DRM_FORMAT_INVALID; // for partial composition, we may have more limited formats than base planes + alpha.
bool g_bRotated = false;
bool g_rotate_ctl_enable = false;
+bool g_bDisplayTypeInternal = false;
bool g_bUseLayers = true;
bool g_bDebugLayers = false;
const char *g_sOutputName = nullptr;
@@ -68,6 +69,8 @@ enum drm_mode_generation g_drmModeGeneration = DRM_MODE_GENERATE_CVT;
enum g_panel_orientation g_drmModeOrientation = PANEL_ORIENTATION_AUTO;
enum g_rotate_ctl g_drmRotateCTL;
std::atomic<uint64_t> g_drmEffectiveOrientation[DRM_SCREEN_TYPE_COUNT]{ {DRM_MODE_ROTATE_0}, {DRM_MODE_ROTATE_0} };
+enum g_panel_external_orientation g_drmModeExternalOrientation = PANEL_EXTERNAL_ORIENTATION_AUTO;
+enum g_panel_type g_drmPanelType = PANEL_TYPE_AUTO;
bool g_bForceDisableColorMgmt = false;
@@ -1981,8 +1984,29 @@ static uint64_t determine_drm_orientation(struct drm_t *drm, struct connector *c
static void update_drm_effective_orientation(struct drm_t *drm, struct connector *conn, const drmModeModeInfo *mode)
{
drm_screen_type screenType = drm_get_connector_type(conn->connector);
-
- if (screenType == DRM_SCREEN_TYPE_INTERNAL)
+ if ( screenType == DRM_SCREEN_TYPE_EXTERNAL && g_bDisplayTypeInternal == true )
+ {
+ switch ( g_drmModeExternalOrientation )
+ {
+ case PANEL_EXTERNAL_ORIENTATION_0:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_0;
+ break;
+ case PANEL_EXTERNAL_ORIENTATION_90:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_90;
+ break;
+ case PANEL_EXTERNAL_ORIENTATION_180:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_180;
+ break;
+ case PANEL_EXTERNAL_ORIENTATION_270:
+ g_drmEffectiveOrientation[screenType] = DRM_MODE_ROTATE_270;
+ break;
+ case PANEL_EXTERNAL_ORIENTATION_AUTO:
+ g_drmEffectiveOrientation[screenType] = determine_drm_orientation(drm, conn, mode);
+ break;
+ }
+ return;
+ }
+ else if ( screenType == DRM_SCREEN_TYPE_INTERNAL )
{
switch ( g_drmModeOrientation )
{
@@ -2933,11 +2957,27 @@ bool drm_get_vrr_in_use(struct drm_t *drm)
drm_screen_type drm_get_connector_type(drmModeConnector *connector)
{
- if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
- connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
- connector->connector_type == DRM_MODE_CONNECTOR_DSI)
- return DRM_SCREEN_TYPE_INTERNAL;
-
+ // Set to the default state of false to make sure the external display isn't rotated when a system is docked
+ g_bDisplayTypeInternal = false;
+ switch ( g_drmPanelType )
+ {
+ case PANEL_TYPE_INTERNAL:
+ return DRM_SCREEN_TYPE_INTERNAL;
+ break;
+ case PANEL_TYPE_EXTERNAL:
+ if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
+ connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
+ connector->connector_type == DRM_MODE_CONNECTOR_DSI)
+ g_bDisplayTypeInternal = true;
+ return DRM_SCREEN_TYPE_EXTERNAL;
+ break;
+ case PANEL_TYPE_AUTO:
+ if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
+ connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
+ connector->connector_type == DRM_MODE_CONNECTOR_DSI)
+ return DRM_SCREEN_TYPE_INTERNAL;
+ break;
+ }
return DRM_SCREEN_TYPE_EXTERNAL;
}
diff --git a/src/drm.hpp b/src/drm.hpp
index b2ab49f..53fc540 100644
--- a/src/drm.hpp
+++ b/src/drm.hpp
@@ -331,11 +331,26 @@ enum g_rotate_ctl{
UPSIDEDOWN,
RIGHT_UP,
};
+enum g_panel_external_orientation {
+ PANEL_EXTERNAL_ORIENTATION_0, /* NORMAL */
+ PANEL_EXTERNAL_ORIENTATION_270, /* RIGHT */
+ PANEL_EXTERNAL_ORIENTATION_90, /* LEFT */
+ PANEL_EXTERNAL_ORIENTATION_180, /* UPSIDE DOWN */
+ PANEL_EXTERNAL_ORIENTATION_AUTO,
+};
+
+enum g_panel_type {
+ PANEL_TYPE_INTERNAL,
+ PANEL_TYPE_EXTERNAL,
+ PANEL_TYPE_AUTO,
+};
extern enum drm_mode_generation g_drmModeGeneration;
extern enum g_panel_orientation g_drmModeOrientation;
extern enum g_rotate_ctl g_drmRotateCTL;
extern bool g_rotate_ctl_enable;
+extern enum g_panel_external_orientation g_drmModeExternalOrientation;
+extern enum g_panel_type g_drmPanelType;
extern std::atomic<uint64_t> g_drmEffectiveOrientation[DRM_SCREEN_TYPE_COUNT]; // DRM_MODE_ROTATE_*
diff --git a/src/main.cpp b/src/main.cpp
index 76721d6..f6ba34f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -118,6 +118,8 @@ const struct option *gamescope_options = (struct option[]){
{ "disable-xres", no_argument, nullptr, 'x' },
{ "fade-out-duration", required_argument, nullptr, 0 },
{ "force-orientation", required_argument, nullptr, 0 },
+ { "force-external-orientation", required_argument, nullptr, 0 },
+ { "force-panel-type", required_argument, nullptr, 0 },
{ "force-windows-fullscreen", no_argument, nullptr, 0 },
{ "disable-color-management", no_argument, nullptr, 0 },
@@ -167,6 +169,8 @@ const char usage[] =
" --xwayland-count create N xwayland servers\n"
" --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n"
" --force-orientation rotate the internal display (left, right, normal, upsidedown)\n"
+ " --force-external-orientation rotate the external display (left, right, normal, upsidedown)\n"
+ " --force-panel-type force gamescope to treat the display as either internal or external\n"
" --force-windows-fullscreen force windows inside of gamescope to be the size of the nested display (fullscreen)\n"
" --cursor-scale-height if specified, sets a base output height to linearly scale the cursor against.\n"
" --hdr-enabled enable HDR output (needs Gamescope WSI layer enabled for support from clients)\n"
@@ -353,6 +357,18 @@ static enum drm_mode_generation parse_drm_mode_generation(const char *str)
}
}
+static enum g_panel_type force_panel_type(const char *str)
+{
+ if (strcmp(str, "internal") == 0) {
+ return PANEL_TYPE_INTERNAL;
+ } else if (strcmp(str, "external") == 0) {
+ return PANEL_TYPE_EXTERNAL;
+ } else {
+ fprintf( stderr, "gamescope: invalid value for --force-panel-type\n" );
+ exit(1);
+ }
+}
+
static enum g_panel_orientation force_orientation(const char *str)
{
if (strcmp(str, "normal") == 0) {
@@ -408,6 +424,22 @@ static enum GamescopeUpscaleFilter parse_upscaler_filter(const char *str)
struct sigaction handle_signal_action = {};
extern pid_t child_pid;
+static enum g_panel_external_orientation force_external_orientation(const char *str)
+{
+ if (strcmp(str, "normal") == 0) {
+ return PANEL_EXTERNAL_ORIENTATION_0;
+ } else if (strcmp(str, "right") == 0) {
+ return PANEL_EXTERNAL_ORIENTATION_270;
+ } else if (strcmp(str, "left") == 0) {
+ return PANEL_EXTERNAL_ORIENTATION_90;
+ } else if (strcmp(str, "upsidedown") == 0) {
+ return PANEL_EXTERNAL_ORIENTATION_180;
+ } else {
+ fprintf( stderr, "gamescope: invalid value for --force-external-orientation\n" );
+ exit(1);
+ }
+}
+
static void handle_signal( int sig )
{
switch ( sig ) {
@@ -614,6 +646,10 @@ int main(int argc, char **argv)
g_drmModeGeneration = parse_drm_mode_generation( optarg );
} else if (strcmp(opt_name, "force-orientation") == 0) {
g_drmModeOrientation = force_orientation( optarg );
+ } else if (strcmp(opt_name, "force-external-orientation") == 0) {
+ g_drmModeExternalOrientation = force_external_orientation( optarg );
+ } else if (strcmp(opt_name, "force-panel-type") == 0) {
+ g_drmPanelType = force_panel_type( optarg );
} else if (strcmp(opt_name, "sharpness") == 0 ||
strcmp(opt_name, "fsr-sharpness") == 0) {
g_upscaleFilterSharpness = atoi( optarg );
--
2.42.0
From 4d1f8e34b70fee42e4e30feac16eda7aa2aa63e7 Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Tue, 25 Jul 2023 18:05:05 -0500
Subject: [PATCH 4/9] Set default to native resolution of display if Steam
tries to force 720p/800p
You can select 720p/800p still in game or via Steam's resolution setting
Steam > Settings > Display > Resolution
This effectively reverts the changes Valve made a year ago forcing us to
720p.
---
src/steamcompmgr.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 236bba4..60f9828 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -5685,6 +5685,13 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
size_t server_idx = size_t{ xwayland_mode_ctl[ 0 ] };
int width = xwayland_mode_ctl[ 1 ];
int height = xwayland_mode_ctl[ 2 ];
+
+ if ( g_nOutputWidth != 1280 && width == 1280 )
+ {
+ width = g_nOutputWidth;
+ height = g_nOutputHeight;
+ }
+
bool allowSuperRes = !!xwayland_mode_ctl[ 3 ];
if ( !allowSuperRes )
--
2.42.0
From 8959ef22543eb94d329ef9c117ec662061a3db6c Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Wed, 26 Jul 2023 20:46:29 -0500
Subject: [PATCH 5/9] Fix internal display touchscreen orientation when it's
forced
---
src/main.cpp | 6 ++++++
src/main.hpp | 2 ++
src/wlserver.cpp | 25 +++++++++++++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/src/main.cpp b/src/main.cpp
index f6ba34f..17409b5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -269,6 +269,8 @@ bool g_bHeadless = false;
bool g_bGrabbed = false;
+bool g_bExternalForced = false;
+
GamescopeUpscaleFilter g_upscaleFilter = GamescopeUpscaleFilter::LINEAR;
GamescopeUpscaleScaler g_upscaleScaler = GamescopeUpscaleScaler::AUTO;
@@ -427,12 +429,16 @@ extern pid_t child_pid;
static enum g_panel_external_orientation force_external_orientation(const char *str)
{
if (strcmp(str, "normal") == 0) {
+ g_bExternalForced = true;
return PANEL_EXTERNAL_ORIENTATION_0;
} else if (strcmp(str, "right") == 0) {
+ g_bExternalForced = true;
return PANEL_EXTERNAL_ORIENTATION_270;
} else if (strcmp(str, "left") == 0) {
+ g_bExternalForced = true;
return PANEL_EXTERNAL_ORIENTATION_90;
} else if (strcmp(str, "upsidedown") == 0) {
+ g_bExternalForced = true;
return PANEL_EXTERNAL_ORIENTATION_180;
} else {
fprintf( stderr, "gamescope: invalid value for --force-external-orientation\n" );
diff --git a/src/main.hpp b/src/main.hpp
index 7d8e9f1..97ec0a8 100644
--- a/src/main.hpp
+++ b/src/main.hpp
@@ -23,6 +23,8 @@ extern bool g_bFullscreen;
extern bool g_bGrabbed;
+extern bool g_bExternalForced;
+
enum class GamescopeUpscaleFilter : uint32_t
{
LINEAR = 0,
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index 3fbc4ff..dc37f97 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -1976,6 +1976,31 @@ static void apply_touchscreen_orientation(double *x, double *y )
ty = 1.0 - *x;
break;
}
+ // Rotate screen if it's forced with --force-external-orientation
+
+ if ( g_bExternalForced == true)
+ {
+ switch ( g_drmEffectiveOrientation[DRM_SCREEN_TYPE_EXTERNAL] )
+ {
+ default:
+ case DRM_MODE_ROTATE_0:
+ tx = *x;
+ ty = *y;
+ break;
+ case DRM_MODE_ROTATE_90:
+ tx = 1.0 - *y;
+ ty = *x;
+ break;
+ case DRM_MODE_ROTATE_180:
+ tx = 1.0 - *x;
+ ty = 1.0 - *y;
+ break;
+ case DRM_MODE_ROTATE_270:
+ tx = *y;
+ ty = 1.0 - *x;
+ break;
+ }
+ }
*x = tx;
*y = ty;
--
2.42.0
From 17a8118d9ede790f27fa085a1d287f31e81abb64 Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Fri, 6 Oct 2023 23:58:17 -0500
Subject: [PATCH 6/9] Add initial display selection atom
---
src/drm.cpp | 20 +++++++++++++
src/drm.hpp | 1 +
src/steamcompmgr.cpp | 69 ++++++++++++++++++++++++++++++++++++++++++++
src/xwayland_ctx.hpp | 1 +
4 files changed, 91 insertions(+)
diff --git a/src/drm.cpp b/src/drm.cpp
index f4fe8fd..d2f7677 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -50,6 +50,7 @@ bool g_bDisplayTypeInternal = false;
bool g_bUseLayers = true;
bool g_bDebugLayers = false;
const char *g_sOutputName = nullptr;
+char* targetConnector = (char*)"eDP-1";
#ifndef DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
#define DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP 0x15
@@ -1245,6 +1246,19 @@ static bool setup_best_connector(struct drm_t *drm, bool force, bool initial)
}
}
+ for (auto &kv : drm->connectors) {
+ struct connector *conn = &kv.second;
+ drm_log.debugf("force set adapter");
+ drm_log.debugf("conn->name: %s", conn->name);
+ drm_log.debugf("targetConnector: %s", targetConnector);
+ if (strcmp(conn->name, targetConnector) == 0)
+ {
+ drm_log.debugf("target was found!!!");
+ drm_log.infof(" %s (%s)", conn->name, targetConnector);
+ best = conn;
+ }
+ }
+
if (!force) {
if ((!best && drm->connector) || (best && best == drm->connector)) {
// Let's keep our current connector
@@ -2907,6 +2921,12 @@ static bool drm_set_crtc( struct drm_t *drm, struct crtc *crtc )
return true;
}
+void drm_set_prefered_connector( struct drm_t *drm, char* name )
+{
+ drm_log.infof("selecting prefered connector %s", name);
+ targetConnector = name;
+}
+
bool drm_set_connector( struct drm_t *drm, struct connector *conn )
{
drm_log.infof("selecting connector %s", conn->name);
diff --git a/src/drm.hpp b/src/drm.hpp
index 53fc540..739f51b 100644
--- a/src/drm.hpp
+++ b/src/drm.hpp
@@ -368,6 +368,7 @@ uint32_t drm_fbid_from_dmabuf( struct drm_t *drm, struct wlr_buffer *buf, struct
void drm_lock_fbid( struct drm_t *drm, uint32_t fbid );
void drm_unlock_fbid( struct drm_t *drm, uint32_t fbid );
void drm_drop_fbid( struct drm_t *drm, uint32_t fbid );
+void drm_set_prefered_connector( struct drm_t *drm, char* name );
bool drm_set_connector( struct drm_t *drm, struct connector *conn );
bool drm_set_mode( struct drm_t *drm, const drmModeModeInfo *mode );
bool drm_set_refresh( struct drm_t *drm, int refresh );
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 60f9828..aeef706 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -5719,6 +5719,74 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
}
}
}
+ if ( ev->atom == ctx->atoms.gamescopeConnectorControl )
+ {
+ std::vector< uint32_t > connector_ctl;
+ bool hasConnectorCtrl = get_prop( ctx, ctx->root, ctx->atoms.gamescopeConnectorControl, connector_ctl );
+ char* adapter_type;
+ if ( hasConnectorCtrl && connector_ctl.size() == 1 )
+ {
+ switch (connector_ctl[0])
+ {
+ case 0:
+ adapter_type = (char*)"eDP-1";
+ break;
+ case 1:
+ adapter_type = (char*)"eDP-2";
+ break;
+ case 2:
+ adapter_type = (char*)"eDP-3";
+ break;
+ case 3:
+ adapter_type = (char*)"DP-1";
+ break;
+ case 4:
+ adapter_type = (char*)"DP-2";
+ break;
+ case 5:
+ adapter_type = (char*)"DP-3";
+ break;
+ case 6:
+ adapter_type = (char*)"HDMI-A-1";
+ break;
+ case 7:
+ adapter_type = (char*)"HDMI-A-2";
+ break;
+ case 8:
+ adapter_type = (char*)"HDMI-A-3";
+ break;
+ case 9:
+ adapter_type = (char*)"HDMI-B-1";
+ break;
+ case 10:
+ adapter_type = (char*)"HDMI-B-2";
+ break;
+ case 11:
+ adapter_type = (char*)"HDMI-B-3";
+ break;
+ case 12:
+ adapter_type = (char*)"HDMI-C-1";
+ break;
+ case 13:
+ adapter_type = (char*)"HDMI-C-2";
+ break;
+ case 14:
+ adapter_type = (char*)"HDMI-C-3";
+ break;
+ case 15:
+ adapter_type = (char*)"DSI-1";
+ break;
+ case 16:
+ adapter_type = (char*)"DSI-2";
+ break;
+ case 17:
+ adapter_type = (char*)"DSI-3";
+ break;
+ }
+ g_DRM.out_of_date = 2;
+ drm_set_prefered_connector(&g_DRM, adapter_type);
+ }
+ }
if ( ev->atom == ctx->atoms.gamescopeFPSLimit )
{
g_nSteamCompMgrTargetFPS = get_prop( ctx, ctx->root, ctx->atoms.gamescopeFPSLimit, 0 );
@@ -7289,6 +7357,7 @@ void init_xwayland_ctx(uint32_t serverId, gamescope_xwayland_server_t *xwayland_
ctx->atoms.gamescopeRotateControl = XInternAtom( ctx->dpy, "GAMESCOPE_ROTATE_CONTROL", false );
ctx->atoms.gamescopeXWaylandModeControl = XInternAtom( ctx->dpy, "GAMESCOPE_XWAYLAND_MODE_CONTROL", false );
+ ctx->atoms.gamescopeConnectorControl = XInternAtom(ctx->dpy, "GAMESCOPE_CONNECTOR_CONTROL", false );
ctx->atoms.gamescopeFPSLimit = XInternAtom( ctx->dpy, "GAMESCOPE_FPS_LIMIT", false );
ctx->atoms.gamescopeDynamicRefresh[DRM_SCREEN_TYPE_INTERNAL] = XInternAtom( ctx->dpy, "GAMESCOPE_DYNAMIC_REFRESH", false );
ctx->atoms.gamescopeDynamicRefresh[DRM_SCREEN_TYPE_EXTERNAL] = XInternAtom( ctx->dpy, "GAMESCOPE_DYNAMIC_REFRESH_EXTERNAL", false );
diff --git a/src/xwayland_ctx.hpp b/src/xwayland_ctx.hpp
index 6231007..9dbc544 100644
--- a/src/xwayland_ctx.hpp
+++ b/src/xwayland_ctx.hpp
@@ -149,6 +149,7 @@ struct xwayland_ctx_t final : public gamescope::IWaitable
Atom gamescopeRotateControl;
Atom gamescopeXWaylandModeControl;
+ Atom gamescopeConnectorControl;
Atom gamescopeFPSLimit;
Atom gamescopeDynamicRefresh[DRM_SCREEN_TYPE_COUNT];
Atom gamescopeLowLatency;
--
2.42.0
From 8b94b4297324bddf48f3578592cdb6f9fe20e5a4 Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Mon, 9 Oct 2023 11:21:11 -0500
Subject: [PATCH 7/9] Use sysfs connector_ids for target device selection.
---
src/drm.cpp | 14 +++--------
src/drm.hpp | 2 +-
src/steamcompmgr.cpp | 60 +-------------------------------------------
3 files changed, 6 insertions(+), 70 deletions(-)
diff --git a/src/drm.cpp b/src/drm.cpp
index d2f7677..59516c7 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -50,7 +50,7 @@ bool g_bDisplayTypeInternal = false;
bool g_bUseLayers = true;
bool g_bDebugLayers = false;
const char *g_sOutputName = nullptr;
-char* targetConnector = (char*)"eDP-1";
+uint32_t targetConnector;
#ifndef DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
#define DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP 0x15
@@ -1248,13 +1248,8 @@ static bool setup_best_connector(struct drm_t *drm, bool force, bool initial)
for (auto &kv : drm->connectors) {
struct connector *conn = &kv.second;
- drm_log.debugf("force set adapter");
- drm_log.debugf("conn->name: %s", conn->name);
- drm_log.debugf("targetConnector: %s", targetConnector);
- if (strcmp(conn->name, targetConnector) == 0)
+ if ( conn->id == targetConnector)
{
- drm_log.debugf("target was found!!!");
- drm_log.infof(" %s (%s)", conn->name, targetConnector);
best = conn;
}
}
@@ -2921,10 +2916,9 @@ static bool drm_set_crtc( struct drm_t *drm, struct crtc *crtc )
return true;
}
-void drm_set_prefered_connector( struct drm_t *drm, char* name )
+void drm_set_prefered_connector( struct drm_t *drm, uint32_t connector_type_id )
{
- drm_log.infof("selecting prefered connector %s", name);
- targetConnector = name;
+ targetConnector = connector_type_id;
}
bool drm_set_connector( struct drm_t *drm, struct connector *conn )
diff --git a/src/drm.hpp b/src/drm.hpp
index 739f51b..6320bf7 100644
--- a/src/drm.hpp
+++ b/src/drm.hpp
@@ -368,7 +368,7 @@ uint32_t drm_fbid_from_dmabuf( struct drm_t *drm, struct wlr_buffer *buf, struct
void drm_lock_fbid( struct drm_t *drm, uint32_t fbid );
void drm_unlock_fbid( struct drm_t *drm, uint32_t fbid );
void drm_drop_fbid( struct drm_t *drm, uint32_t fbid );
-void drm_set_prefered_connector( struct drm_t *drm, char* name );
+void drm_set_prefered_connector( struct drm_t *drm, uint32_t connector_type_id );
bool drm_set_connector( struct drm_t *drm, struct connector *conn );
bool drm_set_mode( struct drm_t *drm, const drmModeModeInfo *mode );
bool drm_set_refresh( struct drm_t *drm, int refresh );
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index aeef706..9a3f495 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -5723,68 +5723,10 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
{
std::vector< uint32_t > connector_ctl;
bool hasConnectorCtrl = get_prop( ctx, ctx->root, ctx->atoms.gamescopeConnectorControl, connector_ctl );
- char* adapter_type;
if ( hasConnectorCtrl && connector_ctl.size() == 1 )
{
- switch (connector_ctl[0])
- {
- case 0:
- adapter_type = (char*)"eDP-1";
- break;
- case 1:
- adapter_type = (char*)"eDP-2";
- break;
- case 2:
- adapter_type = (char*)"eDP-3";
- break;
- case 3:
- adapter_type = (char*)"DP-1";
- break;
- case 4:
- adapter_type = (char*)"DP-2";
- break;
- case 5:
- adapter_type = (char*)"DP-3";
- break;
- case 6:
- adapter_type = (char*)"HDMI-A-1";
- break;
- case 7:
- adapter_type = (char*)"HDMI-A-2";
- break;
- case 8:
- adapter_type = (char*)"HDMI-A-3";
- break;
- case 9:
- adapter_type = (char*)"HDMI-B-1";
- break;
- case 10:
- adapter_type = (char*)"HDMI-B-2";
- break;
- case 11:
- adapter_type = (char*)"HDMI-B-3";
- break;
- case 12:
- adapter_type = (char*)"HDMI-C-1";
- break;
- case 13:
- adapter_type = (char*)"HDMI-C-2";
- break;
- case 14:
- adapter_type = (char*)"HDMI-C-3";
- break;
- case 15:
- adapter_type = (char*)"DSI-1";
- break;
- case 16:
- adapter_type = (char*)"DSI-2";
- break;
- case 17:
- adapter_type = (char*)"DSI-3";
- break;
- }
g_DRM.out_of_date = 2;
- drm_set_prefered_connector(&g_DRM, adapter_type);
+ drm_set_prefered_connector(&g_DRM, connector_ctl[0]);
}
}
if ( ev->atom == ctx->atoms.gamescopeFPSLimit )
--
2.42.0
From 40cb952642118fb983ec4e3deedd7410dbf69a07 Mon Sep 17 00:00:00 2001
From: Matthew Anderson <ruinairas1992@gmail.com>
Date: Tue, 16 Jan 2024 13:57:50 -0600
Subject: [PATCH 8/9] Add edge gesture support to open Home and QAM
---
src/wlserver.cpp | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index dc37f97..e7fb7c9 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -2048,8 +2048,34 @@ void wlserver_touchmotion( double x, double y, int touch_id, uint32_t time )
if ( get_effective_touch_mode() == WLSERVER_TOUCH_CLICK_PASSTHROUGH )
{
+ bool start_gesture = false;
wlr_seat_touch_notify_motion( wlserver.wlr.seat, time, touch_id, wlserver.mouse_surface_cursorx, wlserver.mouse_surface_cursory );
- }
+
+ // Round the x-coordinate to the nearest whole number
+ uint32_t roundedCursorX = static_cast<int>(std::round(wlserver.mouse_surface_cursorx));
+ // Grab 2% of the display to be used for the edge range
+ double edge_range = g_nOutputWidth * 0.02;
+
+ // if the touch cursor x position is less or equal to the range then start the gesture for left to right
+ if (roundedCursorX <= edge_range) {
+ start_gesture = true;
+ }
+ // if the touch cursor x position is the output width minus the edge range value then we are doing right to left
+ if (roundedCursorX >= g_nOutputWidth - edge_range) {
+ start_gesture = true;
+ }
+ // when the gesture is started and we are moving to the end of the edge range open home
+ if (start_gesture && roundedCursorX >= 1 && roundedCursorX <= edge_range) {
+ wl_log.infof("Detected Home gesture");
+ wlserver_open_steam_menu(0);
+ start_gesture = false;
+ }
+ // when the gesture is started and we are moving from the output width minus the edge range to the output width open QAM
+ if (start_gesture && roundedCursorX >= g_nOutputWidth - edge_range && roundedCursorX <= g_nOutputWidth ) {
+ wl_log.infof("Detected QAM gesture");
+ wlserver_open_steam_menu(1);
+ start_gesture = false;
+ } }
else if ( get_effective_touch_mode() == WLSERVER_TOUCH_CLICK_DISABLED )
{
return;
--
2.42.0
From f975e7a804100bb031fab0526d6714530381ec45 Mon Sep 17 00:00:00 2001
From: Bouke Sybren Haarsma <boukehaarsma23@gmail.com>
Date: Wed, 3 Jan 2024 17:03:04 +0100
Subject: [PATCH 9/9] remove hacky texture
This will use more hardware planes, causing some devices to composite yeilding lower framerates
---
src/steamcompmgr.cpp | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 9a3f495..9e7eee5 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -2540,35 +2540,6 @@ paint_all(bool async)
if ( overlay == global_focus.inputFocusWindow )
update_touch_scaling( &frameInfo );
}
- else
- {
- auto tex = vulkan_get_hacky_blank_texture();
- if ( !BIsNested() && tex != nullptr )
- {
- // HACK! HACK HACK HACK
- // To avoid stutter when toggling the overlay on
- int curLayer = frameInfo.layerCount++;
-
- FrameInfo_t::Layer_t *layer = &frameInfo.layers[ curLayer ];
-
-
- layer->scale.x = g_nOutputWidth == tex->width() ? 1.0f : tex->width() / (float)g_nOutputWidth;
- layer->scale.y = g_nOutputHeight == tex->height() ? 1.0f : tex->height() / (float)g_nOutputHeight;
- layer->offset.x = 0.0f;
- layer->offset.y = 0.0f;
- layer->opacity = 1.0f; // BLAH
- layer->zpos = g_zposOverlay;
- layer->applyColorMgmt = g_ColorMgmt.pending.enabled;
-
- layer->colorspace = GAMESCOPE_APP_TEXTURE_COLORSPACE_LINEAR;
- layer->ctm = nullptr;
- layer->tex = tex;
- layer->fbid = tex->fbid();
-
- layer->filter = GamescopeUpscaleFilter::NEAREST;
- layer->blackBorder = true;
- }
- }
if (notification)
{
--
2.42.0

View File

@ -1,57 +0,0 @@
From adaa5e064a6149e1f8122cc55589f60b6f58f7ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Gu=C3=A9rin?= <libcg@protonmail.com>
Date: Tue, 19 Dec 2023 16:34:17 -0800
Subject: [PATCH 1/2] drm: fix NPE while in headless mode
caused by e810317
---
src/drm.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/drm.cpp b/src/drm.cpp
index 59516c7..8759321 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -3337,6 +3337,7 @@ void drm_get_native_colorimetry( struct drm_t *drm,
*displayEOTF = EOTF_Gamma22;
*outputEncodingColorimetry = displaycolorimetry_709;
*outputEncodingEOTF = EOTF_Gamma22;
+ return;
}
*displayColorimetry = drm->connector->metadata.colorimetry;
--
2.42.0
From 08c56c656539c88b23d243869b00cf3dd33bcb1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Gu=C3=A9rin?= <libcg@protonmail.com>
Date: Wed, 20 Dec 2023 17:18:32 -0800
Subject: [PATCH 2/2] drm: fix other headless NPE
fixes a980d912
---
src/drm.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/drm.cpp b/src/drm.cpp
index 8759321..d632128 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -2584,10 +2584,10 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
assert( drm->req == nullptr );
drm->req = drmModeAtomicAlloc();
- bool bConnectorSupportsHDR = drm->connector->metadata.supportsST2084;
- bool bConnectorHDR = g_bOutputHDREnabled && bConnectorSupportsHDR;
-
if (drm->connector != nullptr) {
+ bool bConnectorSupportsHDR = drm->connector->metadata.supportsST2084;
+ bool bConnectorHDR = g_bOutputHDREnabled && bConnectorSupportsHDR;
+
if (drm->connector->has_colorspace) {
drm->connector->pending.colorspace = ( bConnectorHDR ) ? DRM_MODE_COLORIMETRY_BT2020_RGB : DRM_MODE_COLORIMETRY_DEFAULT;
}
--
2.42.0

View File

@ -0,0 +1,16 @@
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 05337c1..aeb3a39 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -4949,8 +4949,10 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
focusDirty = true;
}
}
- if (ev->atom == ctx->atoms.steamTouchClickModeAtom )
+ if (ev->atom == ctx->atoms.steamTouchClickModeAtom && !env_to_bool(getenv("GAMESCOPE_DISABLE_TOUCH_CLICK_MODE")))
{
+ // When steam changes this to 1 stuff breaks, make it not shoot itself
+ // in the foot
gamescope::cv_touch_click_mode = (gamescope::TouchClickMode) get_prop(ctx, ctx->root, ctx->atoms.steamTouchClickModeAtom, 0u );
}
if (ev->atom == ctx->atoms.steamStreamingClientAtom)

View File

@ -0,0 +1,124 @@
diff --git a/src/drm.cpp b/src/drm.cpp
index 42c67b9..628bfc9 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -521,6 +521,7 @@ bool g_bSupportsSyncObjs = false;
extern gamescope::GamescopeModeGeneration g_eGamescopeModeGeneration;
extern GamescopePanelOrientation g_DesiredInternalOrientation;
+extern GamescopePanelOrientation g_DesiredExternalOrientation;
extern bool g_bForceDisableColorMgmt;
@@ -2008,6 +2009,10 @@ namespace gamescope
{
m_ChosenOrientation = g_DesiredInternalOrientation;
}
+ else if ( this->GetScreenType() == GAMESCOPE_SCREEN_TYPE_EXTERNAL && g_DesiredExternalOrientation != GAMESCOPE_PANEL_ORIENTATION_AUTO )
+ {
+ m_ChosenOrientation = g_DesiredExternalOrientation;
+ }
else
{
if ( this->GetProperties().panel_orientation )
diff --git a/src/main.cpp b/src/main.cpp
index 88c4c7c..6f4cae4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -121,6 +121,7 @@ const struct option *gamescope_options = (struct option[]){
{ "disable-xres", no_argument, nullptr, 'x' },
{ "fade-out-duration", required_argument, nullptr, 0 },
{ "force-orientation", required_argument, nullptr, 0 },
+ { "force-external-orientation", required_argument, nullptr, 0 },
{ "force-windows-fullscreen", no_argument, nullptr, 0 },
{ "disable-color-management", no_argument, nullptr, 0 },
@@ -171,6 +172,7 @@ const char usage[] =
" --xwayland-count create N xwayland servers\n"
" --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n"
" --force-orientation rotate the internal display (left, right, normal, upsidedown)\n"
+ " --force-external-orientation rotate the external display (left, right, normal, upsidedown)\n"
" --force-windows-fullscreen force windows inside of gamescope to be the size of the nested display (fullscreen)\n"
" --cursor-scale-height if specified, sets a base output height to linearly scale the cursor against.\n"
" --hdr-enabled enable HDR output (needs Gamescope WSI layer enabled for support from clients)\n"
@@ -348,7 +350,24 @@ static GamescopePanelOrientation force_orientation(const char *str)
} else if (strcmp(str, "upsidedown") == 0) {
return GAMESCOPE_PANEL_ORIENTATION_180;
} else {
- fprintf( stderr, "gamescope: invalid value for --force-orientation\n" );
+ fprintf( stderr, "gamescope: invalid value for given for --force-orientation\n" );
+ exit(1);
+ }
+}
+
+GamescopePanelOrientation g_DesiredExternalOrientation = GAMESCOPE_PANEL_ORIENTATION_AUTO;
+static GamescopePanelOrientation force_external_orientation(const char *str)
+{
+ if (strcmp(str, "normal") == 0) {
+ return GAMESCOPE_PANEL_ORIENTATION_0;
+ } else if (strcmp(str, "right") == 0) {
+ return GAMESCOPE_PANEL_ORIENTATION_270;
+ } else if (strcmp(str, "left") == 0) {
+ return GAMESCOPE_PANEL_ORIENTATION_90;
+ } else if (strcmp(str, "upsidedown") == 0) {
+ return GAMESCOPE_PANEL_ORIENTATION_180;
+ } else {
+ fprintf( stderr, "gamescope: invalid value for given for --force-external-orientation\n" );
exit(1);
}
}
@@ -648,6 +667,8 @@ int main(int argc, char **argv)
g_eGamescopeModeGeneration = parse_gamescope_mode_generation( optarg );
} else if (strcmp(opt_name, "force-orientation") == 0) {
g_DesiredInternalOrientation = force_orientation( optarg );
+ } else if (strcmp(opt_name, "force-external-orientation") == 0) {
+ g_DesiredExternalOrientation = force_external_orientation( optarg );
} else if (strcmp(opt_name, "sharpness") == 0 ||
strcmp(opt_name, "fsr-sharpness") == 0) {
g_upscaleFilterSharpness = atoi( optarg );
diff --git a/src/main.hpp b/src/main.hpp
index 4e4e9a7..be9a9dd 100644
--- a/src/main.hpp
+++ b/src/main.hpp
@@ -28,6 +28,7 @@ extern bool g_bGrabbed;
extern float g_mouseSensitivity;
extern const char *g_sOutputName;
+extern bool g_bExternalForced;
enum class GamescopeUpscaleFilter : uint32_t
{
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index 9afaab7..7b78bbc 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -2130,6 +2130,29 @@ static void apply_touchscreen_orientation(double *x, double *y )
break;
}
+ // Rotate screen if it's forced with --force-external-orientation
+ switch ( GetBackend()->GetConnector( gamescope::GAMESCOPE_SCREEN_TYPE_EXTERNAL )->GetCurrentOrientation() )
+ {
+ default:
+ case GAMESCOPE_PANEL_ORIENTATION_AUTO:
+ case GAMESCOPE_PANEL_ORIENTATION_0:
+ tx = *x;
+ ty = *y;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_90:
+ tx = 1.0 - *y;
+ ty = *x;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_180:
+ tx = 1.0 - *x;
+ ty = 1.0 - *y;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_270:
+ tx = *y;
+ ty = 1.0 - *x;
+ break;
+ }
+
*x = tx;
*y = ty;
}

View File

@ -1,25 +1,25 @@
%global libliftoff_minver 0.4.1
%global gamescope_version 3.13.19
%global _default_patch_fuzz 2
%global build_timestamp %(date +"%Y%m%d")
%global gamescope_tag 3.14.11
Name: gamescope
Version: 100.%{gamescope_version}
Release: 1%{?dist}.bazzite.{{{ git_dir_version }}}
Version: 100.%{gamescope_tag}
Release: %{autorelease}.bazzite
Summary: Micro-compositor for video games on Wayland
License: BSD
URL: https://github.com/ValveSoftware/gamescope
# Create stb.pc to satisfy dependency('stb')
Source1: stb.pc
Source2: chimeraos.patch
Source3: crashfix.patch
Source4: add_720p_var.patch
Source5: touch_gestures_env.patch
Source6: legion_go.patch
Source7: loki.patch
Source8: 0001-disable-steam-touch-click-atom.patch
Source9: 3.13.16.9-splitgate.patch
Source10: amd_hdr.patch
Source0: stb.pc
Patch0: hardware.patch
Patch1: 720p.patch
Patch2: disable-steam-touch-click-atom.patch
Patch3: external-rotation.patch
Patch4: panel-type.patch
BuildRequires: meson >= 0.54.0
BuildRequires: ninja-build
@ -28,8 +28,11 @@ BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: glm-devel
BuildRequires: google-benchmark-devel
BuildRequires: libeis-devel
BuildRequires: libXmu-devel
BuildRequires: libXcursor-devel
BuildRequires: pkgconfig(libdisplay-info)
BuildRequires: pkgconfig(libeis-1.0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xcomposite)
@ -47,24 +50,33 @@ BuildRequires: pkgconfig(wayland-protocols) >= 1.17
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(libpipewire-0.3)
BuildRequires: (pkgconfig(wlroots) >= 0.17.0 with pkgconfig(wlroots) < 0.18.0)
BuildRequires: pkgconfig(libavif)
BuildRequires: (pkgconfig(wlroots) >= 0.18.0 with pkgconfig(wlroots) < 0.19.0)
BuildRequires: (pkgconfig(libliftoff) >= 0.4.1 with pkgconfig(libliftoff) < 0.5)
BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(hwdata)
BuildRequires: pkgconfig(xwayland)
BuildRequires: pkgconfig(xcursor)
BuildRequires: vkroots-devel
BuildRequires: /usr/bin/glslangValidator
BuildRequires: git
BuildRequires: stb_image-devel
BuildRequires: stb_image_write-devel
BuildRequires: spirv-headers-devel
# Enforce the the minimum EVR to contain fixes for all of:
# CVE-2021-28021 CVE-2021-42715 CVE-2021-42716 CVE-2022-28041 CVE-2023-43898
# CVE-2023-45661 CVE-2023-45662 CVE-2023-45663 CVE-2023-45664 CVE-2023-45666
# CVE-2023-45667
BuildRequires: stb_image-devel >= 2.28^20231011gitbeebb24-12
# Header-only library: -static is for tracking per guidelines
BuildRequires: stb_image-static
BuildRequires: stb_image_resize-devel
BuildRequires: stb_image_resize-static
BuildRequires: stb_image_write-devel
BuildRequires: stb_image_write-static
BuildRequires: /usr/bin/glslangValidator
BuildRequires: libdecor-devel
BuildRequires: libXdamage-devel
BuildRequires: xorg-x11-server-Xwayland-devel
BuildRequires: git
# libliftoff hasn't bumped soname, but API/ABI has changed for 0.2.0 release
Requires: libliftoff%{?_isa} >= %{libliftoff_minver}
Requires: xorg-x11-server-Xwayland
Requires: google-benchmark
Requires: gamescope-libs = %{version}-%{release}
Requires: gamescope-libs = %{version}
Recommends: mesa-dri-drivers
Recommends: mesa-vulkan-drivers
@ -77,25 +89,21 @@ Summary: libs for %{name}
%summary
%prep
git clone --single-branch --branch %{gamescope_version} https://github.com/ValveSoftware/gamescope.git
git clone --depth 1 --branch %{gamescope_tag} https://github.com/ValveSoftware/gamescope
cd gamescope
git submodule update --init --recursive
mkdir -p pkgconfig
cp %{SOURCE1} pkgconfig/stb.pc
patch -Np1 < %{SOURCE2}
patch -Np1 < %{SOURCE3}
patch -Np1 < %{SOURCE4}
patch -Np1 < %{SOURCE5}
patch -Np1 < %{SOURCE6}
patch -Np1 < %{SOURCE7}
patch -Np1 < %{SOURCE8}
patch -Np1 < %{SOURCE9}
patch -Np1 < %{SOURCE10}
cp %{SOURCE0} pkgconfig/stb.pc
# Replace spirv-headers include with the system directory
sed -i 's^../thirdparty/SPIRV-Headers/include/spirv/^/usr/include/spirv/^' src/meson.build
%autopatch -p1
%build
cd gamescope
export PKG_CONFIG_PATH=pkgconfig
%meson -Dpipewire=enabled -Denable_gamescope=true -Denable_gamescope_wsi_layer=true -Denable_openvr_support=true -Dforce_fallback_for=[]
%meson -Dpipewire=enabled -Ddrm_backend=enabled -Drt_cap=enabled -Davif_screenshots=enabled -Dinput_emulation=enabled -Dsdl2_backend=enabled -Dforce_fallback_for=vkroots
%meson_build
%install
@ -108,8 +116,8 @@ cd gamescope
%attr(0755, root, root) %caps(cap_sys_nice=eip) %{_bindir}/gamescope
%files libs
%{_libdir}/*.so
%{_datadir}/vulkan/implicit_layer.d/
%{_libdir}/libVkLayer_FROG_gamescope_wsi_*.so
%{_datadir}/vulkan/implicit_layer.d/VkLayer_FROG_gamescope_wsi.*.json
%changelog
{{{ git_dir_changelog }}}

View File

@ -0,0 +1,50 @@
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index 7b78bbc..2b43edd 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -70,6 +70,8 @@
static LogScope wl_log("wlserver");
+extern bool env_to_bool(const char *env);
+
struct wlserver_t wlserver = {
.touch_down_ids = {}
};
@@ -2189,6 +2191,36 @@ void wlserver_touchmotion( double x, double y, int touch_id, uint32_t time )
if ( eMode == gamescope::TouchClickModes::Passthrough )
{
wlr_seat_touch_notify_motion( wlserver.wlr.seat, time, touch_id, tx, ty );
+
+ if ( !env_to_bool(getenv("GAMESCOPE_DISABLE_TOUCH_GESTURES")) ) {
+ bool start_gesture = false;
+
+ // Round the x-coordinate to the nearest whole number
+ uint32_t roundedCursorX = static_cast<int>(std::round(wlserver.mouse_surface_cursorx));
+ // Grab 2% of the display to be used for the edge range
+ double edge_range = g_nOutputWidth * 0.02;
+
+ // if the touch cursor x position is less or equal to the range then start the gesture for left to right
+ if (roundedCursorX <= edge_range) {
+ start_gesture = true;
+ }
+ // if the touch cursor x position is the output width minus the edge range value then we are doing right to left
+ if (roundedCursorX >= g_nOutputWidth - edge_range) {
+ start_gesture = true;
+ }
+ // when the gesture is started and we are moving to the end of the edge range open home
+ if (start_gesture && roundedCursorX >= 1 && roundedCursorX <= edge_range) {
+ wl_log.infof("Detected Home gesture");
+ wlserver_open_steam_menu(0);
+ start_gesture = false;
+ }
+ // when the gesture is started and we are moving from the output width minus the edge range to the output width open QAM
+ if (start_gesture && roundedCursorX >= g_nOutputWidth - edge_range && roundedCursorX <= g_nOutputWidth ) {
+ wl_log.infof("Detected QAM gesture");
+ wlserver_open_steam_menu(1);
+ start_gesture = false;
+ }
+ }
}
else if ( eMode == gamescope::TouchClickModes::Disabled )
{

View File

@ -0,0 +1,50 @@
diff --git a/src/drm.cpp b/src/drm.cpp
index 628bfc9..7776422 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -550,6 +550,19 @@ static constexpr uint32_t s_kSteamDeckOLEDRates[] =
90,
};
+static constexpr uint32_t s_kLegionGoRates[] =
+{
+ 60,
+ 144,
+};
+
+static constexpr uint32_t s_kLokiRates[] =
+{
+ 40,
+ 50,
+ 60,
+};
+
static void update_connector_display_info_wl(struct drm_t *drm)
{
wlserver_lock();
@@ -2109,6 +2122,10 @@ namespace gamescope
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "ANX7530 U"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "Jupiter"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "Galileo"sv );
+ const bool bLegionGoDisplay =
+ ( m_Mutable.szMakePNP == "LEN"sv && m_Mutable.szModel == "Go Display"sv );
+ const bool bLokiDisplay =
+ ( m_Mutable.szMakePNP == "AYN"sv && m_Mutable.szModel == "LK-GOLDSPV58"sv );
if ( bSteamDeckDisplay )
{
@@ -2131,6 +2148,14 @@ namespace gamescope
m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckLCDRates );
}
}
+ else if ( bLegionGoDisplay )
+ {
+ m_Mutable.ValidDynamicRefreshRates = std::span( s_kLegionGoRates );
+ }
+ else if ( bLokiDisplay )
+ {
+ m_Mutable.ValidDynamicRefreshRates = std::span( s_kLokiRates );
+ }
// Colorimetry
const char *pszColorOverride = getenv( "GAMESCOPE_INTERNAL_COLORIMETRY_OVERRIDE" );

View File

@ -1,30 +0,0 @@
diff --git a/src/drm.cpp b/src/drm.cpp
index acff5e5..fdf58ee 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -101,6 +101,12 @@ static uint32_t galileo_display_rates[] =
90,
};
+static uint32_t legion_go_display_rates[] =
+{
+ 60,
+ 144,
+};
+
static uint32_t get_conn_display_info_flags(struct drm_t *drm, struct connector *connector)
{
if (!connector)
@@ -911,8 +917,11 @@ static void parse_edid( drm_t *drm, struct connector *conn)
conn->valid_display_rates = std::span(galileo_display_rates);
} else {
conn->is_galileo_display = 0;
- if ( conn->is_steam_deck_display )
+ if ( conn->is_steam_deck_display ) {
conn->valid_display_rates = std::span(steam_deck_display_rates);
+ } else if ( strcmp(conn->make_pnp, "LEN") == 0 && strcmp(conn->model, "Go Display") == 0 ) {
+ conn->valid_display_rates = std::span(legion_go_display_rates);
+ }
}
drm_hdr_parse_edid(drm, conn, edid);

View File

@ -1,27 +0,0 @@
diff --git a/src/drm.cpp b/src/drm.cpp
index 745965c..9f8315e 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -107,6 +107,13 @@ static uint32_t legion_go_display_rates[] =
144,
};
+static uint32_t loki_display_rates[] =
+{
+ 40,
+ 50,
+ 60,
+};
+
static uint32_t get_conn_display_info_flags(struct drm_t *drm, struct connector *connector)
{
if (!connector)
@@ -921,6 +928,8 @@ static void parse_edid( drm_t *drm, struct connector *conn)
conn->valid_display_rates = std::span(steam_deck_display_rates);
} else if ( strcmp(conn->make_pnp, "LEN") == 0 && strcmp(conn->model, "Go Display") == 0 ) {
conn->valid_display_rates = std::span(legion_go_display_rates);
+ } else if ( strcmp(conn->make_pnp, "AYN") == 0 && strcmp(conn->model, "LK-GOLDSPV58") == 0 ) {
+ conn->valid_display_rates = std::span(loki_display_rates);
}
}

View File

@ -0,0 +1,81 @@
diff --git a/src/backend.h b/src/backend.h
index 9c2db15..046eb10 100644
--- a/src/backend.h
+++ b/src/backend.h
@@ -17,6 +17,7 @@ struct wlr_buffer;
struct wlr_dmabuf_attributes;
struct FrameInfo_t;
+extern gamescope::GamescopeScreenType g_ForcedScreenType;
namespace gamescope
{
@@ -213,6 +214,8 @@ namespace gamescope
// Dumb helper we should remove to support multi display someday.
gamescope::GamescopeScreenType GetScreenType()
{
+ if (g_ForcedScreenType != GAMESCOPE_SCREEN_TYPE_AUTO)
+ return g_ForcedScreenType;
if ( GetCurrentConnector() )
return GetCurrentConnector()->GetScreenType();
diff --git a/src/gamescope_shared.h b/src/gamescope_shared.h
index f34174e..ed30d8c 100644
--- a/src/gamescope_shared.h
+++ b/src/gamescope_shared.h
@@ -22,6 +22,7 @@ namespace gamescope
{
GAMESCOPE_SCREEN_TYPE_INTERNAL,
GAMESCOPE_SCREEN_TYPE_EXTERNAL,
+ GAMESCOPE_SCREEN_TYPE_AUTO,
GAMESCOPE_SCREEN_TYPE_COUNT
};
diff --git a/src/main.cpp b/src/main.cpp
index 6f4cae4..27a6c8f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -122,6 +122,7 @@ const struct option *gamescope_options = (struct option[]){
{ "fade-out-duration", required_argument, nullptr, 0 },
{ "force-orientation", required_argument, nullptr, 0 },
{ "force-external-orientation", required_argument, nullptr, 0 },
+ { "force-panel-type", required_argument, nullptr, 0 },
{ "force-windows-fullscreen", no_argument, nullptr, 0 },
{ "disable-color-management", no_argument, nullptr, 0 },
@@ -173,6 +174,7 @@ const char usage[] =
" --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n"
" --force-orientation rotate the internal display (left, right, normal, upsidedown)\n"
" --force-external-orientation rotate the external display (left, right, normal, upsidedown)\n"
+ " --force-panel-type force gamescope to treat the display as either internal or external\n"
" --force-windows-fullscreen force windows inside of gamescope to be the size of the nested display (fullscreen)\n"
" --cursor-scale-height if specified, sets a base output height to linearly scale the cursor against.\n"
" --hdr-enabled enable HDR output (needs Gamescope WSI layer enabled for support from clients)\n"
@@ -371,6 +373,18 @@ static GamescopePanelOrientation force_external_orientation(const char *str)
exit(1);
}
}
+gamescope::GamescopeScreenType g_ForcedScreenType = gamescope::GAMESCOPE_SCREEN_TYPE_AUTO;
+static gamescope::GamescopeScreenType force_panel_type(const char *str)
+{
+ if (strcmp(str, "internal") == 0) {
+ return gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL;
+ } else if (strcmp(str, "external") == 0) {
+ return gamescope::GAMESCOPE_SCREEN_TYPE_EXTERNAL;
+ } else {
+ fprintf( stderr, "gamescope: invalid value for --force-panel-type\n" );
+ exit(1);
+ }
+}
static enum GamescopeUpscaleScaler parse_upscaler_scaler(const char *str)
{
@@ -669,6 +683,8 @@ int main(int argc, char **argv)
g_DesiredInternalOrientation = force_orientation( optarg );
} else if (strcmp(opt_name, "force-external-orientation") == 0) {
g_DesiredExternalOrientation = force_external_orientation( optarg );
+ } else if (strcmp(opt_name, "force-panel-type") == 0) {
+ g_ForcedScreenType = force_panel_type( optarg );
} else if (strcmp(opt_name, "sharpness") == 0 ||
strcmp(opt_name, "fsr-sharpness") == 0) {
g_upscaleFilterSharpness = atoi( optarg );

View File

@ -1,77 +0,0 @@
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index d569ee5..0512ab0 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -66,6 +66,8 @@ extern "C" {
static LogScope wl_log("wlserver");
+extern bool env_to_bool(const char *env);
+
struct wlserver_t wlserver = {
.touch_down_ids = {}
};
@@ -2043,34 +2045,38 @@ void wlserver_touchmotion( double x, double y, int touch_id, uint32_t time )
if ( get_effective_touch_mode() == WLSERVER_TOUCH_CLICK_PASSTHROUGH )
{
- bool start_gesture = false;
wlr_seat_touch_notify_motion( wlserver.wlr.seat, time, touch_id, wlserver.mouse_surface_cursorx, wlserver.mouse_surface_cursory );
- // Round the x-coordinate to the nearest whole number
- uint32_t roundedCursorX = static_cast<int>(std::round(wlserver.mouse_surface_cursorx));
- // Grab 2% of the display to be used for the edge range
- double edge_range = g_nOutputWidth * 0.02;
-
- // if the touch cursor x position is less or equal to the range then start the gesture for left to right
- if (roundedCursorX <= edge_range) {
- start_gesture = true;
- }
- // if the touch cursor x position is the output width minus the edge range value then we are doing right to left
- if (roundedCursorX >= g_nOutputWidth - edge_range) {
- start_gesture = true;
- }
- // when the gesture is started and we are moving to the end of the edge range open home
- if (start_gesture && roundedCursorX >= 1 && roundedCursorX <= edge_range) {
- wl_log.infof("Detected Home gesture");
- wlserver_open_steam_menu(0);
- start_gesture = false;
+ if (!env_to_bool(getenv("GAMESCOPE_DISABLE_TOUCH_GESTURES"))) {
+ bool start_gesture = false;
+
+ // Round the x-coordinate to the nearest whole number
+ uint32_t roundedCursorX = static_cast<int>(std::round(wlserver.mouse_surface_cursorx));
+ // Grab 2% of the display to be used for the edge range
+ double edge_range = g_nOutputWidth * 0.02;
+
+ // if the touch cursor x position is less or equal to the range then start the gesture for left to right
+ if (roundedCursorX <= edge_range) {
+ start_gesture = true;
+ }
+ // if the touch cursor x position is the output width minus the edge range value then we are doing right to left
+ if (roundedCursorX >= g_nOutputWidth - edge_range) {
+ start_gesture = true;
+ }
+ // when the gesture is started and we are moving to the end of the edge range open home
+ if (start_gesture && roundedCursorX >= 1 && roundedCursorX <= edge_range) {
+ wl_log.infof("Detected Home gesture");
+ wlserver_open_steam_menu(0);
+ start_gesture = false;
+ }
+ // when the gesture is started and we are moving from the output width minus the edge range to the output width open QAM
+ if (start_gesture && roundedCursorX >= g_nOutputWidth - edge_range && roundedCursorX <= g_nOutputWidth ) {
+ wl_log.infof("Detected QAM gesture");
+ wlserver_open_steam_menu(1);
+ start_gesture = false;
+ }
}
- // when the gesture is started and we are moving from the output width minus the edge range to the output width open QAM
- if (start_gesture && roundedCursorX >= g_nOutputWidth - edge_range && roundedCursorX <= g_nOutputWidth ) {
- wl_log.infof("Detected QAM gesture");
- wlserver_open_steam_menu(1);
- start_gesture = false;
- } }
+ }
else if ( get_effective_touch_mode() == WLSERVER_TOUCH_CLICK_DISABLED )
{
return;

View File

@ -0,0 +1,39 @@
%global uuid compiz-alike-magic-lamp-effect@hermes83.github.com
Name: gnome-shell-extension-compiz-alike-magic-lamp-effect
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Compiz alike magic lamp effect for GNOME Shell
Group: User Interface/Desktops
License: GPLv2
URL: https://github.com/hermes83/compiz-alike-magic-lamp-effect
Source0: https://github.com/KyleGospo/compiz-alike-magic-lamp-effect/archive/refs/heads/master.tar.gz
BuildArch: noarch
BuildRequires: glib2
Requires: gnome-shell >= 3.12
%description
Compiz alike magic lamp effect for GNOME Shell
%prep
%autosetup -n compiz-alike-magic-lamp-effect-master
%build
# Nothing to build
%install
rm -rf assets
rm README.md
rm zip.sh
mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}
cp -r * %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/
glib-compile-schemas %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/schemas/
%files
%license LICENSE
%{_datadir}/gnome-shell/extensions/%{uuid}/
%changelog
{{{ git_dir_changelog }}}

View File

@ -0,0 +1,3 @@
# Work around the misdetection of some SanDisk microSD cards
ACTION=="add", SUBSYSTEM=="mmc", ENV{MMC_NAME}=="SD032", RUN+="/bin/systemd-run --no-block --collect /usr/lib/hwsupport/sdcard-rescan.sh %k"

View File

@ -0,0 +1,11 @@
# Originally from https://serverfault.com/a/767079
# Run a mount script through systemd on any mmcblk* and sd* activity
KERNEL!="mmcblk*", GOTO="steamos_automount_end"
ENV{ID_FS_USAGE}!="filesystem", GOTO="steamos_automount_end"
# The service expects to be asynchronous and shouldn't block udev rules
ACTION=="add", RUN+="/usr/bin/systemd-run --no-block --collect /usr/libexec/hwsupport/block-device-event.sh add %k"
ACTION=="remove", RUN+="/usr/bin/systemd-run --no-block --collect /usr/libexec/hwsupport/block-device-event.sh remove %k"
LABEL="steamos_automount_end"

View File

@ -39,6 +39,7 @@ Requires: e2fsprogs
Requires: f3
BuildRequires: systemd-rpm-macros
BuildRequires: xcursorgen
%description
SteamOS 3.0 Steam Deck Hardware Support Package
@ -70,14 +71,14 @@ cp -rv usr/lib/udev %{buildroot}%{_prefix}/lib/udev
cp -rv usr/bin/* %{buildroot}%{_bindir}
cp -rv usr/lib/systemd/system/* %{buildroot}%{_unitdir}
cp %{SOURCE2} %{buildroot}%{_datadir}/plymouth/themes/steamos/bazzite.png
xcursorgen usr/share/steamos/steamos-cursor-config %{buildroot}%{_datadir}/icons/steam/cursors/default
# Remove unneeded files
rm %{buildroot}%{_datadir}/jupiter_bios_updater/h2offt-g
rm %{buildroot}%{_datadir}/jupiter_bios_updater/H2OFFTx64-G.sh
rm %{buildroot}%{_datadir}/steamos/steamos.png
rm -rf %{buildroot}%{_datadir}/jupiter_bios_updater/driver
rm -rf %{buildroot}%{_unitdir}/multi-user.target.wants
rm -rf %{buildroot}%{_datadir}/alsa
rm -rf %{buildroot}%{_datadir}/icons/steam
rm %{buildroot}%{_datadir}/steamos/steamos.png
# Do post-installation
%post
@ -116,6 +117,7 @@ rm %{buildroot}%{_datadir}/steamos/steamos.png
%{_libexecdir}/hwsupport/block-device-event.sh
%{_prefix}/lib/systemd/system/*
%{_prefix}/lib/udev/rules.d/*
%{_datadir}/icons/steam/*
%{_datadir}/jupiter_bios/*
%{_datadir}/jupiter_bios_updater/*
%{_datadir}/jupiter_controller_fw_updater/*

View File

@ -0,0 +1,67 @@
%define packagename jupiter-hw-support
%define packagever jupiter-20240416.1
%global _default_patch_fuzz 2
Name: jupiter-sd-mounting-btrfs
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: SteamOS SD card mounting for desktops
License: GPLv3
URL: https://github.com/ublue-os/bazzite
Source: https://gitlab.com/evlaV/%{packagename}/-/archive/%{packagever}/%{packagename}-%{packagever}.tar.gz
Source1: 99-sdcard-rescan.rules
Source2: 99-steamos-automount.rules
Patch0: fedora.patch
Patch1: selinux.patch
Patch2: btrfs-automount.patch
Patch3: btrfs-format.patch
Patch4: user.patch
Patch5: bazzite-btrfs.patch
Patch6: systemd-run.patch
Patch7: priv-write.patch
Patch8: biosupdate.patch
Patch9: gnome.patch
Patch10: fstrim.patch
Requires: jq
BuildRequires: systemd-rpm-macros
Conflicts: %{packagename}-btrfs
%description
SteamOS SD card mounting for desktops
# Disable debug packages and build ID links
%define debug_package %{nil}
%prep
%autosetup -p1 -n %{packagename}-%{packagever}
%build
%install
export QA_RPATHS=0x0003
mkdir -p %{buildroot}%{_libexecdir}/hwsupport/
mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d/
cp usr/lib/hwsupport/sdcard-rescan.sh %{buildroot}%{_libexecdir}/hwsupport/sdcard-rescan.sh
cp usr/lib/hwsupport/steamos-automount.sh %{buildroot}%{_libexecdir}/hwsupport/steamos-automount.sh
cp usr/lib/hwsupport/common-functions %{buildroot}%{_libexecdir}/hwsupport/common-functions
cp usr/lib/hwsupport/block-device-event.sh %{buildroot}%{_libexecdir}/hwsupport/block-device-event.sh
cp %{SOURCE1} %{buildroot}%{_prefix}/lib/udev/rules.d/99-sdcard-rescan.rules
cp %{SOURCE2} %{buildroot}%{_prefix}/lib/udev/rules.d/99-steamos-automount.rules
# This lists all the files that are included in the rpm package and that
# are going to be installed into target system where the rpm is installed.
%files
%{_libexecdir}/hwsupport/sdcard-rescan.sh
%{_libexecdir}/hwsupport/steamos-automount.sh
%{_libexecdir}/hwsupport/common-functions
%{_libexecdir}/hwsupport/block-device-event.sh
%{_prefix}/lib/udev/rules.d/*
# Finally, changes from the latest release of your application are generated from
# your project's Git history. It will be empty until you make first annotated Git tag.
%changelog
{{{ git_dir_changelog }}}

View File

@ -5,7 +5,7 @@
Name: kf6-%{framework}
Version: %{majmin_ver_kf6}.0
Release: 1%{?dist}.bazzite.{{{ git_dir_version }}}
Release: 2%{?dist}.bazzite.{{{ git_dir_version }}}
Summary: KDE Frameworks 6 Tier 3 solution for filesystem abstraction
License: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only) AND MIT
@ -223,6 +223,9 @@ Developer Documentation files for %{name} for use with KDevelop or QtCreator.
%{_qt6_docdir}/*.qch
%changelog
* Thu Apr 18 2024 Jan Grulich <jgrulich@redhat.com> - 6.1.0-2
- Rebuild (qt6)
* Wed Apr 10 2024 Marc Deop i Argemí <marcdeop@fedoraproject.org> - 6.1.0-1
- 6.1.0

View File

@ -0,0 +1,23 @@
{
"KPackageStructure": "Plasma/LookAndFeel",
"KPlugin": {
"Authors": [
{
"Email": "",
"Name": "Valve"
}
],
"Category": "",
"Description": "The stock SteamOS theme",
"Id": "com.valve.vapor.desktop",
"License": "GPLv2+",
"Name": "Vapor",
"ServiceTypes": [
"Plasma/LookAndFeel"
],
"Version": "0.01",
"Website": "https://steampowered.com/"
},
"X-KDE-ParentApp": "",
"X-Plasma-MainScript": "defaults"
}

View File

@ -0,0 +1,23 @@
{
"KPackageStructure": "Plasma/LookAndFeel",
"KPlugin": {
"Authors": [
{
"Email": "",
"Name": "Valve"
}
],
"Category": "",
"Description": "Any color you like, as long as it's green",
"Id": "com.valve.vgui.desktop",
"License": "GPLv2+",
"Name": "Aurora",
"ServiceTypes": [
"Plasma/LookAndFeel"
],
"Version": "0.01",
"Website": "https://steampowered.com/"
},
"X-KDE-ParentApp": "",
"X-Plasma-MainScript": "defaults"
}

View File

@ -9,9 +9,12 @@ Source0: https://gitlab.com/evlaV/steamdeck-kde-presets/-/archive/master/
Source1: kdeglobals-desktop
Source2: steamdeck-le.svg
Source3: bazzite_logo.svgz
Source4: metadata_vapor.json
Source5: metadata_vgui2.json
Patch0: multiuser.patch
Patch1: lockscreen.patch
Patch2: bazzite_logo.patch
Patch3: ublue.patch
BuildArch: noarch
@ -69,6 +72,8 @@ rm %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vapor.desktop/contents
rm %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vgui.desktop/contents/splash/images/deck_logo.svgz
cp %{SOURCE3} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vapor.desktop/contents/splash/images/bazzite_logo.svgz
cp %{SOURCE3} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vgui.desktop/contents/splash/images/bazzite_logo.svgz
cp %{SOURCE4} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vapor.desktop/metadata.json
cp %{SOURCE5} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vgui.desktop/metadata.json
# Do post-installation
%post

View File

@ -8,10 +8,13 @@ URL: https://github.com/ublue-os/bazzite
Source0: https://gitlab.com/evlaV/%{name}/-/archive/master/%{name}-master.tar.gz
Source1: steamdeck-le.svg
Source2: bazzite_logo.svgz
Source3: metadata_vapor.json
Source4: metadata_vgui2.json
BuildArch: noarch
Patch0: fedora.patch
Patch1: kdeglobals.patch
Patch2: bazzite_logo.patch
Patch3: ublue.patch
Requires: kde-filesystem
@ -57,6 +60,8 @@ rm %{buildroot}%{_bindir}/steamos-nested-desktop
rm -rf %{buildroot}%{_datadir}/applications/steam/steamos-nested-desktop
cp %{SOURCE2} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vapor.desktop/contents/splash/images/bazzite_logo.svgz
cp %{SOURCE2} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vgui.desktop/contents/splash/images/bazzite_logo.svgz
cp %{SOURCE3} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vapor.desktop/metadata.json
cp %{SOURCE4} %{buildroot}%{_datadir}/plasma/look-and-feel/com.valve.vgui.desktop/metadata.json
mkdir -p %{buildroot}%{_datadir}/kio/servicemenus
mv %{buildroot}%{_datadir}/kservices5/ServiceMenus/steam.desktop %{buildroot}%{_datadir}/kio/servicemenus/steam.desktop
rm -rf %{buildroot}%{_datadir}/kservices5

View File

@ -0,0 +1,20 @@
diff --git a/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js b/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js
index f1dbc88..15432ed 100644
--- a/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js
+++ b/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js
@@ -1,4 +1,4 @@
applet.wallpaperPlugin = 'org.kde.image'
applet.currentConfigGroup = ["Wallpaper", "org.kde.image", "General"]
-applet.writeConfig("Image", "/usr/share/wallpapers/Steam Deck Logo Default.jpg")
+applet.writeConfig("Image", "/usr/share/wallpapers/ublue.png")
applet.reloadConfig()
diff --git a/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js b/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js
index f1dbc88..15432ed 100644
--- a/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js
+++ b/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.folder.js
@@ -1,4 +1,4 @@
applet.wallpaperPlugin = 'org.kde.image'
applet.currentConfigGroup = ["Wallpaper", "org.kde.image", "General"]
-applet.writeConfig("Image", "/usr/share/wallpapers/Steam Deck Logo Default.jpg")
+applet.writeConfig("Image", "/usr/share/wallpapers/ublue.png")
applet.reloadConfig()

View File

@ -1,4 +1,4 @@
From 05a740206a73c6aab3762eb449b0733e5b9a4c7a Mon Sep 17 00:00:00 2001
From 05cd68c9eee28c2223cc192b9744cff493f940cc Mon Sep 17 00:00:00 2001
From: Aleksei Bavshin <alebastr89@gmail.com>
Date: Sat, 25 Jun 2022 21:22:08 -0700
Subject: [PATCH] Revert "layer-shell: error on 0 dimension without anchors"
@ -8,19 +8,20 @@ This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3.
types/wlr_layer_shell_v1.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c
index fa054d3c..062fa96d 100644
diff --git a/wlr_layer_shell_v1.c b/wlr_layer_shell_v1.c
index a59f110..75a1931 100644
--- a/types/wlr_layer_shell_v1.c
+++ b/types/wlr_layer_shell_v1.c
@@ -335,26 +335,6 @@
@@ -335,26 +335,6 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) {
"layer_surface has never been configured");
return;
}
-
- const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
- if (surface->pending.desired_width == 0 &&
- (surface->pending.anchor & horiz) != horiz) {
- wl_resource_post_error(surface->resource,
- (surface->pending.anchor & horiz) != horiz) {
- wlr_surface_reject_pending(wlr_surface, surface->resource,
- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE,
- "width 0 requested without setting left and right anchors");
- return;
@ -29,16 +30,15 @@ index fa054d3c..062fa96d 100644
- const uint32_t vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
- if (surface->pending.desired_height == 0 &&
- (surface->pending.anchor & vert) != vert) {
- wl_resource_post_error(surface->resource,
- (surface->pending.anchor & vert) != vert) {
- wlr_surface_reject_pending(wlr_surface, surface->resource,
- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE,
- "height 0 requested without setting top and bottom anchors");
- return;
- }
-
if (surface->surface->unmap_commit) {
layer_surface_reset(surface);
--
2.37.3
}
static void layer_surface_role_commit(struct wlr_surface *wlr_surface) {
--
2.41.0

View File

@ -1,3 +1,5 @@
# Client examples are now available from a separate repository,
# https://gitlab.freedesktop.org/wlroots/wlr-clients
project(
'wlroots-examples',
'c',
@ -12,47 +14,25 @@ project(
cc = meson.get_compiler('c')
add_global_arguments('-DWLR_USE_UNSTABLE', language : 'c')
math = cc.find_library('m')
rt = cc.find_library('rt')
threads = dependency('threads')
wayland_egl = dependency('wayland-egl')
wayland_cursor = dependency('wayland-cursor')
cairo = dependency('cairo')
drm = dependency('libdrm')
egl = dependency('egl')
glesv2 = dependency('glesv2')
# Only needed for drm_fourcc.h
libdrm = dependency('libdrm').partial_dependency(compile_args: true, includes: true)
wayland_client = dependency('wayland-client')
wayland_server = dependency('wayland-server')
wayland_egl = dependency('wayland-egl')
wayland_protos = dependency('wayland-protocols', version: '>=1.27')
wayland_scanner_dep = dependency('wayland-scanner', native: true)
wayland_scanner = find_program(
wayland_scanner_dep.get_variable('wayland_scanner'),
native: true,
)
wlroots = dependency('wlroots')
wayland_server = dependency('wayland-server')
wlroots = dependency('wlroots', version: ['>=0.17.0', '<0.18.0'])
xkbcommon = dependency('xkbcommon')
libpng = dependency('libpng', required: false, disabler: true)
drm = dependency('libdrm')
egl = dependency('egl', required: false, disabler: true)
glesv2 = dependency('glesv2', required: false, disabler: true)
gbm = dependency('gbm', required: false, disabler: true)
# These versions correspond to ffmpeg 4.0
libavutil = dependency('libavutil', version: '>=56.14.100', required: false, disabler: true)
libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false, disabler: true)
libavformat = dependency('libavformat', version: '>=58.12.100', required: false, disabler: true)
# Only needed for drm_fourcc.h
libdrm = dependency('libdrm').partial_dependency(compile_args: true, includes: true)
# epoll is a separate library in FreeBSD
if host_machine.system() == 'freebsd'
libepoll = dependency('epoll-shim')
else
libepoll = declare_dependency()
endif
if not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil)
libavutil = disabler()
endif
wl_protocol_dir = wayland_protos.get_variable('pkgdatadir')
wlr_protocol_dir = 'protocol'
protocols = {
# Stable upstream protocols
@ -60,197 +40,11 @@ protocols = {
# Unstable upstream protocols
'fullscreen-shell-unstable-v1': wl_protocol_dir / 'unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml',
'idle-inhibit-unstable-v1': wl_protocol_dir / 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml',
'keyboard-shortcuts-inhibit-unstable-v1': wl_protocol_dir / 'unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml',
'linux-dmabuf-unstable-v1': wl_protocol_dir / 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml',
'pointer-constraints-unstable-v1': wl_protocol_dir / 'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml',
'relative-pointer-unstable-v1': wl_protocol_dir / 'unstable/relative-pointer/relative-pointer-unstable-v1.xml',
'text-input-unstable-v3': wl_protocol_dir / 'unstable/text-input/text-input-unstable-v3.xml',
'xdg-decoration-unstable-v1': wl_protocol_dir / 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml',
# Other protocols
'input-method-unstable-v2': wlr_protocol_dir / 'input-method-unstable-v2.xml',
'kde-idle': wlr_protocol_dir / 'idle.xml',
'wlr-export-dmabuf-unstable-v1': wlr_protocol_dir / 'wlr-export-dmabuf-unstable-v1.xml',
'wlr-foreign-toplevel-management-unstable-v1': wlr_protocol_dir / 'wlr-foreign-toplevel-management-unstable-v1.xml',
'wlr-gamma-control-unstable-v1': wlr_protocol_dir / 'wlr-gamma-control-unstable-v1.xml',
'wlr-input-inhibitor-unstable-v1': wlr_protocol_dir / 'wlr-input-inhibitor-unstable-v1.xml',
'wlr-layer-shell-unstable-v1': wlr_protocol_dir / 'wlr-layer-shell-unstable-v1.xml',
'wlr-output-power-management-unstable-v1': wlr_protocol_dir / 'wlr-output-power-management-unstable-v1.xml',
'wlr-screencopy-unstable-v1': wlr_protocol_dir / 'wlr-screencopy-unstable-v1.xml',
'wlr-virtual-pointer-unstable-v1': wlr_protocol_dir / 'wlr-virtual-pointer-unstable-v1.xml',
}
compositors = {
'simple': {
'src': 'simple.c',
},
'pointer': {
'src': 'pointer.c',
},
'touch': {
'src': ['touch.c', 'cat.c'],
},
'tablet': {
'src': 'tablet.c',
},
'rotation': {
'src': ['rotation.c', 'cat.c'],
},
'multi-pointer': {
'src': 'multi-pointer.c',
},
'output-layout': {
'src': ['output-layout.c', 'cat.c'],
},
'fullscreen-shell': {
'src': 'fullscreen-shell.c',
'proto': ['fullscreen-shell-unstable-v1'],
},
'quads': {
'src': 'quads.c',
},
'scene-graph': {
'src': 'scene-graph.c',
'proto': ['xdg-shell'],
},
}
clients = {
'idle': {
'src': 'idle.c',
'dep': [threads],
'proto': ['kde-idle'],
},
'idle-inhibit': {
'src': ['idle-inhibit.c', 'egl_common.c'],
'dep': [wayland_egl, egl, glesv2],
'proto': [
'idle-inhibit-unstable-v1',
'xdg-shell',
],
},
'keyboard-shortcuts-inhibit': {
'src': ['keyboard-shortcuts-inhibit.c', 'egl_common.c'],
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
'proto': [
'keyboard-shortcuts-inhibit-unstable-v1',
'xdg-shell',
],
},
'layer-shell': {
'src': ['layer-shell.c', 'egl_common.c'],
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
'proto': [
'wlr-layer-shell-unstable-v1',
'xdg-shell',
],
},
'input-inhibitor': {
'src': ['input-inhibitor.c', 'egl_common.c'],
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
'proto': [
'wlr-input-inhibitor-unstable-v1',
'xdg-shell',
],
},
'gamma-control': {
'src': 'gamma-control.c',
'dep': [wayland_cursor, math],
'proto': ['wlr-gamma-control-unstable-v1'],
},
'output-power-management': {
'src': 'output-power-management.c',
'dep': [wayland_client],
'proto': ['wlr-output-power-management-unstable-v1'],
},
'pointer-constraints': {
'src': ['pointer-constraints.c', 'egl_common.c'],
'dep': [wayland_egl, egl, glesv2],
'proto': [
'pointer-constraints-unstable-v1',
'xdg-shell',
],
},
'relative-pointer': {
'src': ['relative-pointer-unstable-v1.c', 'egl_common.c'],
'dep': [wayland_egl, egl, glesv2],
'proto': [
'pointer-constraints-unstable-v1',
'relative-pointer-unstable-v1',
'xdg-shell',
],
},
'dmabuf-capture': {
'src': 'dmabuf-capture.c',
'dep': [
libavcodec,
libavformat,
libavutil,
drm,
threads,
],
'proto': ['wlr-export-dmabuf-unstable-v1'],
},
'screencopy': {
'src': 'screencopy.c',
'dep': [libpng, rt],
'proto': ['wlr-screencopy-unstable-v1'],
},
'screencopy-dmabuf': {
'src': 'screencopy-dmabuf.c',
'dep': [libpng, rt, gbm, drm],
'proto': [
'wlr-screencopy-unstable-v1',
'linux-dmabuf-unstable-v1',
],
},
'toplevel-decoration': {
'src': ['toplevel-decoration.c', 'egl_common.c'],
'dep': [wayland_egl, egl, glesv2],
'proto': [
'xdg-decoration-unstable-v1',
'xdg-shell',
],
},
'input-method': {
'src': 'input-method.c',
'dep': [wayland_egl, libepoll],
'proto': [
'input-method-unstable-v2',
'text-input-unstable-v3',
'xdg-shell',
],
},
'text-input': {
'src': ['text-input.c', 'egl_common.c'],
'dep': [wayland_egl, wayland_cursor, egl, glesv2],
'proto': [
'text-input-unstable-v3',
'xdg-shell',
],
},
'foreign-toplevel': {
'src': 'foreign-toplevel.c',
'proto': ['wlr-foreign-toplevel-management-unstable-v1'],
},
'virtual-pointer': {
'src': 'virtual-pointer.c',
'proto': ['wlr-virtual-pointer-unstable-v1'],
},
'input-method-keyboard-grab': {
'src': 'input-method-keyboard-grab.c',
'dep': [xkbcommon],
'proto': [
'input-method-unstable-v2',
],
},
}
protocols_code = {}
protocols_server_header = {}
protocols_client_header = {}
proto_inc = include_directories('protocol')
foreach name, path : protocols
code = custom_target(
@ -280,6 +74,54 @@ foreach name, path : protocols
protocols_client_header += { name: client_header }
endforeach
compositors = {
'simple': {
'src': 'simple.c',
},
'pointer': {
'src': 'pointer.c',
},
'touch': {
'src': ['touch.c', 'cat.c'],
},
'tablet': {
'src': 'tablet.c',
},
'rotation': {
'src': ['rotation.c', 'cat.c'],
},
'output-layout': {
'src': ['output-layout.c', 'cat.c'],
},
'fullscreen-shell': {
'src': 'fullscreen-shell.c',
'proto': ['fullscreen-shell-unstable-v1'],
},
'scene-graph': {
'src': 'scene-graph.c',
'proto': ['xdg-shell'],
},
'output-layers': {
'src': 'output-layers.c',
'proto': [
'xdg-shell',
],
},
'cairo-buffer': {
'src': 'cairo-buffer.c',
'dep': cairo,
},
'embedded': {
'src': [
'embedded.c',
protocols_code['xdg-shell'],
protocols_client_header['xdg-shell'],
],
'dep': [wayland_client, wayland_egl, egl, glesv2],
},
}
foreach name, info : compositors
extra_src = []
foreach p : info.get('proto', [])
@ -289,29 +131,6 @@ foreach name, info : compositors
executable(
name,
[info.get('src'), extra_src],
dependencies: [libdrm, wlroots, wayland_server, xkbcommon],
include_directories: [proto_inc],
dependencies: [libdrm, wlroots, wayland_server, xkbcommon, info.get('dep', [])],
)
endforeach
foreach name, info : clients
all_dep_found = true
extra_src = []
foreach d : info.get('dep', [])
all_dep_found = all_dep_found and d.found()
endforeach
foreach p : info.get('proto')
extra_src += protocols_code[p]
extra_src += protocols_client_header[p]
endforeach
if all_dep_found
executable(
name,
[info.get('src'), extra_src],
dependencies: [wayland_client, info.get('dep', [])],
)
else
warning('Dependencies not satisfied for ' + name)
endif
endforeach

View File

@ -1,9 +1,10 @@
# Version of the .so library
%global abi_ver 12
%global abi_ver 13
%global gitcommit a5c9826e6d7d8b504b07d1c02425e6f62b020791
Name: wlroots
Version: 0.17.0
Release: 3%{?dist}
Version: 0.18.0
Release: 2%{?dist}
Summary: A modular Wayland compositor library
# Source files/overall project licensed as MIT, but
@ -16,61 +17,54 @@ Summary: A modular Wayland compositor library
# * protocol/wlr-layer-shell-unstable-v1.xml
# * protocol/wlr-output-management-unstable-v1.xml
# - LGPL-2.1-or-later
# * protocol/idle.xml
# * protocol/server-decoration.xml
# Those files are processed to C-compilable files by the
# `wayland-scanner` binary during build and don't alter
# the main license of the binaries linking with them by
# the underlying licenses.
License: MIT
URL: https://gitlab.freedesktop.org/wlroots/wlroots
Source0: %{url}/-/releases/%{version}/downloads/%{name}-%{version}.tar.gz
Source1: %{url}/-/releases/%{version}/downloads/%{name}-%{version}.tar.gz.sig
# 0FDE7BE0E88F5E48: emersion <contact@emersion.fr>
Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rkjfnghbjxug6b19#/gpgkey-0FDE7BE0E88F5E48.gpg
URL: https://github.com/Joshua-Ashton/wlroots
Source0: %{url}/archive/%{gitcommit}/wlroots-%{gitcommit}.tar.gz
# this file is a modification of examples/meson.build so as to:
# - make it self-contained
# - only has targets for examples known to compile well (cf. "examples) global)
Source3: examples.meson.build
# Upstream patches
# Fedora patches
# Following patch is required for phoc.
Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch
Patch: Revert-layer-shell-error-on-0-dimension-without-anch.patch
BuildRequires: gcc
BuildRequires: glslang
BuildRequires: gnupg2
BuildRequires: meson >= 0.59.0
BuildRequires: (pkgconfig(libdisplay-info) >= 0.1.1 with pkgconfig(libdisplay-info) < 0.2)
BuildRequires: (pkgconfig(libliftoff) >= 0.4.0 with pkgconfig(libliftoff) < 0.5.0)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(gbm) >= 17.1.0
BuildRequires: pkgconfig(glesv2)
BuildRequires: pkgconfig(hwdata)
BuildRequires: pkgconfig(libdrm) >= 2.4.113
BuildRequires: pkgconfig(libdrm) >= 2.4.114
BuildRequires: pkgconfig(libinput) >= 1.21.0
BuildRequires: pkgconfig(libseat)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(pixman-1)
BuildRequires: pkgconfig(pixman-1) >= 0.42.0
BuildRequires: pkgconfig(vulkan)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-protocols) >= 1.27
BuildRequires: pkgconfig(wayland-protocols) >= 1.32
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(wayland-server) >= 1.21
BuildRequires: pkgconfig(wayland-server) >= 1.22
BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xcb-errors)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-renderutil)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xwayland)
BuildRequires: pkgconfig(libdisplay-info)
# protocol files required to compile examples (see SOURCE3)
%global example_protocols \
input-method-unstable-v2 wlr-export-dmabuf-unstable-v1 \
wlr-foreign-toplevel-management-unstable-v1 wlr-gamma-control-unstable-v1 \
wlr-input-inhibitor-unstable-v1 wlr-layer-shell-unstable-v1 \
wlr-output-power-management-unstable-v1 wlr-screencopy-unstable-v1 \
wlr-virtual-pointer-unstable-v1
%description
%{summary}.
@ -84,10 +78,6 @@ Recommends: pkgconfig(xcb-icccm)
# for examples
Suggests: gcc
Suggests: meson >= 0.58.0
Suggests: pkgconfig(libpng)
Suggests: pkgconfig(libavutil)
Suggests: pkgconfig(libavcodec)
Suggests: pkgconfig(libavformat)
Suggests: pkgconfig(wayland-egl)
%description devel
@ -95,18 +85,16 @@ Development files for %{name}.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -N
# apply unconditional patches
%autopatch -p1 -M19
# apply conditional patches
%autosetup -N -n wlroots-%{gitcommit}
# apply unconditional patches (0..99)
%autopatch -p1 -M99
# apply conditional patches (100..)
%build
MESON_OPTIONS=(
# Disable options requiring extra/unpackaged dependencies
-Dexamples=false
-Dxcb-errors=disabled
)
%{meson} "${MESON_OPTIONS[@]}"
@ -115,12 +103,6 @@ MESON_OPTIONS=(
%install
%{meson_install}
EXAMPLE_PROTOCOLS=( %{example_protocols} ) # Normalize whitespace by creating an array
install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/*.[ch]
for proto in "${EXAMPLE_PROTOCOLS[@]}"; do
install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples/protocol' "protocol/${proto}.xml"
done
install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build'
@ -131,7 +113,7 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build
%files
%license LICENSE
%doc README.md
%{_libdir}/lib%{name}.so.%{abi_ver}*
%{_libdir}/lib%{name}.so.%{abi_ver}{,.*}
%files devel
@ -142,6 +124,20 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build
%changelog
* Mon Mar 11 2024 Aleksei Bavshin <alebastr@fedoraproject.org> - 0.17.2-1
- Update to 0.17.2 (#2269046)
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Dec 21 2023 Aleksei Bavshin <alebastr@fedoraproject.org> - 0.17.1-1
- Update to 0.17.1 (#2255547)
* Tue Nov 21 2023 Aleksei Bavshin <alebastr@fedoraproject.org> - 0.17.0-1
- Update to 0.17.0 (#2250885)
- Use xcb-errors util library
- Apply patches from 0.17.x bugfix branch
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View File

@ -24,10 +24,11 @@ process-scheduler enable=true {
// Preset process assignment profiles
assignments {
// Prevent crackling and distortion from the sound server
sound-server nice=-15 io=(realtime)0 {
sound-server nice=-19 sched=(fifo)89 io=(realtime)0 {
"/usr/bin/pipewire"
"/usr/bin/pipewire-pulse"
"/usr/bin/jackd"
"/usr/bin/wireplumber"
}
// Applications with realtime audio processing needs

View File

@ -1 +0,0 @@
32 7 5 steamos-cursor.png 100

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1 +0,0 @@
../plymouth/themes/steamos/steamos.png

View File

@ -1,6 +1,3 @@
[org/gnome/mutter]
experimental-features=['variable-refresh-rate']
[org/gnome/desktop/interface]
toolkit-accessibility=false
font-antialiasing='rgba'

View File

@ -1,3 +1,4 @@
*Want an animated wallpaper?* The Wallpaper Engine plugin for KDE is pre-installed~[View the usage guide](https://github.com/catsout/wallpaper-engine-kde-plugin#usage)
*Rather use KDE Konsole?* You can restore the application icon for it with `ujust restore-original-terminal`. Be sure to also change the default terminal in System Settings.
ProtonUp-Qt can be used to install and update custom versions of Proton. We recommend Proton-GE for problematic Steam games and Wine-GE for all other use cases outside of Steam.
*Want to customize and theme your desktop?* [Tweak your desktop by following our guide](https://universal-blue.discourse.group/docs?topic=574)
ProtonUp-Qt can be used to install and update custom versions of Proton. We recommend Proton-GE for problematic Steam games and Wine-GE for all other use cases outside of Steam.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -3,19 +3,19 @@
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
LAUNCH_OPTIONS=""
DECK_OPTION=""
# If Steam has been launched before we can safely launch with -steamdeck
# to maintain the gamemode update branch
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
if [ -f $HOME/.local/share/Steam/ubuntu12_32/steamui.so ]; then
LAUNCH_OPTIONS+=" -steamdeck"
DECK_OPTION="-steamdeck"
fi
fi
DGPU_OPTION=""
# If we're running this on a dGPU, disable accelerated cef
if [[ $(switcherooctl list | grep -o 'Device:' | wc -l) > 1 ]]; then
LAUNCH_OPTIONS+=" -cef-disable-gpu"
DGPU_OPTION="-cef-disable-gpu"
fi
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
@ -25,7 +25,7 @@ if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
# It's been primarily developed for allowing the desktop functionality
# on the Steam Controller to work while Steam is open on Wayland.
# Also supports Steam Input as a whole.
env LD_PRELOAD=/usr/lib/extest/libextest.so /usr/bin/steam "$LAUNCH_OPTIONS" "$@"
env LD_PRELOAD=/usr/lib/extest/libextest.so /usr/bin/steam "$DECK_OPTION" "$DGPU_OPTION" "$@"
else
/usr/bin/steam "$LAUNCH_OPTIONS" "$@"
/usr/bin/steam "$DECK_OPTION" "$DGPU_OPTION" "$@"
fi

View File

@ -24,10 +24,11 @@ process-scheduler enable=true {
// Preset process assignment profiles
assignments {
// Prevent crackling and distortion from the sound server
sound-server nice=-15 io=(realtime)0 {
sound-server nice=-19 sched=(fifo)89 io=(realtime)0 {
"/usr/bin/pipewire"
"/usr/bin/pipewire-pulse"
"/usr/bin/jackd"
"/usr/bin/wireplumber"
}
// Applications with realtime audio processing needs

View File

@ -1,28 +0,0 @@
#
# tuned configuration
#
[main]
summary=General tuned profile for CPUs without p-state support
[cpu]
priority=10
governor=schedutil
energy_perf_bias=normal
energy_performance_preference=balance_performance
[acpi]
platform_profile=balanced
[audio]
timeout=10
[video]
radeon_powersave=dpm-balanced,auto
[disk]
# Comma separated list of devices, all devices if commented out.
# devices=sda
[scsi_host]
alpm=medium_power

View File

@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
# SCRIPT VERSION
HWS_VER=38
HWS_VER=39
HWS_VER_FILE="/etc/bazzite/hws_version"
HWS_VER_RAN=$(cat $HWS_VER_FILE)
@ -23,6 +23,8 @@ KNOWN_FEDORA_VERSION=$(cat $KNOWN_FEDORA_VERSION_FILE)
# GLOBAL
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)"
CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }')
MINIMUM_FREE_ZRAM=$(awk '/MemTotal/ {printf "%.0f", $2 * 0.01}' /proc/meminfo)
CURRENT_FREE_ZRAM=$(sysctl vm.min_free_kbytes | awk '{print $3}')
KARGS=$(rpm-ostree kargs)
@ -55,6 +57,15 @@ if [[ $IMAGE_NAME =~ "deck" && ":AOKZOE A1 AR07:" =~ ":$SYS_ID:" ]]; then
fi
fi
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then
if [[ "GenuineIntel" == "$CPU_VENDOR" ]]; then
if [[ ! $KARGS =~ "hid_sensor_hub" ]]; then
echo "Intel Framework Laptop detected, applying needed keyboard fix"
NEEDED_KARGS+=("--append-if-missing=module_blacklist=hid_sensor_hub");
fi
fi
fi
if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then
if [[ ! $KARGS =~ "video" ]]; then
echo "Adding panel orientation for Lenovo Legion Go"
@ -142,16 +153,17 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam
fi
# FSTAB CONFIGURATION
if [[ $(grep "compress=zstd" /etc/fstab) ]]; then
echo "Applying fstab param adjustments"
if grep -q '64GB' <<< "$(lsblk -o MODEL)"; then
echo "64GB eMMC detected"
sed -i 's/compress=zstd:1/noatime,lazytime,discard=sync,compress-force=zstd:3,space_cache=v2/g' /etc/fstab
else
sed -i 's/compress=zstd:1/noatime,lazytime,commit=120,discard=async,compress-force=zstd:1,space_cache=v2/g' /etc/fstab
fi
if [[ ! -e /etc/ublue-os/.fstab_adjusted.flag && $(grep "compress=zstd" /etc/fstab) ]]; then
echo "Applying fstab param adjustments"
if grep -q '64GB' <<< "$(lsblk -o MODEL)"; then
echo "64GB eMMC detected"
sed -i 's/compress=zstd:1/noatime,lazytime,discard=sync,compress-force=zstd:3,space_cache=v2/g' /etc/fstab
else
sed -i 's/compress=zstd:1/noatime,lazytime,commit=120,discard=async,compress-force=zstd:1,space_cache=v2/g' /etc/fstab
fi
touch /etc/ublue-os/.fstab_adjusted.flag
else
echo "No fstab param adjustments needed"
echo "No fstab param adjustments needed"
fi
# ZRAM MINIMUM-FREE CONFIGURATION
@ -170,15 +182,6 @@ if [[ -f "/var/lib/waydroid/lxc/waydroid/config" ]]; then
sed -i '/lxc\.apparmor\.profile\s*=\s*unconfined/d' "/var/lib/waydroid/lxc/waydroid/config"
fi
# NO-PSTATE FIX
if grep -q "acpi-cpufreq" <<< "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)"; then
sed -i 's/balanced=balanced$/balanced=balanced-no-pstate/g' /etc/tuned/ppd.conf
tuned-adm profile balanced-no-pstate
else
sed -i 's/balanced=balanced-no-pstate/balanced=balanced/g' /etc/tuned/ppd.conf
tuned-adm profile balanced
fi
# HOSTNAME FIX
# If the hostname is too long Distrobox will fail during setup
# Let's check the length and reset it to something sensible if that happens.

View File

@ -10,12 +10,14 @@ IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)"
# INIT
BAZZITE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bazzite"
mkdir -p "$BAZZITE_CONFIG_DIR"
# SCRIPT VERSION
USER_SETUP_VER=31
USER_SETUP_VER=32
USER_SETUP_VER_FILE="$BAZZITE_CONFIG_DIR/version"
USER_SETUP_FEDORA_VER_FILE="$BAZZITE_CONFIG_DIR/fedora_version"
USER_SETUP_IMAGE_VER_FILE=$BAZZITE_CONFIG_DIR/image_name""
@ -104,6 +106,11 @@ else
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
echo 'Running setup for Silverblue on Steam Deck'
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then
echo 'Enabling automatic power profile extension'
gnome-extensions enable power-profile-switcher@eliapasquali.github.io
fi
echo 'Setting up templates'
mkdir -p "$HOME/Templates"
if [[ ! -f "$HOME/Templates/vkBasalt.conf" ]]; then

View File

@ -9,4 +9,6 @@ else
fi
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(|'"$KERNEL_SUFFIX"'-)(\d+\.\d+\.\d+)' | sed -E 's/kernel-(|'"$KERNEL_SUFFIX"'-)//')"
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
chmod 0600 /lib/modules/$QUALIFIED_KERNEL/initramfs.img

View File

@ -42,7 +42,7 @@ pstate-force-enable:
# Configure grub bootmenu visibility and fix duplicate entries
configure-grub ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
GRUB_STATE="$(grep -P "^GRUB_TIMEOUT_STYLE=hidden" /etc/default/grub)"
OPTION={{ ACTION }}
@ -100,7 +100,7 @@ add-user-to-input-group:
# Configure watchdog (default: enabled, recovers the system in the event of a malfunction)
configure-watchdog ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
WATCHDOG_STATE="$(rpm-ostree kargs)"
CPU_MODEL=$(lscpu --json | jq -r '."lscpu"[7]."data"')
@ -143,7 +143,7 @@ configure-watchdog ACTION="":
# Set the default powerprofile to load when the desktop starts
configure-powerprofile ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
OPTION={{ ACTION }}
if [ "$OPTION" == "help" ]; then
@ -179,7 +179,7 @@ configure-powerprofile ACTION="":
# Install and configure Decky Loader (https://github.com/SteamDeckHomebrew/decky-loader) and plugins for alternative handhelds
setup-decky ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
DECKY_STATE="${b}${red}Not Installed${n}"
if [[ -d $HOME/homebrew/plugins ]]; then
@ -234,7 +234,7 @@ setup-decky ACTION="":
# Ptyxis terminal transparency
ptyxis-transparency opacity="0.95":
#!/usr/bin/env bash
#!/usr/bin/bash
set -euxo pipefail
if [[ -n "$(echo "{{ opacity }}" | grep -v '^[.0-9]*$')" ]]; then
printf "Value must be numeric: %s.\n" "{{ opacity }}"

View File

@ -119,7 +119,7 @@ install-opentabletdriver:
# This installs ollama, a way to run various open LLMs locally on the CPU or GPU
install-ollama:
#!/usr/bin/env bash
#!/usr/bin/bash
echo 'Follow the prompts and check the tutorial: '
echo
GPU_CHOICES=()
@ -194,7 +194,7 @@ install-ollama:
# Create fedora distrobox if it doesn't exist
[private]
distrobox-check-fedora:
#!/bin/env bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
if grep -qvz "fedora" <<< $(distrobox list); then
echo "Setting up Fedora distrobox"

View File

@ -2,7 +2,7 @@
# Setup and configure CDEmu Daemon and Client plus GUI Apps
setup-cdemu ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
CDEMU_STATE="$(rpm -qa cdemu-daemon)"
SERVICE_STATE="$(systemctl is-enabled --user cdemu-daemon.service)"

View File

@ -2,7 +2,7 @@
# Setup and configure Sunshine Game Streaming host
setup-sunshine ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
SUNSHINE_STATE="$(rpm -qa sunshine)"
SERVICE_STATE="$(systemctl is-enabled --user sunshine.service)"

View File

@ -2,7 +2,7 @@
# Add virtual audio channels/sinks named Game, Voice, Browser and Music which you can split audio to using qpwgraph, helvum, carla or other pipewire patchbays for use in OBS and other use cases
setup-virtual-channels ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
@ -96,7 +96,7 @@ setup-virtual-channels ACTION="":
# Setup a simple Virtual Surround 7.1 sink using the ASH Control Room 1 convolver file (you can change this yourself after setup)
setup-virtual-surround ACTION="":
#!/bin/bash
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
mkdir -p ~/.config/pipewire/pipewire.conf.d
mkdir -p ~/.config/pipewire/hrir_hesuvi

View File

@ -18,7 +18,7 @@ setup-virtualization ACTION="":
fi
OPTION={{ ACTION }}
if [ "$OPTION" == "help" ]; then
echo "Usage: ujust configure-grub <option>"
echo "Usage: ujust setup-virtualization <option>"
echo " <option>: Specify the quick option to skip the prompt"
echo " Use 'virt-on' to select Enable Virtualization"
echo " Use 'virt-off' to select Disable Virtualization"

View File

@ -4,4 +4,4 @@ Packages installed in Distrobox can be exported to appear like any other applica
*This isn't a distro*, this is a custom image built on  Fedora Atomic Desktop technology~[View our mission](https://ublue.it/mission/)
**Support the app store!**~[Donate to  Flatpak](https://opencollective.com/flatpak)
**Support indie game preservation and OSS developers!**~[Join Hit Save!'s Patreon](https://patreon.com/hitsave)
**H.264 hardware acceleration is supported out of the box.** No tweaks necessary!
**H.264 hardware acceleration is supported out of the box.** No tweaks necessary!

View File

@ -7,6 +7,4 @@ Discover Overlay is preinstalled, allowing Discord to overlay your games during
*Looking to setup Waydroid?*~[View our documentation](https://universal-blue.discourse.group/docs?topic=32)
Bazzite uses ZSTD compression in BTRFS by default, and deduplicates files across your entire drive. **More space for your games!**
*Have a large library of ROMs to manage?* ROM Properties Page shell extension is installed by default and makes it much easier, with thumbnails and additional info for all of your files.
*Need more control over your Flatpaks?* Check out the Warehouse and Flatseal applications to manage them.
*Want more tips and tricks?*~[View Documentation](https://universal-blue.discourse.group/docs?topic=574)
*Desktop users: Want to easily customize MangoHud and vkBasalt?* Use the GOverlay application as a graphical user interface to adjust settings.
*Need more control over your Flatpaks?* Check out the Warehouse and Flatseal applications to manage them.

View File

@ -74,3 +74,7 @@ show-power-option=false
show-gamemode=false
hide-forcequit=true
show-boxbuddy=true
[org/gnome/shell/extensions/power-profile-switcher]
ac='balanced'
bat='power-saver'

View File

@ -24,17 +24,17 @@ titlebar-font='Noto Sans Medium 11'
[org/gnome/desktop/background]
color-shading-type='solid'
picture-options='zoom'
picture-uri='file:///usr/share/backgrounds/steamdeck/Steam%20Deck%20Logo%20Default.jpg'
picture-uri-dark='file:///usr/share/backgrounds/steamdeck/Steam%20Deck%20Logo%20Default.jpg'
primary-color='#1A2336'
secondary-color='#211B33'
picture-uri='file:///usr/share/backgrounds/ublue.png'
picture-uri-dark='file:///usr/share/backgrounds/ublue.png'
primary-color='#202646'
secondary-color='#36438E'
[org/gnome/desktop/screensaver]
color-shading-type='solid'
picture-options='zoom'
picture-uri='file:///usr/share/backgrounds/steamdeck/Steam%20Deck%20Logo%20Default.jpg'
primary-color='#1A2336'
secondary-color='#211B33'
picture-uri='file:///usr/share/backgrounds/ublue.png'
primary-color='#202646'
secondary-color='#36438E'
[org/gnome/shell/extensions/just-perfection]
animation=4
@ -64,11 +64,14 @@ style-dialogs=0
blur=false
[org/gnome/shell/extensions/blur-my-shell/screenshot]
blur=false
blur=true
[org/gnome/shell/extensions/blur-my-shell/lockscreen]
blur=false
blur=true
[org/gnome/shell/extensions/com/github/hermes83/compiz-windows-effect]
maximize-effect=true
resize-effect=true
[org/gnome/shell/extensions/ncom/github/hermes83/compiz-alike-magic-lamp-effect]
duration=250

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Universal Blue</name>
<filename>/usr/share/backgrounds/ublue.png</filename>
<filename-dark>/usr/share/backgrounds/ublue.png</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#202646</pcolor>
<scolor>#36438E</scolor>
</wallpaper>
</wallpapers>

View File

@ -1,3 +1,4 @@
*Looking for some nostalgia?* Enable `Compiz windows effect` from the Extension Manager.
*Missing the top left hot corner?* Apply pressure to the bottom edge of your screen with your mouse. You can also re-enable the hot corner from settings if desired.
ProtonPlus can be used to install and update custom versions of Proton. We recommend Proton-GE for problematic Steam games and Wine-GE for all other use cases outside of Steam.
Manage desktop extensions with [Extension Manager](https://universal-blue.discourse.group/docs?topic=166)
ProtonPlus can be used to install and update custom versions of Proton. We recommend Proton-GE for problematic Steam games and Wine-GE for all other use cases outside of Steam.