update to lunar and git

This commit is contained in:
ward 2023-04-27 17:27:21 +03:00
parent 719a4d4da1
commit 691f2aea47
3 changed files with 123 additions and 30 deletions

View File

@ -0,0 +1,83 @@
#!/usr/bin/sh
DEFAULT_RESOLUTION=$(xdpyinfo | awk '/dimensions/{print $2}')
# Steam Deck Default
SCREEN_WIDTH=1280
SCREEN_HEIGHT=800
# Sometimes gamescope's DRM-retrieved resolution values
# don't work well with what gamescope actually allows,
# and can result in a "verifying installation" hang.
# To fix that we have to make some adjustments for
# those values to ones gamescope accepts.
# 32:9
if [[ $DEFAULT_RESOLUTION == 5120x1440 ]]; then
SCREEN_WIDTH=5120
SCREEN_HEIGHT=1440
fi
if [[ $DEFAULT_RESOLUTION == 3840x1080 ]]; then
SCREEN_WIDTH=3840
SCREEN_HEIGHT=1080
fi
# 21:9
if [[ $DEFAULT_RESOLUTION == 3440x1440 ]]; then
SCREEN_WIDTH=3440
SCREEN_HEIGHT=1440
fi
if [[ $DEFAULT_RESOLUTION == 2160x1080 ]]; then
SCREEN_WIDTH=2160
SCREEN_HEIGHT=1080
fi
# 16:10
# gamescope is not friendly to 16:10 aspect ratio other than it's default 1280x800, so we have to do some conversion:
if [[ $DEFAULT_RESOLUTION == 3840x2400 ]]; then
SCREEN_WIDTH=3840
SCREEN_HEIGHT=2160
fi
# Oddly enough many 2560x1600 laptops dont support 2560x1440, so we have to drop them down to 1920x1080
if [[ $DEFAULT_RESOLUTION == 2560x1600 ]]; then
SCREEN_WIDTH=1920
SCREEN_HEIGHT=1080
fi
if [[ $DEFAULT_RESOLUTION == 1920x1200 ]]; then
SCREEN_WIDTH=1920
SCREEN_HEIGHT=1080
fi
# 16:9
if [[ $DEFAULT_RESOLUTION == 3840x2160 ]]; then
SCREEN_WIDTH=3840
SCREEN_HEIGHT=2160
fi
if [[ $DEFAULT_RESOLUTION == 2560x1440 ]]; then
SCREEN_WIDTH=2560
SCREEN_HEIGHT=1440
fi
if [[ $DEFAULT_RESOLUTION == 1920x1080 ]]; then
SCREEN_WIDTH=1920
SCREEN_HEIGHT=1080
fi
if [[ $DEFAULT_RESOLUTION == 1280x720 ]]; then
SCREEN_WIDTH=1280
SCREEN_HEIGHT=720
fi
#Quirk for framework laptop:
if [[ $DEFAULT_RESOLUTION == 2256x1504 ]]; then
SCREEN_WIDTH=2160
SCREEN_HEIGHT=1080
fi
CONFIG=$HOME/.config/environment.d/gamescope-session.conf
if [ ! -d $HOME/.config/environment.d/ ]; then
echo "Creating $CONFIG"
mkdir -p $HOME/.config/environment.d/
echo 'SCREEN_WIDTH='$SCREEN_WIDTH > $CONFIG
echo 'SCREEN_HEIGHT='$SCREEN_HEIGHT >> $CONFIG
fi

2
debian/rules vendored
View File

@ -1,8 +1,10 @@
#!/usr/bin/make -f #!/usr/bin/make -f
override_dh_install: override_dh_install:
dh_install
rm -rfv debian/gamescope-session/usr/share/wayland-sessions/gamescope-session.desktop rm -rfv debian/gamescope-session/usr/share/wayland-sessions/gamescope-session.desktop
cp -rfv debian/extras/zwayland-gamescope-session.desktop debian/gamescope-session/usr/share/wayland-sessions/ cp -rfv debian/extras/zwayland-gamescope-session.desktop debian/gamescope-session/usr/share/wayland-sessions/
cp -rfv debian/extras/gamescope-resolution-configurator debian/gamescope-session/usr/bin/gamescope-resolution-configurator
%: %:
dh $@ dh $@

View File

@ -1,34 +1,42 @@
From 9611d3d68b659a1328836f77fc209eb6db534320 Mon Sep 17 00:00:00 2001 diff -ru b/gamescope-session-script a/gamescope-session-script
From: GloriousEggroll <gloriouseggroll@gmail.com> --- b/gamescope-session-script 2023-04-27 17:22:14.428995862 +0300
Date: Wed, 11 Jan 2023 10:08:19 -0700 +++ a/gamescope-session-script 2023-04-27 17:21:30.549189166 +0300
Subject: [PATCH] update to work on nobara with hdr @@ -7,6 +7,13 @@
export INTEL_DEBUG=norbc
--- export mesa_glthread=true
usr/share/gamescope-session/gamescope-session-script | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-) +# Set Gamescope args
+export GAMESCOPE_EXTRA_LAUNCH_ARGS='--hdr-enabled --hdr-itm-enable'
diff --git a/usr/share/gamescope-session/gamescope-session-script b/usr/share/gamescope-session/gamescope-session-script +export GAMESCOPE_BASE_LAUNCH_ARGS='--xwayland-count 2 -O *,eDP-1 --default-touch-mode 4 --hide-cursor-delay 3000 --fade-out-duration 200':$GAMESCOPE_EXTRA_LAUNCH_ARGS
index 5c99641..7f3982a 100755
--- a/usr/share/gamescope-session/gamescope-session-script
+++ b/usr/share/gamescope-session/gamescope-session-script
@@ -1,4 +1,7 @@
-#!/bin/bash
+#!/usr/bin/bash
+ +
+export ENABLE_GAMESCOPE_WSI=1 +export ENABLE_GAMESCOPE_WSI=1
+export DXVK_HDR=1 +export DXVK_HDR=1
+
# Some environment variables by default (taken from Deck session)
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
# Fix intel color corruption @@ -184,22 +191,14 @@
# might come with some performance degradation but is better than a corrupted $CURSOR \
@@ -169,6 +172,8 @@ if [ -z "$GAMESCOPECMD" ] ; then -e \
fi $RESOLUTION \
GAMESCOPECMD="/usr/bin/gamescope \ - --xwayland-count 2 \
$CURSOR \ - -O *,eDP-1 \
+ --hdr-enabled \ - --default-touch-mode 4 \
+ --hdr-itm-enable \ - --hide-cursor-delay 3000 \
-e \ - --fade-out-duration 200 \
$RESOLUTION \ + $GAMESCOPE_EXTRA_LAUNCH_ARGS \
--xwayland-count 2 \ -R $socket -T $stats"
-- else
2.39.2 GAMESCOPECMD="/usr/bin/gamescope \
$CURSOR \
-e \
$RESOLUTION \
- --xwayland-count 2 \
- -O *,eDP-1 \
- --default-touch-mode 4 \
- --hide-cursor-delay 3000 \
- --fade-out-duration 200 \
+ $GAMESCOPE_EXTRA_LAUNCH_ARGS \
--prefer-vk-device $VULKAN_ADAPTER \
-R $socket -T $stats"
fi