mirror of
https://gitlab.com/prism7/archery.git
synced 2026-04-28 17:37:36 +02:00
Change: 'Graphics Setup' stage: Major overhaul of the GFX detection stage >
Now there is support for installing drivers/enabling HW acceleration etc. for multiple vendors, an individual vendor only or none The graphics packages list(s) now derive dynamically from arrays instead of the previously hardcoded variables sets Also, visual enhancements have been added to the said stage Change: The 'xdg-users-dirs' package have been added where the Desktop setups were missing it Change: The 'nautilus' package have been added to the Budgie Desktop setup, as it comes with no file manager Edit: A few prompts have been edited for enhanced visuals and/or clarification
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# Amelia Installer
|
||||
# Source: https://gitlab.com/prism7/archery
|
||||
# Version: 8.10.1
|
||||
# Version: 8.11.0
|
||||
|
||||
set -euo pipefail
|
||||
###################################################################################################
|
||||
@@ -1520,7 +1520,7 @@ dtct_single_vga() {
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
YELLOW "
|
||||
|
||||
### Selecting ${nc}'n' ${yellow}defaults to using the open-source ${nc}'nouveau' ${yellow}driver"
|
||||
### Selecting ${nc}'(n)o' ${yellow}defaults to using the open-source ${nc}'nouveau' ${yellow}driver"
|
||||
fi
|
||||
BLUE "
|
||||
|
||||
@@ -1562,10 +1562,12 @@ dtct_multi_vga() {
|
||||
|
||||
if [[ "${intelcount}" -ge "1" ]]; then
|
||||
vendor1="Intel"
|
||||
echo
|
||||
BLUEBG " ------------------------------- "
|
||||
BLUEBG " [${intelcount}] Intel Graphics device(s) "
|
||||
BLUEBG " ------------------------------- "
|
||||
NC "
|
||||
|
||||
[${intelcount}] Intel Graphics device(s)
|
||||
|
||||
${intelcards}
|
||||
|
||||
____________________________________________________________________"
|
||||
@@ -1573,10 +1575,12 @@ ${intelcards}
|
||||
|
||||
if [[ "${amdcount}" -ge "1" ]]; then
|
||||
vendor2="AMD"
|
||||
echo
|
||||
REDBG " ------------------------------- "
|
||||
REDBG " [${amdcount}] AMD Graphics device(s) "
|
||||
REDBG " ------------------------------- "
|
||||
NC "
|
||||
|
||||
[${amdcount}] AMD Graphics device(s)
|
||||
|
||||
${amdcards}
|
||||
|
||||
____________________________________________________________________"
|
||||
@@ -1584,10 +1588,12 @@ ${amdcards}
|
||||
|
||||
if [[ "${nvidiacount}" -ge "1" ]]; then
|
||||
vendor3="Nvidia"
|
||||
echo
|
||||
GREENBG " ------------------------------- "
|
||||
GREENBG " [${nvidiacount}] Nvidia Graphics device(s) "
|
||||
GREENBG " ------------------------------- "
|
||||
NC "
|
||||
|
||||
[${nvidiacount}] Nvidia Graphics device(s)
|
||||
|
||||
${nvidiacards}
|
||||
|
||||
____________________________________________________________________"
|
||||
@@ -1604,7 +1610,9 @@ ${nvidiacards}
|
||||
|
||||
[2] AMD
|
||||
|
||||
[3] None "
|
||||
[3] Both
|
||||
|
||||
[4] None "
|
||||
BLUE "
|
||||
|
||||
|
||||
@@ -1618,6 +1626,8 @@ Enter a number: "
|
||||
2)
|
||||
vendor="AMD" ;;
|
||||
3)
|
||||
vendors="Intel & AMD" ;;
|
||||
4)
|
||||
vendor="none" ;;
|
||||
"")
|
||||
choice
|
||||
@@ -1634,7 +1644,9 @@ Enter a number: "
|
||||
${red}----------------------------------------------------${nc}
|
||||
[2] Nvidia ${red}### ${yellow}Only for NV110 ${nc}(Maxwell) ${yellow}Graphics or newer ${red}###${nc}
|
||||
${red}----------------------------------------------------${nc}
|
||||
[3] None "
|
||||
[3] Both
|
||||
|
||||
[4] None "
|
||||
BLUE "
|
||||
|
||||
|
||||
@@ -1648,6 +1660,8 @@ Enter a number: "
|
||||
2)
|
||||
vendor="Nvidia" ;;
|
||||
3)
|
||||
vendors="Intel & Nvidia" ;;
|
||||
4)
|
||||
vendor="none" ;;
|
||||
"")
|
||||
choice
|
||||
@@ -1664,7 +1678,9 @@ Enter a number: "
|
||||
${red}----------------------------------------------------${nc}
|
||||
[2] Nvidia ${red}### ${yellow}Only for NV110 ${nc}(Maxwell) ${yellow}Graphics or newer ${red}###${nc}
|
||||
${red}----------------------------------------------------${nc}
|
||||
[3] None "
|
||||
[3] Both
|
||||
|
||||
[4] None "
|
||||
BLUE "
|
||||
|
||||
|
||||
@@ -1678,6 +1694,8 @@ Enter a number: "
|
||||
2)
|
||||
vendor="Nvidia" ;;
|
||||
3)
|
||||
vendors="AMD & Nvidia" ;;
|
||||
4)
|
||||
vendor="none" ;;
|
||||
"")
|
||||
choice
|
||||
@@ -1695,12 +1713,23 @@ Enter a number: "
|
||||
sourcetype="Proprietary"
|
||||
vgaconf="y"
|
||||
vga_conf
|
||||
elif [[ "${vendors}" == "Intel & AMD" ]]; then
|
||||
sourcetype="Open-source"
|
||||
vgaconf="y"
|
||||
vga_conf
|
||||
elif [[ "${vendors}" == "Intel & Nvidia" ]]; then
|
||||
sourcetype="Open-source & Proprietary"
|
||||
vgaconf="y"
|
||||
vga_conf
|
||||
elif [[ "${vendors}" == "AMD & Nvidia" ]]; then
|
||||
sourcetype="Open-source & Proprietary"
|
||||
vgaconf="y"
|
||||
vga_conf
|
||||
elif [[ "${vendor}" == "none" ]]; then
|
||||
local prompt="Graphics Setup"
|
||||
vgaconf="n"
|
||||
skip
|
||||
ok
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
###################################################################################################
|
||||
@@ -1715,7 +1744,7 @@ vga_conf() {
|
||||
"
|
||||
fi
|
||||
|
||||
if [[ "${vendor}" == "AMD" ]]; then
|
||||
if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
|
||||
@@ -1754,7 +1783,9 @@ Enter a number ${bwhite}(empty to skip)${blue}: "
|
||||
invalid
|
||||
return 1 ;;
|
||||
esac
|
||||
elif [[ "${vendor}" == "Nvidia" ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
> Select Nvidia architecture: "
|
||||
@@ -1817,7 +1848,7 @@ Enter [y/n]: "
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
|
||||
> Enable (experimental) Low Latency Display Interrupts ? [Y/n] "
|
||||
> Enable Low Latency Display Interrupts (experimental) ? [Y/n] "
|
||||
BLUE "
|
||||
|
||||
|
||||
@@ -1842,21 +1873,32 @@ Enter [Y/n]: "
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
|
||||
### ${vendor} Graphics will be automatically configured
|
||||
### ${vendor}${vendors} Graphics will be automatically configured
|
||||
"
|
||||
local prompt="Graphics Setup"
|
||||
ok
|
||||
}
|
||||
###################################################################################################
|
||||
vgapkgs_set() {
|
||||
gfxpkgs_set() {
|
||||
|
||||
# Graphics packages
|
||||
gfxpkgs=()
|
||||
|
||||
# Configure Graphics = yes
|
||||
if [[ "${vgaconf}" == "y" ]]; then
|
||||
if [[ "${vendor}" == "Intel" ]]; then
|
||||
# Intel Graphics
|
||||
if [[ "${vendor}" == "Intel" || "${vendors}" =~ "Intel" ]]; then
|
||||
# /etc/sysctl.d/99-sysctld.conf
|
||||
perf_stream="dev.i915.perf_stream_paranoid = 0"
|
||||
vgapkgs="intel-compute-runtime intel-media-driver intel-media-sdk libva-intel-driver opencl-headers vpl-gpu-rt vkd3d vulkan-intel vulkan-mesa-layers"
|
||||
elif [[ "${vendor}" == "AMD" ]]; then
|
||||
vgapkgs="libva-mesa-driver mesa-utils mesa-vdpau opencl-headers rocm-opencl-runtime vkd3d vulkan-mesa-layers vulkan-radeon"
|
||||
elif [[ "${vendor}" == "Nvidia" ]]; then
|
||||
gfxpkgs+=(intel-compute-runtime intel-media-driver intel-media-sdk libva-intel-driver opencl-headers vpl-gpu-rt vkd3d vulkan-intel vulkan-mesa-layers)
|
||||
fi
|
||||
# AMD Graphics
|
||||
if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then
|
||||
gfxpkgs+=(libva-mesa-driver mesa-utils mesa-vdpau opencl-headers rocm-opencl-runtime vkd3d vulkan-mesa-layers vulkan-radeon)
|
||||
fi
|
||||
# Nvidia Graphics
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
# Swap partition|swapfile|zram-swap = yes
|
||||
if [[ "${swapmode}" =~ ^(1|2|3)$ ]]; then
|
||||
sleep 0.2
|
||||
RED "
|
||||
@@ -1875,33 +1917,37 @@ vgapkgs_set() {
|
||||
"
|
||||
read -r -s -n 1
|
||||
fi
|
||||
# Turing+ GPUs
|
||||
if [[ "${family}" == "1" ]]; then
|
||||
# Linux Kernel
|
||||
if [[ "${kernelnmbr}" == "1" ]]; then
|
||||
nvname="nvidia-open"
|
||||
vgapkgs="libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d"
|
||||
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
# Other Kernels
|
||||
else
|
||||
vgapkgs="libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d"
|
||||
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
fi
|
||||
# Maxwell+ GPUs
|
||||
elif [[ "${family}" == "2" ]]; then
|
||||
# Linux Kernel
|
||||
if [[ "${kernelnmbr}" == "1" ]]; then
|
||||
nvname="nvidia"
|
||||
vgapkgs="libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d"
|
||||
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
# Linux LTS Kernel
|
||||
elif [[ "${kernelnmbr}" == "2" ]]; then
|
||||
nvname="nvidia-lts"
|
||||
vgapkgs="libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-lts nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d"
|
||||
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-lts nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
# Other Kernels
|
||||
else
|
||||
vgapkgs="libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d"
|
||||
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Configure Graphics = no
|
||||
elif [[ "${vgaconf}" == "n" ]]; then
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
vgapkgs="libva-mesa-driver vulkan-nouveau"
|
||||
# Nvidia Graphics
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
gfxpkgs+=(libva-mesa-driver vulkan-nouveau)
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -2517,7 +2563,16 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Mult
|
||||
YELLOW "
|
||||
|
||||
|
||||
> Are you ${nc}Dual/Multi-Booting ${yellow}with other OS's ? [y/n]"
|
||||
> Are you ${nc}Dual/Multi-Booting ${yellow}with other OS's ? [y/n]
|
||||
|
||||
|
||||
|
||||
### If ${nc}'(y)es'${yellow} then:
|
||||
|
||||
|
||||
1. Your ${nc}EFI ${yellow}System Partition (ESP) will stay ${nc}intact${yellow}
|
||||
|
||||
2. Only ${nc}'Manual' ${yellow}Disk Partitioning will be available in ${nc}'Disk Manager'"
|
||||
BLUE "
|
||||
|
||||
|
||||
@@ -4946,8 +5001,9 @@ ${magenta}###${nc}-------------------------------${magenta}[ ${bwhite}Confirm In
|
||||
revise() {
|
||||
|
||||
revision="yes"
|
||||
reset=(xbootloader="" vgaconf="" vendor_slct="" vendor="" packages="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" preset="" autoroot="" autoxboot="" autohome="" autoswap="")
|
||||
reset=(xbootloader="" vgaconf="" vendor_slct="" vendor="" packages="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" preset="" autoroot="" autoxboot="" autohome="" autoswap="" vendors="" lowlat="" vendors="" nogsp="")
|
||||
export "${reset[@]}"
|
||||
gfxpkgs=()
|
||||
|
||||
if [[ "${hypervisor}" != "none" ]]; then
|
||||
vm
|
||||
@@ -5349,7 +5405,7 @@ pacstrap_system() {
|
||||
${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacstrap System${nc} ${magenta}]${nc}-------------------------------------${magenta}###
|
||||
"
|
||||
cnfg
|
||||
vgapkgs_set
|
||||
gfxpkgs_set
|
||||
|
||||
if [[ "${bootloader}" == "2" ]]; then
|
||||
if [[ "${fs}" == "1" ]]; then
|
||||
@@ -5375,8 +5431,8 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
if [[ -n "${zram}" ]]; then
|
||||
basepkgs+=("${zram}")
|
||||
fi
|
||||
if [[ -n "${vgapkgs}" ]]; then
|
||||
basepkgs+=("${vgapkgs}")
|
||||
if [[ -n "${gfxpkgs[*]}" ]]; then
|
||||
basepkgs+=("${gfxpkgs[*]}")
|
||||
fi
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
basepkgs+=("${kernel}-headers")
|
||||
@@ -5409,12 +5465,12 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
deskpkgs="${basepkgs[*]} dconf-editor evince file-roller gdm gnome-calculator gnome-clocks gnome-connections gnome-console gnome-control-center gnome-disk-utility gnome-keyring gnome-menus gnome-remote-desktop gnome-session gnome-shell-extensions gnome-system-monitor gnome-text-editor gnome-tweaks gnome-user-share gvfs gvfs-afc gvfs-mtp loupe malcontent nautilus networkmanager power-profiles-daemon simple-scan sushi system-config-printer xdg-desktop-portal-gnome xdg-user-dirs-gtk alsa-firmware alsa-utils ccache cups-pdf exfatprogs fdkaac git glib2-devel glibc-locales gnome-browser-connector gparted gst-libav gst-plugin-libcamera gst-plugin-msdk gst-plugin-opencv gst-plugin-pipewire gst-plugin-qmlgl gst-plugin-va gst-plugin-wpe gst-plugins-ugly gstreamer-vaapi htop icoutils ipp-usb libfido2 libva-utils lrzip mac man-db man-pages meld mesa-utils nano-syntax-highlighting nss-mdns ntfs-3g p7zip pacman-contrib pbzip2 pigz pipewire-alsa pipewire-jack pipewire-pulse powerline powerline-fonts qbittorrent realtime-privileges reflector rng-tools sof-firmware sox terminus-font ttf-ubuntu-font-family unrar unzip usb_modeswitch usbutils vdpauinfo vlc wget zip zsh zsh-autosuggestions zsh-completions zsh-syntax-highlighting ${nrg_plc}" ;;
|
||||
|
||||
5) # Xfce Desktop:
|
||||
deskpkgs="${basepkgs[*]} xfce4 lightdm-gtk-greeter network-manager-applet"
|
||||
deskpkgs="${basepkgs[*]} xfce4 xdg-user-dirs lightdm-gtk-greeter network-manager-applet"
|
||||
displaymanager="lightdm"
|
||||
network="NetworkManager" ;;
|
||||
|
||||
6) # Cinnamon Desktop:
|
||||
deskpkgs="${basepkgs[*]} cinnamon blueberry lightdm-slick-greeter system-config-printer gnome-keyring ${terminal}"
|
||||
deskpkgs="${basepkgs[*]} cinnamon blueberry lightdm-slick-greeter system-config-printer gnome-keyring xdg-user-dirs ${terminal}"
|
||||
displaymanager="lightdm"
|
||||
bluetooth="bluetooth"
|
||||
network="NetworkManager" ;;
|
||||
@@ -5425,7 +5481,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
network="NetworkManager" ;;
|
||||
|
||||
8) # Budgie Desktop:
|
||||
deskpkgs="${basepkgs[*]} budgie lightdm-gtk-greeter arc-gtk-theme papirus-icon-theme network-manager-applet ${terminal}"
|
||||
deskpkgs="${basepkgs[*]} budgie lightdm-gtk-greeter arc-gtk-theme papirus-icon-theme nautilus network-manager-applet xdg-user-dirs ${terminal}"
|
||||
displaymanager="lightdm"
|
||||
network="NetworkManager" ;;
|
||||
|
||||
@@ -5435,7 +5491,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
network="NetworkManager" ;;
|
||||
|
||||
10) # Mate Desktop:
|
||||
deskpkgs="${basepkgs[*]} mate mate-terminal mate-media blueman network-manager-applet mate-power-manager system-config-printer lightdm-gtk-greeter"
|
||||
deskpkgs="${basepkgs[*]} mate mate-terminal mate-media blueman network-manager-applet mate-power-manager system-config-printer lightdm-gtk-greeter xdg-user-dirs"
|
||||
displaymanager="lightdm"
|
||||
bluetooth="bluetooth"
|
||||
network="NetworkManager" ;;
|
||||
@@ -5461,8 +5517,8 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
if [[ -n "${zram}" ]]; then
|
||||
custarray+=("${zram}")
|
||||
fi
|
||||
if [[ -n "${vgapkgs}" ]]; then
|
||||
custarray+=("${vgapkgs}")
|
||||
if [[ -n "${gfxpkgs[*]}" ]]; then
|
||||
custarray+=("${gfxpkgs[*]}")
|
||||
fi
|
||||
if [[ "${greeternmbr}" =~ ^(1|2|3|)$ ]]; then
|
||||
custarray+=("${greeter}")
|
||||
@@ -5755,7 +5811,7 @@ ZRAMCONF
|
||||
###################################################################################################
|
||||
nvidia_hook() {
|
||||
|
||||
if [[ "${vgaconf}" == "y" && "${vendor}" == "Nvidia" ]]; then
|
||||
if [[ "${vgaconf}" == "y" && "${vendor}" == "Nvidia" ]] || [[ "${vgaconf}" == "y" && "${vendors}" =~ "Nvidia" ]]; then
|
||||
if [[ "${nvname}" == "nvidia-open" ]] || [[ "${nvname}" == "nvidia" ]] || [[ "${nvname}" == "nvidia-lts" ]]; then
|
||||
local stage_prompt="Nvidia Hook Creation"
|
||||
if arch-chroot /mnt <<-NVIDIAHOOK > /dev/null 2>&1 2> amelia_log.txt ; then
|
||||
@@ -5968,16 +6024,16 @@ SECSIGN
|
||||
###################################################################################################
|
||||
set_vars() {
|
||||
|
||||
#### Encrypted-Setup Variables
|
||||
#### Encryption = yes
|
||||
if [[ "${encrypt}" == "yes" ]]; then
|
||||
# Encrypted Root Device
|
||||
### Encrypted Root Device
|
||||
encr_root_dev="/dev/mapper/${ENCROOT}"
|
||||
# Encrypted Root Options
|
||||
### Encrypted Root Options
|
||||
encr_root_opts="rd.luks.name=$(blkid -s UUID -o value "${root_dev}")=${ENCROOT}"
|
||||
# Encryption / Kernel Parameters
|
||||
### Encryption_Kernel Parameters
|
||||
encr_root_bootopts="${encr_root_opts} root=${encr_root_dev}"
|
||||
|
||||
### Encrypted Swap Setup
|
||||
#---------------------------------------------------------------------------------------------------------
|
||||
### Swap Setup (Encryption)
|
||||
## Encrypted Swap Partition
|
||||
if [[ "${swapmode}" == "1" ]]; then
|
||||
# Encrypted Swap Partition Options
|
||||
@@ -6000,70 +6056,60 @@ set_vars() {
|
||||
# Zram Swap Kernel Parameters
|
||||
zram_bootopts="zswap.enabled=0"
|
||||
fi
|
||||
|
||||
#---------------------------------------------------------------------------------------------------------
|
||||
### Graphics Setup (Encryption)
|
||||
## Mkinitcpio Modules (Encryption)
|
||||
MODULES=("${fs_mod}")
|
||||
## Mkinitcpio Hooks (Encryption)
|
||||
HOOKS=()
|
||||
## Graphics Kernel Parameters
|
||||
vga_bootopts=()
|
||||
|
||||
# Nvidia Only
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
HOOKS+=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems fsck)
|
||||
# Other Vendors/Multi-Vendors
|
||||
else
|
||||
HOOKS+=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems fsck)
|
||||
fi
|
||||
|
||||
## Configuration = 'Yes'
|
||||
if [[ "${vgaconf}" == "y" ]]; then
|
||||
# Intel
|
||||
if [[ "${vendor}" == "Intel" ]]; then
|
||||
# Mkinitcpio Modules (Encryption)
|
||||
mkinitcpio_mods="MODULES=(${fs_mod})"
|
||||
# Mkinitcpio Hooks (Encryption)
|
||||
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems fsck)"
|
||||
# Nvidia
|
||||
elif [[ "${vendor}" == "Nvidia" ]]; then
|
||||
# Mkinitcpio Modules (Encryption) [Nvidia KMS]
|
||||
mkinitcpio_mods="MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm ${fs_mod})"
|
||||
# Configure KMS setting
|
||||
if [[ "${intelcount}" -ge "1" || "${amdcount}" -ge "1" ]]; then
|
||||
# Multi GPU Vendor Mkinitcpio Hooks (Encryption)
|
||||
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems fsck)"
|
||||
else
|
||||
# Nvidia GPU Vendor Mkinitcpio Hooks (Encryption)
|
||||
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems fsck)"
|
||||
fi
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts=(nvidia.NVreg_UsePageAttributeTable=1)
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
|
||||
vga_bootopts+=(nvidia.NVreg_UsePageAttributeTable=1)
|
||||
|
||||
# Disable GSP Firmware
|
||||
if [[ "${nogsp}" == "y" ]]; then
|
||||
vga_bootopts+=(nvidia.NVreg_EnableGpuFirmware=0)
|
||||
fi
|
||||
# Enable (Experimental) Low Latency Interrupts
|
||||
|
||||
# Enable Experimental Low Latency Interrupts
|
||||
if [[ "${lowlat}" == "y" ]]; then
|
||||
vga_bootopts+=(nvidia.NVreg_RegistryDwords=RMIntrLockingMode=1)
|
||||
fi
|
||||
# Amd
|
||||
elif [[ "${vendor}" == "AMD" ]]; then
|
||||
# Mkinitcpio Hooks (Encryption)
|
||||
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems fsck)"
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts=(amdgpu.dc=1)
|
||||
fi
|
||||
|
||||
# AMD
|
||||
if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then
|
||||
if [[ -n "${islands}" ]]; then
|
||||
MODULES+=(amdgpu)
|
||||
fi
|
||||
# 'Southern Islands' support
|
||||
if [[ "${islands}" == "1" ]]; then
|
||||
# Mkinitcpio Modules (Encryption)
|
||||
mkinitcpio_mods="MODULES=(amdgpu ${fs_mod})"
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts+=(radeon.si_support=0 amdgpu.si_support=1)
|
||||
vga_bootopts+=(amdgpu.dc=1 radeon.si_support=0 amdgpu.si_support=1)
|
||||
# 'Sea Islands' support
|
||||
elif [[ "${islands}" == "2" ]]; then
|
||||
# Mkinitcpio Modules (Encryption)
|
||||
mkinitcpio_mods="MODULES=(amdgpu ${fs_mod})"
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts+=(radeon.cik_support=0 amdgpu.cik_support=1)
|
||||
elif [[ -z "${islands}" ]]; then
|
||||
# Mkinitcpio Modules (Encryption)
|
||||
mkinitcpio_mods="MODULES=(${fs_mod})"
|
||||
vga_bootopts+=(amdgpu.dc=1 radeon.cik_support=0 amdgpu.cik_support=1)
|
||||
fi
|
||||
fi
|
||||
## Configuration = 'No'
|
||||
elif [[ "${vgaconf}" == "n" ]]; then
|
||||
# Mkinitcpio Modules (Encryption)
|
||||
mkinitcpio_mods="MODULES=(${fs_mod})"
|
||||
# Mkinitcpio Hooks (Encryption)
|
||||
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems fsck)"
|
||||
fi
|
||||
### Main Kernel Parameters (Encryption)
|
||||
#### Main Mkinitcpio Modules (Encryption)
|
||||
mkinitcpio_mods="MODULES=(${MODULES[*]})"
|
||||
#### Main Mkinitcpio Hooks (Encryption)
|
||||
mkinitcpio_hooks="HOOKS=(${HOOKS[*]})"
|
||||
#### Main Kernel Parameters (Encryption)
|
||||
boot_opts=("${encr_root_bootopts}")
|
||||
|
||||
if [[ -n "${encr_swap_bootopts}" ]]; then
|
||||
@@ -6085,78 +6131,68 @@ set_vars() {
|
||||
boot_opts+=("${zram_bootopts}")
|
||||
fi
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#### Unencrypted-Setup Variables
|
||||
#### No Encryption
|
||||
elif [[ "${encrypt}" == "no" ]]; then
|
||||
|
||||
### Swap Setup
|
||||
## Zram Swap
|
||||
if [[ "${swapmode}" == "3" ]]; then
|
||||
# Zram Swap Kernel Parameters
|
||||
zram_bootopts="zswap.enabled=0"
|
||||
fi
|
||||
#---------------------------------------------------------------------------------------------------------
|
||||
### Graphics Setup
|
||||
## Mkinitcpio Modules
|
||||
MODULES=()
|
||||
## Mkinitcpio Hooks
|
||||
HOOKS=()
|
||||
## Graphics Kernel Parameters
|
||||
vga_bootopts=()
|
||||
|
||||
# Nvidia Only
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
HOOKS+=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems fsck)
|
||||
# Other Vendors/Multi-Vendors
|
||||
else
|
||||
HOOKS+=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)
|
||||
fi
|
||||
## Configuration = 'Yes'
|
||||
if [[ "${vgaconf}" == "y" ]]; then
|
||||
# Intel
|
||||
if [[ "${vendor}" == "Intel" ]]; then
|
||||
# Mkinitcpio Modules
|
||||
mkinitcpio_mods="MODULES=()"
|
||||
# Mkinitcpio Hooks
|
||||
mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)"
|
||||
# Nvidia
|
||||
elif [[ "${vendor}" == "Nvidia" ]]; then
|
||||
# Mkinitcpio Modules [Nvidia KMS]
|
||||
mkinitcpio_mods="MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)"
|
||||
# Configure KMS setting
|
||||
if [[ "${intelcount}" -ge "1" || "${amdcount}" -ge "1" ]]; then
|
||||
# Multi GPU Vendor Mkinitcpio Hooks
|
||||
mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)"
|
||||
else
|
||||
# Nvidia GPU Vendor Mkinitcpio Hooks
|
||||
mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems fsck)"
|
||||
fi
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts=(nvidia.NVreg_UsePageAttributeTable=1)
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
|
||||
vga_bootopts+=(nvidia.NVreg_UsePageAttributeTable=1)
|
||||
|
||||
# Disable GSP Firmware
|
||||
if [[ "${nogsp}" == "y" ]]; then
|
||||
vga_bootopts+=(nvidia.NVreg_EnableGpuFirmware=0)
|
||||
fi
|
||||
# Enable (Experimental) Low Latency Interrupts
|
||||
|
||||
# Enable Experimental Low Latency Interrupts
|
||||
if [[ "${lowlat}" == "y" ]]; then
|
||||
vga_bootopts+=(nvidia.NVreg_RegistryDwords=RMIntrLockingMode=1)
|
||||
fi
|
||||
# Amd
|
||||
elif [[ "${vendor}" == "AMD" ]]; then
|
||||
# Mkinitcpio Hooks
|
||||
mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)"
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts=(amdgpu.dc=1)
|
||||
fi
|
||||
|
||||
# AMD
|
||||
if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then
|
||||
if [[ -n "${islands}" ]]; then
|
||||
MODULES+=(amdgpu)
|
||||
fi
|
||||
# 'Southern Islands' support
|
||||
if [[ "${islands}" == "1" ]]; then
|
||||
# Mkinitcpio Modules
|
||||
mkinitcpio_mods="MODULES=(amdgpu)"
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts+=(radeon.si_support=0 amdgpu.si_support=1)
|
||||
vga_bootopts+=(amdgpu.dc=1 radeon.si_support=0 amdgpu.si_support=1)
|
||||
# 'Sea Islands' support
|
||||
elif [[ "${islands}" == "2" ]]; then
|
||||
# Mkinitcpio Modules
|
||||
mkinitcpio_mods="MODULES=(amdgpu)"
|
||||
# Graphics Kernel Parameters
|
||||
vga_bootopts+=(radeon.cik_support=0 amdgpu.cik_support=1)
|
||||
elif [[ -z "${islands}" ]]; then
|
||||
# Mkinitcpio Modules
|
||||
mkinitcpio_mods="MODULES=()"
|
||||
vga_bootopts+=(amdgpu.dc=1 radeon.cik_support=0 amdgpu.cik_support=1)
|
||||
fi
|
||||
fi
|
||||
## Configuration = 'No'
|
||||
elif [[ "${vgaconf}" == "n" ]]; then
|
||||
# Mkinitcpio Modules
|
||||
mkinitcpio_mods="MODULES=()"
|
||||
# Mkinitcpio Hooks
|
||||
mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)"
|
||||
fi
|
||||
### Main Kernel Parameters
|
||||
#### Main Mkinitcpio Modules
|
||||
mkinitcpio_mods="MODULES=(${MODULES[*]})"
|
||||
#### Main Mkinitcpio Hooks
|
||||
mkinitcpio_hooks="HOOKS=(${HOOKS[*]})"
|
||||
#### Main Kernel Parameters
|
||||
boot_opts=()
|
||||
|
||||
if [[ "${autoroot}" == "y" ]]; then
|
||||
@@ -6508,7 +6544,7 @@ OPTIMIZED
|
||||
tty="$(tty)"
|
||||
disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)"
|
||||
trg=""
|
||||
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" vgapkgs="" vgacount="" vgacard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vgaconf="" vga_conf="" vga_setup="" vendor="" vendor1="" vendor2="" vendor3="" vendor_slct="" packages="" efi_entr_del="" wrlss_rgd="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" vga_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" revision="" greeternmbr="" cust_bootopts="" bluetooth="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" vga_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" use_manpreset="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" uki="" ukify="" slct_autoprt="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="")
|
||||
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" vgacount="" vgacard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vgaconf="" vga_conf="" vga_setup="" vendor="" vendor1="" vendor2="" vendor3="" vendor_slct="" packages="" efi_entr_del="" wrlss_rgd="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" vga_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" revision="" greeternmbr="" cust_bootopts="" bluetooth="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" vga_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" use_manpreset="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" uki="" ukify="" slct_autoprt="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" vendors="")
|
||||
export "${vars[@]}"
|
||||
clear
|
||||
first_check
|
||||
|
||||
Reference in New Issue
Block a user