fix: Enable ppfeaturemask when installing LACT or on handhelds that require it automatically

This commit is contained in:
Kyle Gospodnetich 2024-09-30 15:43:55 -07:00
parent 7eae7039fe
commit bb3d630c72
2 changed files with 9 additions and 1 deletions

View File

@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
# SCRIPT VERSION
HWS_VER=49
HWS_VER=50
HWS_VER_FILE="/etc/bazzite/hws_version"
HWS_VER_RAN=$(cat $HWS_VER_FILE)
@ -40,6 +40,13 @@ fi
# KERNEL ARGUMENTS
echo "Current kargs: $KARGS"
if /usr/libexec/hwsupport/valve-hardware || /usr/libexec/hwsupport/hhd-supported-hardware; then
echo "Checking for ppfeaturemask karg on hardware that requires it"
if [[ ! $KARGS =~ "ppfeaturemask" ]]; then
NEEDED_KARGS+=("--append-if-missing="$(printf 'amdgpu.ppfeaturemask=0x%x\n' "$(($(cat /sys/module/amdgpu/parameters/ppfeaturemask) | 0x4000))"))
fi
fi
if /usr/libexec/hwsupport/valve-hardware; then
echo "Checking for needed karg changes (Jupiter/Galileo)"

View File

@ -12,6 +12,7 @@ if [[ $(rpm -qa | grep lact) ]]; then
# This will check if *any* rpm-ostree pin has the newest version, so we don't update needlessly if a user just needs to reboot or is trying an older pin.
echo "Found upstream version v$LACT_VERSION, updating..."
ublue-update --wait
rpm-ostree kargs --append-if-missing=$(printf 'amdgpu.ppfeaturemask=0x%x\n' "$(($(cat /sys/module/amdgpu/parameters/ppfeaturemask) | 0x4000))")
PACKAGE="lact"
if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then
echo 'Installing LACT...'