feat: Enhance game station setup and configuration
- Updated README with detailed instructions for creating a dedicated Ansible user on Linux, including SSH key setup and passwordless sudo. - Added userConfigurations.json for Steam ROM Manager with configurations for various gaming consoles. - Introduced scripts for managing Gamescope and Steam sessions, including launch scripts for various emulators (Genesis, PSP, RPCS3, SNES). - Created systemd service for Gamescope session management. - Developed Ansible playbook for configuring Fedora for optimized Sunshine and Gamescope streaming, including user setup and system configurations. - Updated Prometheus configuration to reflect changes in exporter targets. - Commented out the Devolo exporter module in Terraform configuration for future reference.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
LOGFILE="$HOME/.local/logs/gamescope.log"
|
||||
|
||||
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
|
||||
|
||||
log "Starting Gamescope session..."
|
||||
CONF_FILE="$HOME/.config/gamescope/gamescope.conf"
|
||||
[ -f "$CONF_FILE" ] && source "$CONF_FILE"
|
||||
|
||||
OUTPUT_CONNECTOR=${OUTPUT_CONNECTOR:-HDMI-A-1}
|
||||
FRAMERATE=${FRAMERATE:-60}
|
||||
RESOLUTION=${RESOLUTION:-1920x1080}
|
||||
WIDTH="${RESOLUTION%x*}"
|
||||
HEIGHT="${RESOLUTION#*x}"
|
||||
|
||||
export __GL_GSYNC_ALLOWED=1
|
||||
export __GL_VRR_ALLOWED=1
|
||||
# export __GL_THREADED_OPTIMIZATIONS=1
|
||||
export __GL_SHADER_DISK_CACHE=1
|
||||
export __GL_SYNC_TO_VBLANK=0
|
||||
|
||||
GAMESCOPE_BIN="$(command -v gamescope || true)"
|
||||
if [ -z "$GAMESCOPE_BIN" ]; then
|
||||
log "ERROR: gamescope not found in PATH"
|
||||
exit 127
|
||||
fi
|
||||
|
||||
HDR_FLAG=""
|
||||
if [[ "$HDR_ENABLED" == "1" || "$HDR_ENABLED" == "true" || "$HDR_ENABLED" == "yes" ]]; then
|
||||
HDR_FLAG="--hdr-enabled"
|
||||
log "HDR flag added: --hdr-enabled"
|
||||
else
|
||||
log "HDR disabled, no HDR flag added"
|
||||
fi
|
||||
|
||||
GAMESCOPE_ARGS="--generate-drm-mode fixed --fade-out-duration 200 --cursor-scale-height 720 -f -w $WIDTH -h $HEIGHT --rt --mangoapp -e -O \"$OUTPUT_CONNECTOR\" -r $FRAMERATE $HDR_FLAG"
|
||||
log "Launching Gamescope: $GAMESCOPE_BIN $GAMESCOPE_ARGS -- /usr/local/bin/launch_steam.sh"
|
||||
exec "$GAMESCOPE_BIN" ${GAMESCOPE_ARGS} -- /usr/local/bin/launch_steam.sh >>"$LOGFILE" 2>&1
|
||||
Reference in New Issue
Block a user