files
This commit is contained in:
32
XorgConfigs/chgpu
Executable file
32
XorgConfigs/chgpu
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
while getopts 'inh' OPTION; do
|
||||||
|
case "$OPTION" in
|
||||||
|
i)
|
||||||
|
echo "Mode Intel"
|
||||||
|
mv /etc/X11/xorg.conf.d/20-nvidia.conf /etc/X11/xorg.conf.d/20-nvidia.conf.old
|
||||||
|
# mv /etc/X11/xorg.conf.d/20-hybrid.conf /etc/X11/xorg.conf.d/20-hybrid.conf.old
|
||||||
|
mv /etc/X11/xorg.conf.d/20-intel.conf.old /etc/X11/xorg.conf.d/20-intel.conf
|
||||||
|
mv /etc/modprobe.d/blacklist-nvidia.conf.old /etc/modprobe.d/blacklist-nvidia.conf
|
||||||
|
mv /lib/udev/rules.d/50-disable-nvidia.rules.old /lib/udev/rules.d/50-disable-nvidia.rules
|
||||||
|
mkinitcpio -p linux
|
||||||
|
;;
|
||||||
|
n)
|
||||||
|
echo "Mode Nvidia"
|
||||||
|
mv /etc/X11/xorg.conf.d/20-intel.conf /etc/X11/xorg.conf.d/20-intel.conf.old
|
||||||
|
# mv /etc/X11/xorg.conf.d/20-hybrid.conf /etc/X11/xorg.conf.d/20-hybrid.conf.old
|
||||||
|
mv /etc/X11/xorg.conf.d/20-nvidia.conf.old /etc/X11/xorg.conf.d/20-nvidia.conf
|
||||||
|
mv /etc/modprobe.d/blacklist-nvidia.conf /etc/modprobe.d/blacklist-nvidia.conf.old
|
||||||
|
mv /lib/udev/rules.d/50-disable-nvidia.rules /lib/udev/rules.d/50-disable-nvidia.rules.old
|
||||||
|
mkinitcpio -p linux
|
||||||
|
;;
|
||||||
|
h)
|
||||||
|
echo "Mode Hybrid"
|
||||||
|
mv /etc/X11/xorg.conf.d/20-nvidia.conf /etc/X11/xorg.conf.d/20-nvidia.conf.old
|
||||||
|
mv /etc/X11/xorg.conf.d/20-intel.conf /etc/X11/xorg.conf.d/20-intel.conf.old
|
||||||
|
# mv /etc/X11/xorg.conf.d/20-hybrid.conf.old /etc/X11/xorg.conf.d/20-hybrid.conf
|
||||||
|
mv /etc/modprobe.d/blacklist-nvidia.conf /etc/modprobe.d/blacklist-nvidia.conf.old
|
||||||
|
mv /lib/udev/rules.d/50-disable-nvidia.rules /lib/udev/rules.d/50-disable-nvidia.rules.old
|
||||||
|
mkinitcpio -p linux
|
||||||
|
esac
|
||||||
|
done
|
||||||
10
XorgConfigs/xorg.conf.d/00-keyboard.conf
Normal file
10
XorgConfigs/xorg.conf.d/00-keyboard.conf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
|
||||||
|
# probably wise not to edit this file manually. Use localectl(1) to
|
||||||
|
# instruct systemd-localed to update it.
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "system-keyboard"
|
||||||
|
MatchIsKeyboard "on"
|
||||||
|
Option "XkbLayout" "us"
|
||||||
|
Option "XkbModel" "pc105+inet"
|
||||||
|
Option "XkbOptions" "terminate:ctrl_alt_bksp"
|
||||||
|
EndSection
|
||||||
29
XorgConfigs/xorg.conf.d/20-hybrid.conf.old
Normal file
29
XorgConfigs/xorg.conf.d/20-hybrid.conf.old
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Section "ServerLayout"
|
||||||
|
Identifier "layout"
|
||||||
|
Screen 0 "intel"
|
||||||
|
Inactive "nvidia"
|
||||||
|
Option "AllowNVIDIAGPUScreens"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "nvidia"
|
||||||
|
Driver "nvidia"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Screen"
|
||||||
|
Identifier "nvidia"
|
||||||
|
Device "nvidia"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "intel"
|
||||||
|
Driver "modesetting"
|
||||||
|
BusID "PCI:0:2:0"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Screen"
|
||||||
|
Identifier "intel"
|
||||||
|
Device "intel"
|
||||||
|
Monitor "Monitor0"
|
||||||
|
EndSection
|
||||||
|
|
||||||
5
XorgConfigs/xorg.conf.d/20-intel.conf
Normal file
5
XorgConfigs/xorg.conf.d/20-intel.conf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Section "Device"
|
||||||
|
Identifier "Intel Graphics"
|
||||||
|
Driver "modesetting"
|
||||||
|
Option "TearFree" "True"
|
||||||
|
EndSection
|
||||||
74
XorgConfigs/xorg.conf.d/20-nvidia.conf.old
Normal file
74
XorgConfigs/xorg.conf.d/20-nvidia.conf.old
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
Section "ServerLayout"
|
||||||
|
Identifier "Layout0"
|
||||||
|
Screen 0 "nvidia"
|
||||||
|
Inactive "intel"
|
||||||
|
InputDevice "Keyboard0" "CoreKeyboard"
|
||||||
|
InputDevice "Mouse0" "CorePointer"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Files"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "InputDevice"
|
||||||
|
# generated from default
|
||||||
|
Identifier "Mouse0"
|
||||||
|
Driver "mouse"
|
||||||
|
Option "Protocol" "auto"
|
||||||
|
Option "Device" "/dev/psaux"
|
||||||
|
Option "Emulate3Buttons" "no"
|
||||||
|
Option "ZAxisMapping" "4 5"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "InputDevice"
|
||||||
|
# generated from default
|
||||||
|
Identifier "Keyboard0"
|
||||||
|
Driver "kbd"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Monitor"
|
||||||
|
Identifier "Monitor0"
|
||||||
|
VendorName "Unknown"
|
||||||
|
ModelName "Unknown"
|
||||||
|
Option "DPMS"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "nvidia"
|
||||||
|
Driver "nvidia"
|
||||||
|
VendorName "NVIDIA Corporation"
|
||||||
|
BusID "PCI:1:0:0"
|
||||||
|
Option "ModeValidation" "AllowNonEdidModes"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Screen"
|
||||||
|
Identifier "nvidia"
|
||||||
|
Device "nvidia"
|
||||||
|
Option "AllowEmptyInitialConfiguration"
|
||||||
|
Monitor "Monitor0"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "intel"
|
||||||
|
Driver "modesetting"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Screen"
|
||||||
|
Identifier "intel"
|
||||||
|
Device "intel"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Files"
|
||||||
|
ModulePath "/usr/lib/nvidia/xorg"
|
||||||
|
ModulePath "/usr/lib/xorg/modules"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "OutputClass"
|
||||||
|
Identifier "nvidia"
|
||||||
|
MatchDriver "nvidia-drm"
|
||||||
|
Driver "nvidia"
|
||||||
|
Option "AllowEmptyInitialConfiguration"
|
||||||
|
Option "PrimaryGPU" "yes"
|
||||||
|
ModulePath "/usr/lib/nvidia/xorg"
|
||||||
|
ModulePath "/usr/lib/xorg/modules"
|
||||||
|
EndSection
|
||||||
|
|
||||||
Reference in New Issue
Block a user