-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push handheld-arguments to allow arguments to be changed post-install
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |