mirror of
https://github.com/rwinkhart/artix-install-script.git
synced 2026-08-27 20:36:26 -04:00
Replaced nvidia-manager with NVIDIA-FCKR
This commit is contained in:
+6
-16
@@ -2,7 +2,6 @@
|
||||
|
||||
# Importing Variables
|
||||
formfactor="$(< /tempfiles/formfactor)"
|
||||
device="$(< /tempfiles/device)"
|
||||
cpu="$(< /tempfiles/cpu)"
|
||||
threadsminusone="$(< /tempfiles/threadsminusone)"
|
||||
gpu="$(< /tempfiles/gpu)"
|
||||
@@ -68,7 +67,7 @@ curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/confi
|
||||
chown "$username":"$users" /home/"$username"/.bashrc
|
||||
|
||||
# pacman configuration
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/"$device"pacman.conf -o /etc/pacman.conf
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/pacman.conf -o /etc/pacman.conf
|
||||
pacman -Sy yay pacman-contrib --noconfirm
|
||||
mkdir -p /etc/pacman.d/hooks
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/paccache-clean-hook -o /etc/pacman.d/hooks/paccache-clean.hook
|
||||
@@ -134,13 +133,6 @@ if [ "$formfactor" == 1 ]; then
|
||||
echo 'RUN+="/bin/chgrp classmod /sys/class/leds/asus::kbd_backlight/brightness"
|
||||
RUN+="/bin/chmod g+w /sys/class/leds/asus::kbd_backlight/brightness"
|
||||
' > /etc/udev/rules.d/asuskbdbacklight.rules
|
||||
echo '# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
|
||||
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
|
||||
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
|
||||
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
|
||||
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
|
||||
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"
|
||||
' > /etc/udev/rules.d/90-asusd-nvidia-pm.rules
|
||||
echo 'evdev:input:b0003v0B05p1866*
|
||||
KEYBOARD_KEY_c00b6=home # Fn+F2
|
||||
KEYBOARD_KEY_c00b5=end # Fn+F4
|
||||
@@ -164,20 +156,18 @@ if [ "$formfactor" == 1 ]; then
|
||||
m:0x0 + c:237
|
||||
XF86KbdBrightnessDown
|
||||
#G14IntegratedGPU
|
||||
"/usr/bin/nvidia_off.sh; pkill -KILL -u '"$username"'"
|
||||
"/usr/bin/NVIDIA-FCKR integrated"
|
||||
m:0x0 + c:232
|
||||
XF86MonBrightnessDown
|
||||
#G14DedicatedGPU
|
||||
"/usr/bin/nvidia_on.sh; pkill -KILL -u '"$username"'"
|
||||
#G14HybridGPU
|
||||
"/usr/bin/NVIDIA-FCKR hybrid"
|
||||
m:0x0 + c:233
|
||||
XF86MonBrightnessUp' > /home/"$username"/.xbindkeysrc
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/programs/bashpower-g14/bashpower.start -o /etc/local.d/bashpower.start
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/programs/bashpower-g14/bashpower.stop -o /etc/local.d/bashpower.stop
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/programs/NVIDIA-FCKR/NVIDIA-FCKR -o /usr/local/bin/NVIDIA-FCKR
|
||||
pacman -S mesa vulkan-icd-loader vulkan-radeon libva-mesa-driver libva-utils --needed --noconfirm
|
||||
curl -L https://github.com/rwinkhart/nvidia-manager/releases/download/v1.0.1/nvidia-manager-1.0.1-1-any.pkg.tar.zst -o nvidia-manager-1.0.1-1-any.pkg.tar.zst
|
||||
pacman -U nvidia-manager-1.0.1-1-any.pkg.tar.zst --noconfirm
|
||||
rm -rf nvidia-manager-1.0.1-1-any.pkg.tar.zst
|
||||
chmod 755 /etc/local.d/bashpower.start /etc/local.d/bashpower.stop
|
||||
chmod 755 /etc/local.d/bashpower.start /etc/local.d/bashpower.stop /usr/local/bin/NVIDIA-FCKR
|
||||
fi
|
||||
|
||||
# ssh configuration
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
#
|
||||
# rwinkhart/artix-install-script 06/26/2022
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
#HookDir = /etc/pacman.d/hooks/
|
||||
HoldPkg = pacman glibc
|
||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#CleanMethod = KeepInstalled
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
Color
|
||||
#NoProgressBar
|
||||
CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Artix Linux
|
||||
# packagers with `pacman-key --populate artix`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The gremlins repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[gremlins]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[system]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[world]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[galaxy-gremlins]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[galaxy]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[lib32-gremlins]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[lib32]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[universe]
|
||||
Server = https://universe.artixlinux.org/$arch
|
||||
Server = https://mirror1.artixlinux.org/universe/$arch
|
||||
Server = https://mirror.pascalpuffke.de/artix-universe/$arch
|
||||
Server = https://artixlinux.qontinuum.space/artixlinux/universe/os/$arch
|
||||
Server = https://mirror1.cl.netactuate.com/artix/universe/$arch
|
||||
Server = https://ftp.crifo.org/artix-universe/
|
||||
|
||||
#[extra]
|
||||
#Include = /etc/pacman.d/mirrorlist-arch
|
||||
|
||||
#[community]
|
||||
#Include = /etc/pacman.d/mirrorlist-arch
|
||||
|
||||
#[multilib]
|
||||
#Include = /etc/pacman.d/mirrorlist-arch
|
||||
|
||||
[g14]
|
||||
SigLevel = DatabaseNever Optional TrustAll
|
||||
Server = https://arch.asus-linux.org
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
+1
-5
@@ -3,7 +3,7 @@
|
||||
loadkeys us
|
||||
echo ----------------------------------------------------------------------------------------------
|
||||
echo rwinkhart\'s artix install script
|
||||
echo last updated september 22, 2022
|
||||
echo last updated september 24, 2022
|
||||
echo ----------------------------------------------------------------------------------------------
|
||||
echo You will be asked some questions before installation.
|
||||
echo -e "----------------------------------------------------------------------------------------------\n"
|
||||
@@ -58,10 +58,7 @@ if [[ "$disk" == /dev/nvme0n* ]] || [[ "$disk" == /dev/mmcblk* ]]; then
|
||||
fi
|
||||
|
||||
if [ "$formfactor" == 1 ]; then
|
||||
device='g14-'
|
||||
gpu=NVIDIA
|
||||
else
|
||||
device=''
|
||||
fi
|
||||
# stop variable manipulation
|
||||
|
||||
@@ -169,7 +166,6 @@ basestrap /mnt base $base_devel openrc elogind-openrc linux linux-firmware git m
|
||||
# exporting variables
|
||||
mkdir /mnt/tempfiles
|
||||
echo "$formfactor" > /mnt/tempfiles/formfactor
|
||||
echo "$device" > /mnt/tempfiles/device
|
||||
echo "$cpu" > /mnt/tempfiles/cpu
|
||||
echo "$threadsminusone" > /mnt/tempfiles/threadsminusone
|
||||
echo "$gpu" > /mnt/tempfiles/gpu
|
||||
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# NVIDIA-FCKR
|
||||
|
||||
if [ "$1" == 'integrated' ]; then
|
||||
|
||||
# blacklist kernel modules
|
||||
echo "blacklist nouveau
|
||||
blacklist nvidia
|
||||
blacklist nvidia_drm
|
||||
blacklist nvidia_uvm
|
||||
blacklist nvidia_modeset
|
||||
alias nouveau off
|
||||
alias nvidia off
|
||||
alias nvidia_drm off
|
||||
alias nvidia_uvm off
|
||||
alias nvidia_modeset off" > /etc/modprobe.d/NVIDIA-FCKR.conf
|
||||
|
||||
# set udev rules
|
||||
echo 'ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA Audio devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA VGA/3D controller devices
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"' > /lib/udev/rules.d/50-NVIDIA-FCKR.rules
|
||||
|
||||
# disable GPU via acpi_call on next boot
|
||||
echo -e '#!/usr/bin/env bash\necho '"'\_SB.PCI0.GPP0.PG00._OFF'"' > /proc/acpi/call' > /etc/local.d/NVIDIA-FCKR.start
|
||||
chmod +x /etc/local.d/NVIDIA-FCKR.start
|
||||
|
||||
/usr/bin/reboot
|
||||
|
||||
elif [ "$1" == 'hybrid' ]; then
|
||||
rm -rf /etc/modprobe.d/NVIDIA-FCKR.conf /lib/udev/rules.d/50-NVIDIA-FCKR.rules /etc/local.d/NVIDIA-FCKR.start
|
||||
|
||||
/usr/bin/reboot
|
||||
|
||||
else
|
||||
echo -e "invalid argument: $1\nusage: NVIDIA-FCKR [integrated/hybrid]"
|
||||
fi
|
||||
Reference in New Issue
Block a user