Created
June 23, 2015 02:25
-
-
Save nclundsten/a5cab8aa5d129a3ba693 to your computer and use it in GitHub Desktop.
fix nivida fedora 21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $EUID != 0 ]; then | |
echo "Root privileges required. Trying sudo" | |
sudo "$0" "$@" | |
exit $? | |
fi | |
yum -y install akmod-nvidia | |
cat << EOF > /etc/X11/xorg.conf | |
Section "Device" | |
Identifier "nvidia" | |
Driver "nvidia" | |
Option "NoLogo" "true" | |
Option "DPI" "96 x 96" | |
# Specify Nvidia PCI device | |
BusID "PCI:1:0:0" | |
# Make sure X starts also when no outputs are connected to the Nvidia chip | |
Option "AllowEmptyInitialConfiguration" | |
EndSection | |
# Slave device | |
Section "Device" | |
Identifier "intel" | |
# Simple output, no full Intel driver | |
Driver "modesetting" | |
# BusID "PCI:0:2:0" | |
EndSection | |
Section "Screen" | |
Identifier "intel" | |
Device "intel" | |
EndSection | |
Section "Screen" | |
Identifier "nvidia" | |
Device "nvidia" | |
EndSection | |
# Make sure the Nvidia device is the first in the server | |
Section "ServerLayout" | |
Identifier "layout" | |
Screen 0 "nvidia" | |
Inactive "intel" | |
EndSection | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment