Update gamescope-session/usr/share/gamescope-session-plus/device-quirks
This commit is contained in:
parent
9bebb2c6b5
commit
dd4e29b5a5
@ -1,12 +1,7 @@
|
||||
# This file will be sourced by gamescope-session script if not
|
||||
# overridden in ~/.config/environment.d
|
||||
|
||||
if [ -x /usr/libexec/hwsupport/sysid ]; then
|
||||
# If present, use script to clean up hardware with insignificant product name changes, such as the ROG Ally.
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
else
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
fi
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
CPU_VENDOR="$(lscpu | grep "Vendor ID" | cut -d : -f 2 | xargs)"
|
||||
|
||||
# OXP 60Hz Devices
|
||||
@ -22,7 +17,7 @@ if [[ ":$OXP_LIST:" =~ ":$SYS_ID:" ]] || [[ ":$AOK_LIST:" =~ ":$SYS_ID:" ]];
|
||||
fi
|
||||
|
||||
# OXP 120Hz Devices
|
||||
OXP_120_LIST="ONEXPLAYER F1"
|
||||
OXP_120_LIST="ONEXPLAYER F1:ONEXPLAYER F1 EVA-01"
|
||||
if [[ ":$OXP_120_LIST:" =~ ":$SYS_ID:" ]]; then
|
||||
PANEL_TYPE=external
|
||||
ORIENTATION=left
|
||||
@ -31,6 +26,28 @@ if [[ ":$OXP_120_LIST:" =~ ":$SYS_ID:" ]]; then
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=40,120
|
||||
fi
|
||||
|
||||
# OXP X1 Devices
|
||||
OXP_X1_LIST="ONEXPLAYER X1 A"
|
||||
if [[ ":$OXP_X1_LIST:" =~ ":$SYS_ID:" ]]; then
|
||||
PANEL_TYPE=external
|
||||
ORIENTATION=left
|
||||
CUSTOM_REFRESH_RATES=60,120
|
||||
|
||||
# Set refresh rate range and enable refresh rate switching
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=60,120
|
||||
fi
|
||||
|
||||
# OXP X1 144Hz Devices
|
||||
OXP_X1_144_LIST="ONEXPLAYER X1 mini"
|
||||
if [[ ":$OXP_X1_144_LIST:" =~ ":$SYS_ID:" ]]; then
|
||||
PANEL_TYPE=external
|
||||
ORIENTATION=left
|
||||
CUSTOM_REFRESH_RATES=60,144
|
||||
|
||||
# Set refresh rate range and enable refresh rate switching
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=60,144
|
||||
fi
|
||||
|
||||
# AYANEO AIR, SLIDE, and FLIP Keyboard Devices
|
||||
AIR_LIST="AIR:AIR Pro:AIR Plus:SLIDE:FLIP KB:"
|
||||
if [[ ":$AIR_LIST:" =~ ":$SYS_ID:" ]]; then
|
||||
@ -62,7 +79,6 @@ if [[ ":$GDP_LIST:" =~ ":$SYS_ID:" ]]; then
|
||||
OUTPUT_CONNECTOR='*,DSI-1'
|
||||
DRM_MODE=fixed
|
||||
ORIENTATION=right
|
||||
TOUCH_GESTURES=1
|
||||
fi
|
||||
|
||||
# GPD Win 3 specifc quirk to prevent crashing
|
||||
@ -72,19 +88,22 @@ if [[ ":G1618-03:" =~ ":$SYS_ID:" ]]; then
|
||||
OUTPUT_CONNECTOR='*,DSI-1'
|
||||
DRM_MODE=fixed
|
||||
ORIENTATION=right
|
||||
TOUCH_GESTURES=1
|
||||
fi
|
||||
|
||||
#GPD Win 4 supports 40-60hz refresh rate changing
|
||||
if [[ ":G1618-04:" =~ ":$SYS_ID:" ]]; then
|
||||
TOUCH_GESTURES=1
|
||||
CUSTOM_REFRESH_RATES=40,60
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=40,60
|
||||
fi
|
||||
|
||||
# GPD Win Max 2 supports 40,60hz
|
||||
if [[ ":G1619-04:" =~ ":$SYS_ID:" ]]; then
|
||||
CUSTOM_REFRESH_RATES=40,60
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=40,60
|
||||
fi
|
||||
|
||||
# GPD Win mini
|
||||
if [[ ":G1617-01:" =~ ":$SYS_ID:" ]]; then
|
||||
TOUCH_GESTURES=1
|
||||
ORIENTATION=""
|
||||
if ( xrandr --prop 2>$1 | grep -e "1080x1920 " > /dev/null ) ; then
|
||||
ORIENTATION=right
|
||||
@ -94,7 +113,6 @@ fi
|
||||
# Steam Deck (Common)
|
||||
if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then
|
||||
DRM_MODE=fixed
|
||||
DONT_BYPASS_RESOLUTION=1
|
||||
|
||||
# Enables the adaptive brightness toggle
|
||||
export STEAM_ENABLE_DYNAMIC_BACKLIGHT=1
|
||||
@ -103,27 +121,27 @@ if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then
|
||||
# Sets CPU topology for Steam Deck hardware
|
||||
export WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7
|
||||
|
||||
# Prevent default power button behavior
|
||||
systemd-inhibit --what=handle-suspend-key:handle-power-key:handle-hibernate-key --who=gamescope-session --why="gamescope-session handles power button events" sleep infinity &
|
||||
inhibitor_pid="$!"
|
||||
function inhibit_systemd {
|
||||
# Prevent default power button behavior
|
||||
systemd-inhibit --what=handle-suspend-key:handle-power-key:handle-hibernate-key --who=gamescope-session --why="gamescope-session handles power button events" sleep infinity &
|
||||
}
|
||||
|
||||
# Start SteamOS's power button handler daemon, this passes power button events to Steam.
|
||||
if command -v /usr/bin/powerbuttond > /dev/null; then
|
||||
inhibit_systemd
|
||||
(while true; do
|
||||
/usr/bin/powerbuttond
|
||||
done) &
|
||||
elif [ -f /usr/lib/hwsupport/power-button-handler.py ]; then
|
||||
inhibit_systemd
|
||||
(while true; do
|
||||
python3 /usr/lib/hwsupport/power-button-handler.py
|
||||
/usr/bin/python3 /usr/lib/hwsupport/power-button-handler.py
|
||||
done) &
|
||||
fi
|
||||
else
|
||||
# On hardware that isn't a Steam Deck, fix Steam touch interaction.
|
||||
DISABLE_TOUCH_CLICK=1
|
||||
fi
|
||||
|
||||
# Steam Deck (LCD)
|
||||
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
|
||||
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=40,60
|
||||
|
||||
if [ -f "/usr/share/plymouth/themes/steamos/steamos-jupiter.png" ]; then
|
||||
@ -132,12 +150,7 @@ if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
|
||||
fi
|
||||
|
||||
# Steam Deck (OLED)
|
||||
if [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then
|
||||
MURA_PATH=$(galileo-mura-setup)
|
||||
if [ $? -eq 0 ]; then
|
||||
MURA="$MURA_PATH"
|
||||
fi
|
||||
|
||||
if [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=45,90
|
||||
|
||||
export STEAM_GAMESCOPE_FORCE_HDR_DEFAULT=1
|
||||
@ -149,8 +162,9 @@ if [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# ROG Ally
|
||||
if [[ ":ROG Ally RC71L:" =~ ":$SYS_ID:" ]]; then
|
||||
# ROG Ally & ROG Ally X
|
||||
ALLY_LIST="ROG Ally RC71L_RC71L:ROG Ally RC71L:ROG Ally X RC72LA"
|
||||
if [[ ":$ALLY_LIST:" =~ ":$SYS_ID:" ]]; then
|
||||
PANEL_TYPE=external
|
||||
ADAPTIVE_SYNC=1
|
||||
|
||||
@ -161,28 +175,17 @@ fi
|
||||
# Lenovo Legion Go
|
||||
if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then
|
||||
ORIENTATION=left
|
||||
ADAPTIVE_SYNC=1
|
||||
CUSTOM_REFRESH_RATES=60,144
|
||||
|
||||
# Set refresh rate range and enable refresh rate switching
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=60,144
|
||||
fi
|
||||
|
||||
# Aya Neo 2 & 2S
|
||||
if [[ ":AYANEO 2:AYANEO 2S:" =~ ":$SYS_ID:" ]]; then
|
||||
# enable lower resolution for better out of the box performance
|
||||
SCREEN_WIDTH=1920
|
||||
SCREEN_HEIGHT=1200
|
||||
INTERNAL_WIDTH=1280
|
||||
INTERNAL_HEIGHT=800
|
||||
fi
|
||||
|
||||
# Minisforum V3 Tablet
|
||||
# Minisforum V3
|
||||
if [[ ":V3:" =~ ":$SYS_ID:" ]]; then
|
||||
TOUCH_GESTURES=1
|
||||
fi
|
||||
PANEL_TYPE=external
|
||||
ADAPTIVE_SYNC=1
|
||||
|
||||
# GPUs that require the SDL backend
|
||||
if [ -x /usr/libexec/gamescope-sdl-workaround ] && /usr/libexec/gamescope-sdl-workaround; then
|
||||
BACKEND=sdl
|
||||
fi
|
||||
# Set refresh rate range and enable refresh rate switching
|
||||
export STEAM_DISPLAY_REFRESH_LIMITS=36,165
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user