Skip to content

Commit

Permalink
Merge pull request #249 from Pogogo007/gamescope-session-bump
Browse files Browse the repository at this point in the history
Add deck-quirks patch and force WSi
  • Loading branch information
ptr1337 authored Jun 21, 2024
2 parents 4907514 + f381d04 commit cb93536
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 3 deletions.
12 changes: 9 additions & 3 deletions handheld/gamescope-session-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ makedepends=('git')
optdepends=('mangohud: for performance overlay')
install=gamescope-session.install
source=("${_gitdir}::git+https://github.com/ChimeraOS/${_gitdir}.git"
"powerbuttond.patch")
"powerbuttond.patch"
"force-wsi.patch"
"deck-quirks.patch")
sha512sums=('SKIP'
'1fd74f3312a5315447bce7c89c2501df54af15deb9f0a96c1e0a4d2d2304b77e472d3da381b3b98e2c60f83cd72b5ddf2e4a675d5e1cf575b0f5826e876dec08')
'1fd74f3312a5315447bce7c89c2501df54af15deb9f0a96c1e0a4d2d2304b77e472d3da381b3b98e2c60f83cd72b5ddf2e4a675d5e1cf575b0f5826e876dec08'
'016b37516b86420c56be63e16533cc21cb1aac287f0957fb75b529a688e484e31fc833d531411eb7bfbb3b301905efbf34405eb160f880bd26269ec8437a0ea7'
'd0235dd01487795fa2d0018e96dd18a9c86d1904bf67d14dd33dc19bfb78f6ce5cfccc20e1854f3a7a17cba1d33eb8aa3fab2add2e9a75424a8a5396f3723111')

pkgver() {
cd "$srcdir/${_gitdir}"
Expand All @@ -26,7 +30,9 @@ pkgver() {
}

prepare() {
patch --directory=$_gitdir --forward --strip=1 --input=../powerbuttond.patch
patch --directory=$_gitdir --no-backup-if-mismatch --forward --strip=1 --input=../powerbuttond.patch
patch --directory=$_gitdir --no-backup-if-mismatch --forward --strip=1 --input=../force-wsi.patch
patch --directory=$_gitdir --no-backup-if-mismatch --forward --strip=1 --input=../deck-quirks.patch
}

package() {
Expand Down
34 changes: 34 additions & 0 deletions handheld/gamescope-session-git/deck-quirks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From fc4a051049caa71695883be12b9fc409c48d0c44 Mon Sep 17 00:00:00 2001
From: Nekoh <[email protected]>
Date: Fri, 21 Jun 2024 16:04:51 -0400
Subject: [PATCH] Add exports for steam decks

---
usr/share/gamescope-session-plus/device-quirks | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/usr/share/gamescope-session-plus/device-quirks b/usr/share/gamescope-session-plus/device-quirks
index 91f4077..703a262 100644
--- a/usr/share/gamescope-session-plus/device-quirks
+++ b/usr/share/gamescope-session-plus/device-quirks
@@ -85,12 +85,20 @@ fi
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
DRM_MODE=fixed
export STEAM_DISPLAY_REFRESH_LIMITS=40,60
+ export STEAM_ENABLE_DYNAMIC_BACKLIGHT=1
+ export STEAM_ENABLE_FAN_CONTROL=1
+ export WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7
fi

# OLED Steam Deck
if [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then
DRM_MODE=fixed
export STEAM_DISPLAY_REFRESH_LIMITS=45,90
+ export STEAM_ENABLE_DYNAMIC_BACKLIGHT=1
+ export STEAM_ENABLE_FAN_CONTROL=1
+ export WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7
+ export STEAM_GAMESCOPE_FORCE_HDR_DEFAULT=1
+ export STEAM_GAMESCOPE_FORCE_OUTPUT_TO_HDR10PQ_DEFAULT=1
fi

# ROG Ally
24 changes: 24 additions & 0 deletions handheld/gamescope-session-git/force-wsi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From f5054350c3676b96fe1a0ce6d4dc17b88d30c315 Mon Sep 17 00:00:00 2001
From: Bouke Sybren Haarsma <[email protected]>
Date: Sun, 14 Jan 2024 15:03:13 +0100
Subject: [PATCH] force WSI

---
usr/share/gamescope-session-plus/gamescope-session-plus | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/usr/share/gamescope-session-plus/gamescope-session-plus b/usr/share/gamescope-session-plus/gamescope-session-plus
index d8739b2..1bdf7bf 100755
--- a/usr/share/gamescope-session-plus/gamescope-session-plus
+++ b/usr/share/gamescope-session-plus/gamescope-session-plus
@@ -21,6 +21,10 @@ post_gamescope_start () {
export INTEL_DEBUG=norbc
export mesa_glthread=true

+# This should be used by default by gamescope. Cannot hurt to force it anyway.
+# Reported better framelimiting with this enabled
+export ENABLE_GAMESCOPE_WSI=1
+
# Some environment variables by default (taken from Deck session)
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0

0 comments on commit cb93536

Please sign in to comment.