From 719a4d4da1f7e22c376b9436c6d122c326c44571 Mon Sep 17 00:00:00 2001 From: ward Date: Thu, 27 Apr 2023 13:46:02 +0300 Subject: [PATCH] update to lunar and git --- .github/workflows/release.yml | 2 +- debian/changelog | 5 + {gamescope-session/debian => debian}/control | 0 .../debian => debian}/copyright | 0 .../zwayland-gamescope-session.desktop | 2 +- {gamescope-session/debian => debian}/files | 0 debian/gamescope-session.install | 1 + debian/rules | 8 + .../debian => debian}/source/format | 0 gamescope-session/debian/changelog | 11 - .../debian/extras/steamos-session-select | 8 - .../debian/gamescope-session.install | 2 - gamescope-session/debian/rules | 3 - gamescope-session/usr/bin/gamescope-session | 24 -- gamescope-session/usr/bin/jupiter-biosupdate | 3 - gamescope-session/usr/bin/steam-http-loader | 32 --- .../steamos-polkit-helpers/jupiter-biosupdate | 11 - .../bin/steamos-polkit-helpers/steamos-update | 11 - gamescope-session/usr/bin/steamos-update | 11 - .../systemd/user/gamescope-session.service | 17 -- .../applications/gamescope-mimeapps.list | 7 - .../applications/steam_http_loader.desktop | 5 - .../usr/share/gamescope-session/device-quirks | 40 --- .../gamescope-session-script | 271 ------------------ .../actions/org.chimeraos.update.policy | 32 --- main.sh | 4 + ...01-update-to-work-on-nobara-with-hdr.patch | 34 +++ release.sh | 2 +- 28 files changed, 55 insertions(+), 491 deletions(-) create mode 100644 debian/changelog rename {gamescope-session/debian => debian}/control (100%) rename {gamescope-session/debian => debian}/copyright (100%) rename {gamescope-session/usr/share/wayland-sessions => debian/extras}/zwayland-gamescope-session.desktop (79%) rename {gamescope-session/debian => debian}/files (100%) create mode 100644 debian/gamescope-session.install create mode 100755 debian/rules rename {gamescope-session/debian => debian}/source/format (100%) delete mode 100644 gamescope-session/debian/changelog delete mode 100755 gamescope-session/debian/extras/steamos-session-select delete mode 100644 gamescope-session/debian/gamescope-session.install delete mode 100755 gamescope-session/debian/rules delete mode 100755 gamescope-session/usr/bin/gamescope-session delete mode 100755 gamescope-session/usr/bin/jupiter-biosupdate delete mode 100755 gamescope-session/usr/bin/steam-http-loader delete mode 100755 gamescope-session/usr/bin/steamos-polkit-helpers/jupiter-biosupdate delete mode 100755 gamescope-session/usr/bin/steamos-polkit-helpers/steamos-update delete mode 100755 gamescope-session/usr/bin/steamos-update delete mode 100644 gamescope-session/usr/lib/systemd/user/gamescope-session.service delete mode 100644 gamescope-session/usr/share/applications/gamescope-mimeapps.list delete mode 100644 gamescope-session/usr/share/applications/steam_http_loader.desktop delete mode 100644 gamescope-session/usr/share/gamescope-session/device-quirks delete mode 100755 gamescope-session/usr/share/gamescope-session/gamescope-session-script delete mode 100644 gamescope-session/usr/share/polkit-1/actions/org.chimeraos.update.policy create mode 100644 patches/0001-update-to-work-on-nobara-with-hdr.patch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2cf8ce8..fa9a600 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: build: runs-on: self-hosted container: - image: ubuntu:22.10 + image: ubuntu:23.04 volumes: - /proc:/proc options: --privileged -it diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8a12667 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +gamescope-session (0.1-99pika1-lunar) lunar; urgency=low + + * Initial Creation + + -- Ward Nakchbandi Sat, 01 Oct 2022 14:50:00 +0200 diff --git a/gamescope-session/debian/control b/debian/control similarity index 100% rename from gamescope-session/debian/control rename to debian/control diff --git a/gamescope-session/debian/copyright b/debian/copyright similarity index 100% rename from gamescope-session/debian/copyright rename to debian/copyright diff --git a/gamescope-session/usr/share/wayland-sessions/zwayland-gamescope-session.desktop b/debian/extras/zwayland-gamescope-session.desktop similarity index 79% rename from gamescope-session/usr/share/wayland-sessions/zwayland-gamescope-session.desktop rename to debian/extras/zwayland-gamescope-session.desktop index ee48bfa..55290e2 100644 --- a/gamescope-session/usr/share/wayland-sessions/zwayland-gamescope-session.desktop +++ b/debian/extras/zwayland-gamescope-session.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Encoding=UTF-8 -Name=Steam Deck Mode +Name=Steam Deck Mode (gamescope) Comment=Steam Big Picture session Exec=gamescope-session Type=Application diff --git a/gamescope-session/debian/files b/debian/files similarity index 100% rename from gamescope-session/debian/files rename to debian/files diff --git a/debian/gamescope-session.install b/debian/gamescope-session.install new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/debian/gamescope-session.install @@ -0,0 +1 @@ +usr diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b682b43 --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +override_dh_install: + 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/ + +%: + dh $@ diff --git a/gamescope-session/debian/source/format b/debian/source/format similarity index 100% rename from gamescope-session/debian/source/format rename to debian/source/format diff --git a/gamescope-session/debian/changelog b/gamescope-session/debian/changelog deleted file mode 100644 index 6f5cf01..0000000 --- a/gamescope-session/debian/changelog +++ /dev/null @@ -1,11 +0,0 @@ -gamescope-session (0.0.git.92.60c3f5f9-99pika3) kinetic; urgency=low - - * Fix return to desktop - - -- Ward Nakchbandi Sat, 01 Oct 2022 14:50:00 +0200 - -gamescope-session (0.0.git.92.60c3f5f9-99pika1) kinetic; urgency=low - - * Initial Creation - - -- Ward Nakchbandi Sat, 01 Oct 2022 14:50:00 +0200 diff --git a/gamescope-session/debian/extras/steamos-session-select b/gamescope-session/debian/extras/steamos-session-select deleted file mode 100755 index b93e9ef..0000000 --- a/gamescope-session/debian/extras/steamos-session-select +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -e - -die() { echo >&2 "!! $*"; exit 1; } - -systemctl --user stop gamescope-session.service - diff --git a/gamescope-session/debian/gamescope-session.install b/gamescope-session/debian/gamescope-session.install deleted file mode 100644 index 2402f9d..0000000 --- a/gamescope-session/debian/gamescope-session.install +++ /dev/null @@ -1,2 +0,0 @@ -usr -debian/extras/steamos-session-select usr/bin/ diff --git a/gamescope-session/debian/rules b/gamescope-session/debian/rules deleted file mode 100755 index cbe925d..0000000 --- a/gamescope-session/debian/rules +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/make -f -%: - dh $@ diff --git a/gamescope-session/usr/bin/gamescope-session b/gamescope-session/usr/bin/gamescope-session deleted file mode 100755 index 9f1382f..0000000 --- a/gamescope-session/usr/bin/gamescope-session +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# Script to start the session used by Valve with minor tweaks for ChimeraOS. - -# Window managers sets this to wayland but apps using Gamescope must use x11 -export XDG_SESSION_TYPE=x11 - -# Update the enviroment with DESKTOP_SESSION and all XDG variables -dbus-update-activation-environment --systemd DESKTOP_SESSION `env | grep ^XDG_ | cut -d = -f 1` - -# This makes it so that xdg-desktop-portal doesn't find any portal implementations and doesn't start them and makes -# them crash/exit because the dbus env has no DISPLAY. In turn this causes dbus calls to the portal which don't rely -# on implementations to hang (such as SDL talking to the real time portal) -systemctl --user set-environment XDG_DESKTOP_PORTAL_DIR="" - -# Remove these as they prevent gamescope-session from starting correctly -systemctl --user unset-environment DISPLAY XAUTHORITY - -# If this shell script is killed then stop gamescope-session -trap 'systemctl --user stop gamescope-session.service' HUP INT TERM - -# Start gamescope-session and wait -systemctl --user --wait start gamescope-session.service & -wait diff --git a/gamescope-session/usr/bin/jupiter-biosupdate b/gamescope-session/usr/bin/jupiter-biosupdate deleted file mode 100755 index 68e885b..0000000 --- a/gamescope-session/usr/bin/jupiter-biosupdate +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash - -exit 0; diff --git a/gamescope-session/usr/bin/steam-http-loader b/gamescope-session/usr/bin/steam-http-loader deleted file mode 100755 index 21beb2c..0000000 --- a/gamescope-session/usr/bin/steam-http-loader +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/env python3 -import urllib.parse -import os.path -import argparse -import subprocess - -def run(action, arg): - final_url = "steam://{0}/{1}".format(action, arg) - subprocess.run(["steam", final_url]) - -def main(): - parser = argparse.ArgumentParser(description='Launch a link in the steam browser.') - parser.add_argument('uri') - args = parser.parse_args() - - uri = args.uri - - url = urllib.parse.urlparse(uri, "file") - - # convert mailto://A@b.com to steam://mailto/A@b.com - if (url.scheme == 'mailto'): - run('mailto', url.netloc) - return - - # open any other URL, converting paths to full file URIs - if (url.scheme == 'file' and not os.path.isabs(url.path)): - absolute_path = os.path.abspath(url.path) - url = url._replace(path=absolute_path) - run('openurl_external', url.geturl()) - return - -main() diff --git a/gamescope-session/usr/bin/steamos-polkit-helpers/jupiter-biosupdate b/gamescope-session/usr/bin/steamos-polkit-helpers/jupiter-biosupdate deleted file mode 100755 index 1d7b792..0000000 --- a/gamescope-session/usr/bin/steamos-polkit-helpers/jupiter-biosupdate +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -eu - -if [[ $EUID -ne 0 ]]; -then - exec pkexec --disable-internal-agent "$0" "$@" -fi - -exec /usr/bin/jupiter-biosupdate "$@" - diff --git a/gamescope-session/usr/bin/steamos-polkit-helpers/steamos-update b/gamescope-session/usr/bin/steamos-polkit-helpers/steamos-update deleted file mode 100755 index bae7403..0000000 --- a/gamescope-session/usr/bin/steamos-polkit-helpers/steamos-update +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -eu - -if [[ $EUID -ne 0 ]]; -then - exec pkexec --disable-internal-agent "$0" "$@" -fi - -exec /usr/bin/steamos-update "$@" - diff --git a/gamescope-session/usr/bin/steamos-update b/gamescope-session/usr/bin/steamos-update deleted file mode 100755 index 6e740b4..0000000 --- a/gamescope-session/usr/bin/steamos-update +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -if command -v frzr-deploy > /dev/null; then - if [ "$1" == "check" ]; then - frzr-deploy --check - else - frzr-deploy --steam-progress - fi -else - exit 7 -fi diff --git a/gamescope-session/usr/lib/systemd/user/gamescope-session.service b/gamescope-session/usr/lib/systemd/user/gamescope-session.service deleted file mode 100644 index 746297c..0000000 --- a/gamescope-session/usr/lib/systemd/user/gamescope-session.service +++ /dev/null @@ -1,17 +0,0 @@ -# Startup systemd unit for Gamescope session meant to be started by a script. -# Logs will go to journal and logged into /run/user/$USER -# This is the way Valve does it, we add our own file structure and scripts -[Unit] -Description=Gamescope Session -BindsTo=graphical-session.target -Before=graphical-session.target -Wants=graphical-session-pre.target -After=graphical-session-pre.target - -[Service] -ExecStart=/usr/share/gamescope-session/gamescope-session-script -# This is a temporary workaround for the some proton apps becoming -# confused by the AF_UNIX socket they get for the stdout when the -# service outputs to the journal. (e.g. Vampire Survivors). -StandardOutput=append:%t/gamescope-session.log -StandardError=append:%t/gamescope-session.log diff --git a/gamescope-session/usr/share/applications/gamescope-mimeapps.list b/gamescope-session/usr/share/applications/gamescope-mimeapps.list deleted file mode 100644 index ce710e2..0000000 --- a/gamescope-session/usr/share/applications/gamescope-mimeapps.list +++ /dev/null @@ -1,7 +0,0 @@ -[Default Applications] -x-scheme-handler/http=steam_http_loader.desktop -x-scheme-handler/https=steam_http_loader.desktop -x-scheme-handler/mailto=steam_http_loader.desktop -application/pdf=steam_http_loader.desktop -application/x-extension-html=steam_http_loader.desktop -text/html=steam_http_loader.desktop diff --git a/gamescope-session/usr/share/applications/steam_http_loader.desktop b/gamescope-session/usr/share/applications/steam_http_loader.desktop deleted file mode 100644 index 65c7754..0000000 --- a/gamescope-session/usr/share/applications/steam_http_loader.desktop +++ /dev/null @@ -1,5 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Steam HTTP Handler -NoDisplay=true -Exec=steam-http-loader %u diff --git a/gamescope-session/usr/share/gamescope-session/device-quirks b/gamescope-session/usr/share/gamescope-session/device-quirks deleted file mode 100644 index 9405e44..0000000 --- a/gamescope-session/usr/share/gamescope-session/device-quirks +++ /dev/null @@ -1,40 +0,0 @@ -# This file would be sourced by gamescope-session script (meant for -# ChimeraOS devices). - -SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" - -# OXP Devices -OXP_LIST="ONE XPLAYER:ONEXPLAYER 1 T08:ONEXPLAYER 1S A08:ONEXPLAYER 1S T08:ONEXPLAYER mini A07:ONEXPLAYER mini GA72:ONEXPLAYER mini GT72:ONEXPLAYER Mini Pro:ONEXPLAYER GUNDAM GA72:ONEXPLAYER 2 ARP23" -AOK_LIST="AOKZOE A1 AR07" -if [[ ":$OXP_LIST:" =~ ":$SYS_ID:" ]] || [[ ":$AOK_LIST:" =~ ":$SYS_ID:" ]]; then - # Dependent on a special --force-orientation option in gamescope - if ( gamescope --help 2>&1 | grep -e "--force-orientation" > /dev/null ) ; then - export GAMESCOPECMD="/usr/bin/gamescope \ - -e \ - --generate-drm-mode fixed \ - --xwayland-count 2 \ - -O *,eDP-1 \ - --default-touch-mode 4 \ - --hide-cursor-delay 3000 \ - --fade-out-duration 200 \ - --force-orientation left " - fi - # Set refresh rate range and enable refresh rate switching - export STEAM_DISPLAY_REFRESH_LIMITS=40,60 -fi - -# AYANEO AIR Devices -AIR_LIST="AIR:AIR Pro" -if [[ ":$AIR_LIST:" =~ ":$SYS_ID:" ]]; then - # Dependent on a special --force-orientation option in gamescope - if ( gamescope --help 2>&1 | grep -e "--force-orientation" > /dev/null ) ; then - export GAMESCOPECMD="/usr/bin/gamescope \ - -e \ - --xwayland-count 2 \ - -O *,eDP-1 \ - --default-touch-mode 4 \ - --hide-cursor-delay 3000 \ - --fade-out-duration 200 \ - --force-orientation left " - fi -fi diff --git a/gamescope-session/usr/share/gamescope-session/gamescope-session-script b/gamescope-session/usr/share/gamescope-session/gamescope-session-script deleted file mode 100755 index 2613dac..0000000 --- a/gamescope-session/usr/share/gamescope-session/gamescope-session-script +++ /dev/null @@ -1,271 +0,0 @@ -#!/usr/bin/bash - -export ENABLE_GAMESCOPE_WSI=1 -export DXVK_HDR=1 - -# Some environment variables by default (taken from Deck session) -export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 - -# Enable Mangoapp -export STEAM_USE_MANGOAPP=1 -export MANGOHUD_CONFIGFILE=$(mktemp /tmp/mangohud.XXXXXXXX) - -export STEAM_USE_DYNAMIC_VRS=1 -export RADV_FORCE_VRS_CONFIG_FILE=$(mktemp /tmp/radv_vrs.XXXXXXXX) - -# Plop GAMESCOPE_MODE_SAVE_FILE into $XDG_CONFIG_HOME (defaults to ~/.config). -export GAMESCOPE_MODE_SAVE_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/gamescope/modes.cfg" - -# Make path to gamescope mode save file. -mkdir -p "$(dirname "$GAMESCOPE_MODE_SAVE_FILE")" -touch "$GAMESCOPE_MODE_SAVE_FILE" -#echo "Making Gamescope Mode Save file at \"$GAMESCOPE_MODE_SAVE_FILE\"" - -# Support for gamescope tearing with GAMESCOPE_ALLOW_TEARING atom -export STEAM_GAMESCOPE_HAS_TEARING_SUPPORT=1 - -# Enable tearing controls in steam -export STEAM_GAMESCOPE_TEARING_SUPPORTED=1 - -# There is no way to set a color space for an NV12 -# buffer in Wayland. And the color management protocol that is -# meant to let this happen is missing the color range... -# So just workaround this with an ENV var that Remote Play Together -# and Gamescope will use for now. -export GAMESCOPE_NV12_COLORSPACE=k_EStreamColorspace_BT601 - -# Initially write no_display to our config file -# so we don't get mangoapp showing up before Steam initializes -# on OOBE and stuff. -mkdir -p "$(dirname "$MANGOHUD_CONFIGFILE")" -echo "no_display" > "$MANGOHUD_CONFIGFILE" - -# Prepare our initial VRS config file -# for dynamic VRS in Mesa. -mkdir -p "$(dirname "$RADV_FORCE_VRS_CONFIG_FILE")" -echo "1x1" > "$RADV_FORCE_VRS_CONFIG_FILE" - -# To expose vram info from radv -export WINEDLLOVERRIDES=dxgi=n - -# Workaround for steam getting killed immediatly during reboot -export STEAMOS_STEAM_REBOOT_SENTINEL="/tmp/steamos-reboot-sentinel" - -# Workaround for steam getting killed immediatly during shutdown -# Same idea as reboot sentinel above -export STEAMOS_STEAM_SHUTDOWN_SENTINEL="/tmp/steamos-shutdown-sentinel" - -# Enable volume key management via steam for this session -export STEAM_ENABLE_VOLUME_HANDLER=1 - -# Have SteamRT's xdg-open send http:// and https:// URLs to Steam -export SRT_URLOPEN_PREFER_STEAM=1 - -# Disable automatic audio device switching in steam, now handled by wireplumber -export STEAM_DISABLE_AUDIO_DEVICE_SWITCHING=1 - -# Enable support for xwayland isolation per-game in Steam -export STEAM_MULTIPLE_XWAYLANDS=1 - -# We have the Mesa integration for the fifo-based dynamic fps-limiter -export STEAM_GAMESCOPE_DYNAMIC_FPSLIMITER=1 - -# We have gamma/degamma exponent support -export STEAM_GAMESCOPE_COLOR_TOYS=1 - -# We have NIS support -export STEAM_GAMESCOPE_NIS_SUPPORTED=1 - -# Don't wait for buffers to idle on the client side before sending them to gamescope -export vk_xwayland_wait_ready=false - -# Let steam know it can unmount drives without superuser privileges -export STEAM_ALLOW_DRIVE_UNMOUNT=1 - -# We no longer need to set GAMESCOPE_EXTERNAL_OVERLAY from steam, mangoapp now does it itself -export STEAM_DISABLE_MANGOAPP_ATOM_WORKAROUND=1 - -# Enable horizontal mangoapp bar -export STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1 - -# Scaling support -export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1 - -# Set input method modules for Qt/GTK that will show the Steam keyboard -export QT_IM_MODULE=steam -export GTK_IM_MODULE=Steam - -# To play nice with the short term callback-based limiter for now -export GAMESCOPE_LIMITER_FILE=$(mktemp /tmp/gamescope-limiter.XXXXXXXX) - -# Use SteamOS background if exists -if [ -f "/usr/share/steamos/steamos.png" ] ; then - export STEAM_UPDATEUI_PNG_BACKGROUND=/usr/share/steamos/steamos.png -fi - -ulimit -n 524288 - -# Source device quirks if exists -if [ -f /usr/share/gamescope-session/device-quirks ]; then - . /usr/share/gamescope-session/device-quirks -fi - -# Source environment from ~/.config/environment.d with user overrides -set -a -for i in "${HOME}"/.config/environment.d/*.conf ; -do - [[ -f "${i}" ]] && . "${i}" -done -set +a - -# Setup socket for gamescope -# Create run directory file for startup and stats sockets -tmpdir="$([[ -n ${XDG_RUNTIME_DIR+x} ]] && mktemp -p "$XDG_RUNTIME_DIR" -d -t gamescope.XXXXXXX)" -socket="${tmpdir:+$tmpdir/startup.socket}" -stats="${tmpdir:+$tmpdir/stats.pipe}" -# Fail early if we don't have a proper runtime directory setup -if [[ -z $tmpdir || -z ${XDG_RUNTIME_DIR+x} ]]; then - echo >&2 "!! Failed to find run directory in which to create stats session sockets (is \$XDG_RUNTIME_DIR set?)" - exit 0 -fi - -export GAMESCOPE_STATS="$stats" -mkfifo -- "$stats" -mkfifo -- "$socket" - -# Attempt to claim global session if we're the first one running (e.g. /run/1000/gamescope) -linkname="gamescope-stats" -# shellcheck disable=SC2031 # (broken warning) -sessionlink="${XDG_RUNTIME_DIR:+$XDG_RUNTIME_DIR/}${linkname}" # Account for XDG_RUNTIME_DIR="" (notfragileatall) -lockfile="$sessionlink".lck -exec 9>"$lockfile" # Keep as an fd such that the lock lasts as long as the session if it is taken -if flock -n 9 && rm -f "$sessionlink" && ln -sf "$tmpdir" "$sessionlink"; then - # Took the lock. Don't blow up if those commands fail, though. - echo >&2 "Claimed global gamescope stats session at \"$sessionlink\"" -else - echo >&2 "!! Failed to claim global gamescope stats session" -fi - -# Use cursor if file exist -if [ -z "$CURSOR_FILE" ] ; then - CURSOR_FILE="${HOME}/.local/share/Steam/tenfoot/resource/images/cursors/arrow_right.png" -fi -CURSOR="" -if [ -f "$CURSOR_FILE" ] ; then - CURSOR="--cursor ${CURSOR_FILE}" -fi - -# Define session if not overriden -if [ -z "$STEAMCMD" ] ; then - STEAMCMD="steam -gamepadui -newbigpicture -steamdeck -steamos3" -fi - -if [ -z "$GAMESCOPECMD" ] ; then - RESOLUTION="" - if [ -n "$SCREEN_WIDTH" ] && [ -n "$SCREEN_HEIGHT" ] ; then - RESOLUTION="-W $SCREEN_WIDTH -H $SCREEN_HEIGHT" - fi - GAMESCOPECMD="/usr/bin/gamescope \ - $CURSOR \ - --hdr-enabled \ - --hdr-itm-enable \ - -e \ - $RESOLUTION \ - --xwayland-count 2 \ - -O *,eDP-1 \ - --default-touch-mode 4 \ - --hide-cursor-delay 3000 \ - --fade-out-duration 200 \ - -R $socket -T $stats" -else - # Add socket and stats read - GAMESCOPECMD+=" -R $socket -T $stats" -fi - -# Workaround for Steam login issue while Steam client change propagates out of Beta -touch "${HOME}"/.steam/root/config/SteamAppData.vdf || true - -# Log rotate the last session -if [ -f "${HOME}"/.steam-tweaks.log ]; then - cp "${HOME}"/.steam-tweaks.log "${HOME}"/.steam-tweaks.log.old -fi -if [ -f "${HOME}"/.steam-stdout.log ]; then - cp "${HOME}"/.steam-stdout.log "${HOME}"/.steam-stdout.log.old -fi -if [ -f "${HOME}"/.gamescope-stdout.log ]; then - cp "${HOME}"/.gamescope-stdout.log "${HOME}"/.gamescope-stdout.log.old -fi - -# Start gamescope compositor, log it's output and background it -$GAMESCOPECMD > "${HOME}"/.gamescope-stdout.log 2>&1 & -gamescope_pid="$!" - -if read -r -t 3 response_x_display response_wl_display <> "$socket"; then - export DISPLAY="$response_x_display" - export GAMESCOPE_WAYLAND_DISPLAY="$response_wl_display" - # We're done! -else - kill -9 "$gamescope_pid" - wait - exit 0 - # Systemd or Session manager will have to restart session -fi - -# Run steam-tweaks if exists -if command -v steam-tweaks > /dev/null; then - steam-tweaks > "${HOME}"/.steam-tweaks.log -fi - -# Input method support if present -if command -v /usr/bin/ibus-daemon > /dev/null; then - /usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable -fi - -# If we have mangoapp binary start it -if command -v mangoapp > /dev/null; then - mangoapp > "${HOME}"/.mangoapp-stdout.log 2>&1 & -fi - -# Start Steam client -$STEAMCMD > "${HOME}"/.steam-stdout.log 2>&1 - -# When the client exits, kill gamescope nicely -kill $gamescope_pid - -# Start a background sleep for five seconds because we don't trust it -sleep 5 & -sleep_pid="$!" - -# Catch reboot and poweroof sentinels here -if [[ -e "$STEAMOS_STEAM_REBOOT_SENTINEL" ]]; then - rm -f "$STEAMOS_STEAM_REBOOT_SENTINEL" - reboot -fi -if [[ -e "$STEAMOS_STEAM_SHUTDOWN_SENTINEL" ]]; then - rm -f "$STEAMOS_STEAM_SHUTDOWN_SENTINEL" - poweroff -fi - -# Wait for gamescope or the sleep to finish for timeout purposes -ret=0 -wait -n $gamescope_pid $sleep_pid || ret=$? - -# If we get a SIGTERM/etc while waiting this happens. Proceed to kill -9 everything but complain -if [[ $ret = 127 ]]; then - echo >&2 "gamescope-session: Interrupted while waiting on teardown, force-killing remaining tasks" -fi - -# Kill all remaining jobs and warn if unexpected things are in there (should be just sleep_pid, unless gamescope failed -# to exit in time or we hit the interrupt case above) -for job in $(jobs -p); do - # Warn about unexpected things - if [[ $ret != 127 && $job = "$gamescope_pid" ]]; then - echo >&2 "gamescope-session: gamescope timed out while exiting, killing" - elif [[ $ret != 127 && $job != "$sleep_pid" ]]; then - echo >&2 "gamescope-session: unexpected background pid $job at teardown: " - # spew some debug about it - ps -p "$job" >&2 - fi - kill -9 "$job" -done - diff --git a/gamescope-session/usr/share/polkit-1/actions/org.chimeraos.update.policy b/gamescope-session/usr/share/polkit-1/actions/org.chimeraos.update.policy deleted file mode 100644 index 7602faa..0000000 --- a/gamescope-session/usr/share/polkit-1/actions/org.chimeraos.update.policy +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ChimeraOS Chimera - http://chimeraos.org - - - Main update script from Steam client - package-x-generic - - yes - yes - yes - - /usr/bin/steamos-polkit-helpers/steamos-update - - - - Dummy script for jupiter-biosupdate on Steam client - package-x-generic - - yes - yes - yes - - /usr/bin/steamos-polkit-helpers/jupiter-biosupdate - - - diff --git a/main.sh b/main.sh index 10c90ef..0f83f35 100755 --- a/main.sh +++ b/main.sh @@ -7,7 +7,11 @@ add-apt-repository ppa:pikaos/pika add-apt-repository ppa:kubuntu-ppa/backports # Clone Upstream +git clone https://github.com/KyleGospo/gamescope-session +cp -rvf ./debian ./gamescope-session cd ./gamescope-session +patch -Np1 -i ./fedora.patch +patch -Np1 -i ../patches/0001-update-to-work-on-nobara-with-hdr.patch # Get build deps ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime diff --git a/patches/0001-update-to-work-on-nobara-with-hdr.patch b/patches/0001-update-to-work-on-nobara-with-hdr.patch new file mode 100644 index 0000000..352ac02 --- /dev/null +++ b/patches/0001-update-to-work-on-nobara-with-hdr.patch @@ -0,0 +1,34 @@ +From 9611d3d68b659a1328836f77fc209eb6db534320 Mon Sep 17 00:00:00 2001 +From: GloriousEggroll +Date: Wed, 11 Jan 2023 10:08:19 -0700 +Subject: [PATCH] update to work on nobara with hdr + +--- + usr/share/gamescope-session/gamescope-session-script | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/usr/share/gamescope-session/gamescope-session-script b/usr/share/gamescope-session/gamescope-session-script +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 DXVK_HDR=1 + + # Fix intel color corruption + # might come with some performance degradation but is better than a corrupted +@@ -169,6 +172,8 @@ if [ -z "$GAMESCOPECMD" ] ; then + fi + GAMESCOPECMD="/usr/bin/gamescope \ + $CURSOR \ ++ --hdr-enabled \ ++ --hdr-itm-enable \ + -e \ + $RESOLUTION \ + --xwayland-count 2 \ +-- +2.39.2 + diff --git a/release.sh b/release.sh index ce9e316..98eac6c 100755 --- a/release.sh +++ b/release.sh @@ -5,7 +5,7 @@ dpkg-sig --sign builder ./output/*.deb rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo # Add the new package to the repo -reprepro -V --basedir ./output/repo/ includedeb kinetic ./output/*.deb +reprepro -V --basedir ./output/repo/ includedeb lunar ./output/*.deb # Push the updated ppa repo to the server rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/