Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- depend() {
- need localmount
- before xdm
- }
- if [[ $(uname -r) == *-nvidia ]] ; then
- modprobe -q nvidia
- if [[ $(eselect opengl show) != nvidia ]] ; then
- eselect opengl set nvidia &>/dev/null
- fi
- cat > /etc/X11/xorg.conf.d/01-nvidia.conf << EOF
- Section "Device"
- Identifier "Device0"
- Driver "nvidia"
- Option "NoLogo" "True"
- EndSection
- EOF
- else
- modprobe -q nouveau
- if [ -f /etc/X11/xorg.conf.d/01-nvidia.conf ] ; then
- rm /etc/X11/xorg.conf.d/01-nvidia.conf
- fi
- if [[ $(eselect opengl show) != xorg-x11 ]] ; then
- eselect opengl set xorg-x11 &>/dev/null
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment