diff --git a/airootfs/etc/holoinstall/post_install/amd-perf-fix b/airootfs/etc/holoinstall/post_install/amd-perf-fix new file mode 100755 index 0000000..8e0ca27 --- /dev/null +++ b/airootfs/etc/holoinstall/post_install/amd-perf-fix @@ -0,0 +1,22 @@ +#!/bin/bash + +if (( UID != 0 )); then + echo "$0: needs to run as root!" 1>&2 + exit 1 +fi + +for device in /sys/class/drm/card?/device; do + if [[ -e "$device"/pp_power_profile_mode ]]; then + + echo manual > "$device"/power_dpm_force_performance_level + echo 1 > "$device"/pp_power_profile_mode + + # The other power profile modes are: + # 0 = BOOTUP_DEFAULT + # 1 = 3D_FULL_SCREEN + # 2 = POWER_SAVING + # 3 = VIDEO + # 4 = VR + # 5 = COMPUTE + fi +done diff --git a/airootfs/etc/holoinstall/post_install/amd-perf-fix.service b/airootfs/etc/holoinstall/post_install/amd-perf-fix.service new file mode 120000 index 0000000..735f22e --- /dev/null +++ b/airootfs/etc/holoinstall/post_install/amd-perf-fix.service @@ -0,0 +1 @@ +/etc/systemd/system/amd-perf-fix.service \ No newline at end of file diff --git a/airootfs/etc/holoinstall/post_install/install_holoiso.sh b/airootfs/etc/holoinstall/post_install/install_holoiso.sh index fb4d6b6..35b8aa3 100644 --- a/airootfs/etc/holoinstall/post_install/install_holoiso.sh +++ b/airootfs/etc/holoinstall/post_install/install_holoiso.sh @@ -51,9 +51,10 @@ xargs -0 zenity --list --width=600 --height=512 --title="Select disk" --text="Se exit 1 fi echo "\nChoose your partitioning type:" - install=$(zenity --list --title="Choose your installation type:" --column="Type" --column="Name" 1 "Erase entire drive" \2 "Install alongside existing OS/Partition (Requires at least 50 GB of free space from the end)" --width=700 --height=220) + install=$(zenity --list --title="Choose your installation type:" --column="Type" --column="Name" 1 "Erase entire drive" \2 "Install alongside existing OS/Partition (Requires at least 50 GB of FREE and UNFORMATTED space from the end)" --width=700 --height=220) if [[ -n "$(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1)" ]]; then HOME_REUSE_TYPE=$(zenity --list --title="Warning" --text="HoloISO home partition was detected at $(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1). Please select an appropriate action below:" --column="Type" --column="Name" 1 "Format it and start over" \2 "Reuse partition" --width=500 --height=220) + if [[ "$HOME_REUSE_TYPE" == "2"]]; then mkdir -p /tmp/home mount $(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1) /tmp/home mkdir -p /tmp/rootpart @@ -92,6 +93,7 @@ xargs -0 zenity --list --width=600 --height=512 --title="Select disk" --text="Se umount -l $(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1) umount -l $(sudo blkid | grep holo-root | cut -d ':' -f 1 | head -n 1) fi + fi fi # Setup password for root while true; do @@ -110,7 +112,7 @@ xargs -0 zenity --list --width=600 --height=512 --title="Select disk" --text="Se done # Create user NAME_REGEX="^[a-z][-a-z0-9_]*\$" - if [ -z $MIGRATEDINSTALL ]; then + if [[ "$MIGRATEDINSTALL" -ne "1" ]]; then while true; do HOLOUSER=$(zenity --entry --title="Account creation" --text "Enter username for this installation:") if [ $HOLOUSER = "root" ]; then @@ -311,11 +313,11 @@ base_os_install() { echo -e "${ROOTPASS}\n${ROOTPASS}" | arch-chroot ${HOLO_INSTALL_DIR} passwd root arch-chroot ${HOLO_INSTALL_DIR} useradd --create-home ${HOLOUSER} echo -e "${HOLOPASS}\n${HOLOPASS}" | arch-chroot ${HOLO_INSTALL_DIR} passwd ${HOLOUSER} - echo "${HOLOUSER} ALL=(ALL:ALL) ALL" > ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER} + echo "${HOLOUSER} ALL=(ALL) ALL" > ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER} chmod 0440 ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER} echo "127.0.1.1 ${HOLOHOSTNAME}" >> ${HOLO_INSTALL_DIR}/etc/hosts sleep 1 - clear + clear echo "\nInstalling bootloader..." mkdir -p ${HOLO_INSTALL_DIR}/boot/efi @@ -327,17 +329,25 @@ base_os_install() { clear } full_install() { + if [[ "${GAMEPAD_DRV}" == "1" ]]; then + echo "You're running this on Anbernic Win600. A suitable gamepad driver will be installed." + arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs_addon | grep win600-xpad-dkms) + fi if [[ "${FIRMWARE_INSTALL}" == "1" ]]; then echo "You're running this on a Steam Deck. linux-firmware-neptune will be installed to ensure maximum kernel-side compatibility." arch-chroot ${HOLO_INSTALL_DIR} pacman -Rdd --noconfirm linux-firmware arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs_addon | grep linux-firmware-neptune) arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P fi - if [[ -n "$(lspci -nn | grep -i vga | grep -Po "10de:[a-z0-9]{4}")" ]]; then - echo "NVIDIA GPU detected. Installing NVIDIA Drivers." - arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs/nv | grep pkg.tar.zst) - arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P - fi + + mv /etc/holoinstall/post_install/amd-perf-fix "${HOLO_INSTALL_DIR}"/usr/bin/amd-perf-fix + chmod +x "${HOLO_INSTALL_DIR}"/usr/bin/amd-perf-fix + + # if [[ -n "$(lspci -nn | grep -i vga | grep -Po "10de:[a-z0-9]{4}")" ]]; then + # echo "NVIDIA GPU detected. Installing NVIDIA Drivers." + # arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs/nv | grep pkg.tar.zst) + # arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P + # fi echo "\nConfiguring Steam Deck UI by default..." ln -s /usr/share/applications/steam.desktop ${HOLO_INSTALL_DIR}/etc/skel/Desktop/steam.desktop echo -e "[General]\nDisplayServer=wayland\n\n[Autologin]\nUser=${HOLOUSER}\nSession=gamescope-wayland.desktop\nRelogin=true\n\n[X11]\n# Janky workaround for wayland sessions not stopping in sddm, kills\n# all active sddm-helper sessions on teardown\nDisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround" >> ${HOLO_INSTALL_DIR}/etc/sddm.conf.d/autologin.conf @@ -351,8 +361,19 @@ full_install() { echo "Cleaning up..." cp /etc/skel/.bashrc ${HOLO_INSTALL_DIR}/home/${HOLOUSER} arch-chroot ${HOLO_INSTALL_DIR} rm -rf /etc/holoinstall + arch-chroot ${HOLO_INSTALL_DIR} systemctl enable amd-perf-fix + sudo rm -rf ${HOLO_INSTALL_DIR}/etc/sudoers.d/g_wheel + sudo rm -rf ${HOLO_INSTALL_DIR}/etc/sudoers.d/liveuser sleep 1 clear + if zenity --question --text="Would you like to have a 2GB Swap?" + then + arch-chroot ${HOLO_INSTALL_DIR} dd if=/dev/zero of=/home/.steamos/swapfile bs=1M count=2k status=progress + arch-chroot ${HOLO_INSTALL_DIR} chmod 0600 /home/.steamos/swapfile + arch-chroot ${HOLO_INSTALL_DIR} mkswap -U clear /home/.steamos/swapfile + arch-chroot ${HOLO_INSTALL_DIR} swapon /home/.steamos/swapfile + arch-chroot ${HOLO_INSTALL_DIR} echo -e "/home/.steamos/swapfile none swap defaults 0 0" >> /etc/fstab + fi } diff --git a/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh b/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh index 429be77..6debd31 100644 --- a/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh +++ b/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh @@ -45,29 +45,30 @@ plymouth-set-default-theme -R steamos mkinitcpio -P # Enable stuff -systemctl enable sddm NetworkManager systemd-timesyncd cups bluetooth sshd +systemctl enable sddm NetworkManager systemd-timesyncd bluetooth sshd # Download extra stuff -mkdir -p /etc/holoinstall/post_install/pkgs/nv +# mkdir -p /etc/holoinstall/post_install/pkgs/nv mkdir -p /etc/holoinstall/post_install/kernels wget $(pacman -Sp linux-firmware-neptune) -P /etc/holoinstall/post_install/pkgs_addon +wget $(pacman -Sp win600-xpad-dkms) -P /etc/holoinstall/post_install/pkgs_addon for kernel in $(cat /etc/holoinstall/post_install/kernel_list.bootstrap) do cp $(pacman -Sp $kernel | cut -c8-) /etc/holoinstall/post_install/kernels done -wget $(pacman -Sp extra-main/nvidia-dkms) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp extra-main/nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp multilib-main/lib32-nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp egl-wayland) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp egl-external-platform) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp extra-main/opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp multilib-main/lib32-opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp extra-main/nvtop) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp extra-main/nvidia-settings) -P /etc/holoinstall/post_install/pkgs/nv -wget $(pacman -Sp extra-main/nvidia-prime) -P /etc/holoinstall/post_install/pkgs/nv -rm -rf /etc/holoinstall/post_install/pkgs/nv/*.zst.* && rm -rf /etc/holoinstall/post_install/pkgs/nv/*515* +# wget $(pacman -Sp extra-main/nvidia-dkms) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp extra-main/nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp multilib-main/lib32-nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp egl-wayland) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp egl-external-platform) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp extra-main/opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp multilib-main/lib32-opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp extra-main/nvtop) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp extra-main/nvidia-settings) -P /etc/holoinstall/post_install/pkgs/nv +# wget $(pacman -Sp extra-main/nvidia-prime) -P /etc/holoinstall/post_install/pkgs/nv +# rm -rf /etc/holoinstall/post_install/pkgs/nv/*.zst.* && rm -rf /etc/holoinstall/post_install/pkgs/nv/*515* # Workaround mkinitcpio bullshit so that i don't KMS after rebuilding ISO each time and having users reinstalling their fucking OS bullshit every goddamn time. rm /etc/mkinitcpio.conf @@ -80,4 +81,6 @@ rm -rf /etc/holoinstall/pre_install rm /etc/pacman.conf mv /etc/pacold /etc/pacman.conf rm -rf /etc/xdg/powermanagementprofilesrc +rm -rf /home/liveuser/Desktop/steamos-gamemode.desktop +rm -rf /home/liveuser/Desktop/Return.desktop systemctl disable qemu-guest-agent diff --git a/airootfs/etc/systemd/system/amd-perf-fix.service b/airootfs/etc/systemd/system/amd-perf-fix.service new file mode 100644 index 0000000..2bcf482 --- /dev/null +++ b/airootfs/etc/systemd/system/amd-perf-fix.service @@ -0,0 +1,8 @@ +[Unit] +Description=Set proper AMD GPU power profile + +[Service] +ExecStart=/usr/bin/amd-perf-fix + +[Install] +WantedBy=multi-user.target diff --git a/airootfs/etc/systemd/system/choose-mirror.service b/airootfs/etc/systemd/system/choose-mirror.service deleted file mode 100644 index b3e4847..0000000 --- a/airootfs/etc/systemd/system/choose-mirror.service +++ /dev/null @@ -1,13 +0,0 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[Unit] -Description=Choose mirror from the kernel command line -ConditionKernelCommandLine=mirror - -[Service] -Type=oneshot -ExecStart=/usr/local/bin/choose-mirror - -[Install] -WantedBy=multi-user.target diff --git a/airootfs/etc/systemd/system/livecd-alsa-unmuter.service b/airootfs/etc/systemd/system/livecd-alsa-unmuter.service deleted file mode 100644 index 8c5317d..0000000 --- a/airootfs/etc/systemd/system/livecd-alsa-unmuter.service +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[Unit] -Description=Unmute All Sound Card Controls For Use With The Live Arch Environment -# This needs to run after the audio device becomes available. -Wants=systemd-udev-settle.service -After=systemd-udev-settle.service sound.target -ConditionKernelCommandLine=accessibility=on - -[Service] -Type=oneshot -ExecStart=/usr/local/bin/livecd-sound -u - -[Install] -WantedBy=sound.target diff --git a/airootfs/etc/systemd/system/livecd-talk.service b/airootfs/etc/systemd/system/livecd-talk.service deleted file mode 100644 index d959ab3..0000000 --- a/airootfs/etc/systemd/system/livecd-talk.service +++ /dev/null @@ -1,23 +0,0 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[Unit] -Description=Screen reader service -After=livecd-alsa-unmuter.service -Before=getty@tty1.service -ConditionKernelCommandLine=accessibility=on - -[Service] -Type=oneshot -TTYPath=/dev/tty13 -ExecStartPre=/usr/bin/chvt 13 -ExecStart=/usr/local/bin/livecd-sound -p -ExecStartPost=/usr/bin/chvt 1 -ExecStartPost=systemctl start espeakup.service -StandardInput=tty -TTYVHangup=yes -TTYVTDisallocate=yes -RemainAfterExit=true - -[Install] -WantedBy=multi-user.target diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/livecd-talk.service b/airootfs/etc/systemd/system/multi-user.target.wants/livecd-talk.service deleted file mode 120000 index b917481..0000000 --- a/airootfs/etc/systemd/system/multi-user.target.wants/livecd-talk.service +++ /dev/null @@ -1 +0,0 @@ -/etc/systemd/system/livecd-talk.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service b/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service deleted file mode 120000 index d09eec6..0000000 --- a/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service +++ /dev/null @@ -1 +0,0 @@ -../pacman-init.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service b/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service deleted file mode 120000 index 8e3ff80..0000000 --- a/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/qemu-guest-agent.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/vboxservice.service b/airootfs/etc/systemd/system/multi-user.target.wants/vboxservice.service deleted file mode 120000 index cb2d560..0000000 --- a/airootfs/etc/systemd/system/multi-user.target.wants/vboxservice.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/vboxservice.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/pacman-init.service b/airootfs/etc/systemd/system/pacman-init.service deleted file mode 100644 index b442641..0000000 --- a/airootfs/etc/systemd/system/pacman-init.service +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[Unit] -Description=Initializes Pacman keyring -Requires=etc-pacman.d-gnupg.mount -After=etc-pacman.d-gnupg.mount - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/pacman-key --init -ExecStart=/usr/bin/pacman-key --populate archlinux - -[Install] -WantedBy=multi-user.target diff --git a/airootfs/etc/systemd/system/reflector.service.d/archiso.conf b/airootfs/etc/systemd/system/reflector.service.d/archiso.conf deleted file mode 100644 index de6664d..0000000 --- a/airootfs/etc/systemd/system/reflector.service.d/archiso.conf +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -ConditionKernelCommandLine=!mirror - -[Service] -Restart=on-failure -RestartSec=10 diff --git a/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service b/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service deleted file mode 120000 index 98c0fc8..0000000 --- a/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service +++ /dev/null @@ -1 +0,0 @@ -../livecd-alsa-unmuter.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf b/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf deleted file mode 100644 index 1b4c091..0000000 --- a/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf +++ /dev/null @@ -1,6 +0,0 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[Service] -ExecStart= -ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any diff --git a/packages.x86_64 b/packages.x86_64 index 64aa028..3b45317 100644 --- a/packages.x86_64 +++ b/packages.x86_64 @@ -117,6 +117,7 @@ xl2tpd zsh # GUI +holo-keyring plasma plasma-nm plasma-meta