Skip to content

Commit

Permalink
Add CHWD profiles for some handhelds (Deck, Ally, Legion) (#100)
Browse files Browse the repository at this point in the history
* Create Handheld profiles

* Fix missing package for ally profile

* Fix service name

* Fixup packages for ally
  • Loading branch information
Pogogo007 authored May 22, 2024
1 parent d7d6a05 commit c7be242
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions profiles/pci/handhelds/profiles.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#Steam Deck APUS
#CLASSIDS=0300
#VENDORIDS=1002
#DEVICEIDS=1435 (oled), 163f (lcd)

#ASUS Rog Ally APU
#CLASSIDS=0300
#VENDORIDS=1002
#DEVICEIDS=15bf

#Lenovo Legion GO APU
#CLASSIDS=0300
#VENDORIDS=1002
#DEVICEIDS=15bf

[steam-deck]
desc = 'Valve Steam Deck'
nonfree = false
class_ids = "0300"
vendor_ids = "1002"
device_ids = "1435 163f"
priority = 6
packages = 'jupiter-hw-support jupiter-fan-control steamdeck-dsp steam cachyos-handheld mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-mesa-driver lib32-libva-mesa-driver mesa-vdpau lib32-mesa-vdpau opencl-rusticl-mesa lib32-opencl-rusticl-mesa rocm-opencl-runtime'
#fbcon=vc:2-6 is not added here because it is added for all devices using calamares.
post_install = """
echo "Steam Deck chwd installing..."
username=$(id -nu 1000)
services=("steam-powerbuttond")
kernelparams="amd_iommu=off amdgpu.gttsize=8128 spi_amd.speed_dev=1 audit=0 iomem=relaxed amdgpu.ppfeaturemask=0xffffffff"
echo "Enabling services..."
for service in ${services[@]}; do
systemctl enable --now "${service}.service"
done
echo "Adding required kernel parameters..."
sed -i "s/LINUX_OPTIONS=\"[^\"]*/& ${kernelparams}/" /etc/sdboot-manage.conf
"""
post_remove = """
echo "Steam deck chwd removing..."
username=$(id -nu 1000)
services=("steam-powerbuttond")
kernelparams="amd_iommu=off amdgpu.gttsize=8128 spi_amd.speed_dev=1 audit=0 iomem=relaxed amdgpu.ppfeaturemask=0xffffffff"
echo "Disabling services..."
for service in ${services[@]}; do
systemctl disable "${service}.service"
done
echo "Removing kernel parameters..."
sed -i "s/${kernelparams}//" /etc/sdboot-manage.conf
"""

[phoenix]
desc = 'ASUS ROG Ally and Lenovo Legion Go'
nonfree = false
class_ids = "0300"
vendor_ids = "1002"
device_ids = "15bf"
priority = 6
packages = 'hhd hhd-ui jupiter-hw-support steam cachyos-handheld mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-mesa-driver lib32-libva-mesa-driver mesa-vdpau lib32-mesa-vdpau opencl-rusticl-mesa lib32-opencl-rusticl-mesa rocm-opencl-runtime'
post_install = """
echo "Ally and Legion chwd installing..."
username=$(id -nu 1000)
services=("steam-powerbuttond" "hhd@${username}")
maskservices=("jupiter-biosupdate" "jupiter-controller-update")
echo "Enabling services..."
for service in ${services[@]}; do
systemctl enable --now "${service}.service"
done
echo "Masking potentially conflicting services"
for mask in ${maskservices[@]}; do
systemctl mask "${mask}.service"
done
"""
post_remove = """
echo "Ally and Legion chwd removing..."
username=$(id -nu 1000)
services=("steam-powerbuttond" "hhd@${username}")
maskservices=("jupiter-biosupdate" "jupiter-controller-update")
echo "Disabling services..."
for service in ${services[@]}; do
systemctl disable "${service}.service"
done
echo "Unmasking potentially conflicting services"
for mask in ${maskservices[@]}; do
systemctl unmask "${mask}.service"
done
"""

0 comments on commit c7be242

Please sign in to comment.