Skip to content

Instantly share code, notes, and snippets.

@parkerlreed
Created August 6, 2013 02:57
Show Gist options
  • Save parkerlreed/6161638 to your computer and use it in GitHub Desktop.
Save parkerlreed/6161638 to your computer and use it in GitHub Desktop.
nvidia script
#!/bin/bash
#Downloads and installs module-assistant and nvidia-kernel-common
apt-get install module-assistant nvidia-kernel-common &&
#Downloads and installs the files for your current kernel version.
m-a auto-install nvidia-kernel${VERSION}-source &&
#Downloads drivers and utilities specific to your kernel version.
apt-get install nvidia-glx${VERSION} &&
#Creates a basic xorg.conf file for X to load.
cat > /etc/X11/xorg.conf << EOF
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 304.88 (pbuilder@cake) Wed Apr 3 08:58:25 UTC 2013
# Disables Nvidia logo
# Option " NoLogo" "true"
# Fix Large fonts
# Option "DPI" "96 x 96"
# Power saving setting for Nvidia drivers
# Option "OnDemandVBlankInterrupts" "1"
# Enables overclocking gui
# Option "Coolbits" "1"
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
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 "Monitor"
Identifier "Monitor1"
VendorName "Acer"
Option "PreferredMode" "1900x1080"
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Acer S211HL"
HorizSync 31.0 - 83.0
VertRefresh 56.0 - 76.0
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 560 Ti"
BusID "PCI:2:0:0"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 560 Ti"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Device1"
Monitor "Monitor1"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-2"
Option "metamodes" "DFP-2: 1920x1080 +0+0; DFP-2: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment