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