Skip to content

Commit

Permalink
Push handheld-arguments to allow arguments to be changed post-install
Browse files Browse the repository at this point in the history
  • Loading branch information
Pogogo007 committed Jul 14, 2024
1 parent 941b0ed commit e5f1ab2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions usr/lib/sdboot-manage.conf.d/handheld-arguments
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

#Send no arguments by default
APPENDED_LINUX_OPTIONS=""

#Check for legacy installs to not duplicate kernel arguments
LEGACY=false
if grep "fbcon=vc:2-6" /etc/sdboot-manage.conf; then
LEGACY=true
fi

SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"


#Steam Deck OLED and LCD
if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then
if ! "$LEGACY"; then
APPENDED_LINUX_OPTIONS="fbcon=vc:2-6 amd_iommu=off amdgpu.gttsize=8128 spi_amd.speed_dev=1 audit=0 iomem=relaxed amdgpu.ppfeaturemask=0xffffffff"
fi
#ROG Ally
elif [[ "$SYS_ID" =~ (ROG\ Ally).* ]]; then
if ! "$LEGACY"; then
APPENDED_LINUX_OPTIONS="fbcon=vc:2-6"
fi
#Lenovo legion Go
elif [[ "$SYS_ID" =~ (83E1) ]]; then
if ! "$LEGACY"; then
APPENDED_LINUX_OPTIONS="fbcon=vc:2-6 amdgpu.sg_display=0"
else
APPENDED_LINUX_OPTIONS="amdgpu.sg_display=0"
fi
fi

##############
# Unset so they dont get used by sd-boot-manager accidently
unset LEGACY
unset SYS_ID

0 comments on commit e5f1ab2

Please sign in to comment.