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,59 @@
|
||||
#!/bin/bash
|
||||
echo "Starting sunshine service..."
|
||||
|
||||
if [ -f "$HOME/.config/gamescope/gamescope.conf" ]; then
|
||||
source "$HOME/.config/gamescope/gamescope.conf"
|
||||
fi
|
||||
OUTPUT_CONNECTOR=${OUTPUT_CONNECTOR:-HDMI-A-1}
|
||||
FRAMERATE=${FRAMERATE:-120}
|
||||
RESOLUTION=${RESOLUTION:-1920x1080}
|
||||
HDR_ENABLED=${HDR_ENABLED:-${HDR:-1}}
|
||||
|
||||
echo "Building gamescope command..."
|
||||
|
||||
# Choose backend based on environment
|
||||
BACKEND_ARGS=""
|
||||
DRM_ARGS=""
|
||||
IN_WAYLAND=0
|
||||
if [ -n "${WAYLAND_DISPLAY:-}" ] || [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
|
||||
IN_WAYLAND=1
|
||||
BACKEND_ARGS="--backend wayland"
|
||||
fi
|
||||
|
||||
# HDR only relevant for DRM path generally
|
||||
HDR_FLAG=""
|
||||
if [[ "$HDR_ENABLED" == "1" || "$HDR_ENABLED" == "true" || "$HDR_ENABLED" == "yes" ]]; then
|
||||
HDR_FLAG="--hdr-enabled"
|
||||
echo " HDR flag added: --hdr-enabled"
|
||||
else
|
||||
echo " HDR disabled, no HDR flag added"
|
||||
fi
|
||||
|
||||
WIDTH="${RESOLUTION%x*}"
|
||||
HEIGHT="${RESOLUTION#*x}"
|
||||
|
||||
if [ "$IN_WAYLAND" -eq 0 ]; then
|
||||
DRM_ARGS="-O \"$OUTPUT_CONNECTOR\" -r \"$FRAMERATE\" $HDR_FLAG"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Final Configuration Summary:"
|
||||
echo " Backend: $([ "$IN_WAYLAND" -eq 1 ] && echo Wayland || echo DRM/KMS)"
|
||||
echo " Output Connector: ${OUTPUT_CONNECTOR}"
|
||||
echo " Framerate: ${FRAMERATE}Hz"
|
||||
echo " Resolution: ${RESOLUTION}"
|
||||
echo " HDR: $([ -n "$HDR_FLAG" ] && echo "enabled" || echo "disabled")"
|
||||
echo " MangoHUD: enabled"
|
||||
echo " Steam Mode: SteamOS3"
|
||||
|
||||
echo ""
|
||||
echo "Launching gamescope session..."
|
||||
echo "Full command:"
|
||||
echo " gamescope $BACKEND_ARGS $DRM_ARGS --mangoapp -w $WIDTH -h $HEIGHT -e -- /usr/bin/steamos"
|
||||
echo ""
|
||||
echo "========================================="
|
||||
|
||||
LOGDIR="${HOME}/.local/logs"
|
||||
mkdir -p "$LOGDIR"
|
||||
echo "[$(date --iso-8601=seconds)] Launching (backend: $([ "$IN_WAYLAND" -eq 1 ] && echo wayland || echo drm)): gamescope $BACKEND_ARGS $DRM_ARGS --mangoapp -w $WIDTH -h $HEIGHT -e -- /usr/bin/steamos" >>"$LOGDIR/gamescope-launch.log"
|
||||
exec bash -lc "gamescope $BACKEND_ARGS $DRM_ARGS --mangoapp -w $WIDTH -h $HEIGHT -e -- /usr/bin/steamos"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
LOGDIR="${HOME}/.local/logs"
|
||||
mkdir -p "$LOGDIR"
|
||||
echo "Starting steamos session..."
|
||||
systemctl --user start sunshine.service
|
||||
LOGFILE="${LOGDIR}/steam.log"
|
||||
steam -steamos3 -pipewire-dmabuf -gamepadui >>"$LOGFILE" 2>&1
|
||||
Reference in New Issue
Block a user