-
-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy path09-hwe-additions.sh
More file actions
executable file
·80 lines (60 loc) · 1.61 KB
/
Copy path09-hwe-additions.sh
File metadata and controls
executable file
·80 lines (60 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/bash
echo "::group:: ===$(basename "$0")==="
set -eoux pipefail
if [[ "${IMAGE_NAME}" =~ hwe ]]; then
echo "HWE image detected, installing HWE packages"
else
echo "Standard image detected, skipping HWE packages"
exit 0
fi
# Asus/Surface for HWE
curl --retry 3 -Lo /etc/yum.repos.d/_copr_lukenukem-asus-linux.repo \
https://copr.fedorainfracloud.org/coprs/lukenukem/asus-linux/repo/fedora-$(rpm -E %fedora)/lukenukem-asus-linux-fedora-$(rpm -E %fedora).repo
curl --retry 3 -Lo /etc/yum.repos.d/linux-surface.repo \
https://pkg.surfacelinux.com/fedora/linux-surface.repo
ASUS_PACKAGES=(
asusctl
asusctl-rog-gui
)
SURFACE_PACKAGES=(
iptsd
libcamera
libcamera-tools
libcamera-gstreamer
libcamera-ipa
pipewire-plugin-libcamera
)
dnf5 -y install --skip-unavailable \
"${ASUS_PACKAGES[@]}" \
"${SURFACE_PACKAGES[@]}"
dnf5 -y swap \
libwacom-data libwacom-surface-data
dnf5 -y swap \
libwacom libwacom-surface
tee /usr/lib/modules-load.d/ublue-surface.conf << EOF
# Only on AMD models
pinctrl_amd
# Surface Book 2
pinctrl_sunrisepoint
# For Surface Laptop 3/Surface Book 3
pinctrl_icelake
# For Surface Laptop 4/Surface Laptop Studio
pinctrl_tigerlake
# For Surface Pro 9/Surface Laptop 5
pinctrl_alderlake
# For Surface Pro 10/Surface Laptop 6
pinctrl_meteorlake
# Only on Intel models
intel_lpss
intel_lpss_pci
# Add modules necessary for Disk Encryption via keyboard
surface_aggregator
surface_aggregator_registry
surface_aggregator_hub
surface_hid_core
8250_dw
# Surface Laptop 3/Surface Book 3 and later
surface_hid
surface_kbd
EOF
echo "::endgroup::"