Skip to content

Instantly share code, notes, and snippets.

@xqms
Created October 2, 2014 10:27
Show Gist options
  • Save xqms/472ef97f0ebca8592ecb to your computer and use it in GitHub Desktop.
Save xqms/472ef97f0ebca8592ecb to your computer and use it in GitHub Desktop.
Linux configuration for Intel Graphics and NVIDIA CUDA on Lenovo T440p
#!/bin/bash -e
sudo rmmod nvidia-uvm || true
sudo rmmod nvidia || true
# Adjust this if your driver version is different
sudo modprobe nvidia-340
sudo modprobe nvidia-340-uvm
# Adjust this to your CUDA installation
sudo /opt/cuda-6.0/samples/1_Utilities/deviceQuery/deviceQuery
This is my current system configuration. I use the intel graphics for graphics, and just keep the NVidia card running for CUDA applications. Note that this setup does not give you 3D acceleration on the NVidia card!
Sometimes (only after suspend) I have to use the attached reload_nvidia.sh script because my CUDA applications complain about a "invalid device ordinal".
BIOS version: 1.17
Linux: Ubuntu 14.04 with kernel 3.17.0-031700rc4-generic
kernel cmdline: "acpi_osi=!Windows 2012"
nvidia driver 340 manually installed from the xorg-edgers PPA:
https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa
But this should work with older driver versions as well, I guess.
Remove all nvidia-prime, bumblebee, bbswitch packages.
On Ubuntu I also had to disable the gpu-manager, because it kept overwriting my xorg.conf:
echo "manual" | sudo tee /etc/init/gpu-manager.override
Section "Monitor"
Identifier "Monitor0"
# DisplaySize 309 173 # In millimeters
# DisplaySize 464 260
# DisplaySize 433 242
EndSection
Section "Device"
Identifier "Device0"
Driver "intel" #Choose the driver used for this monitor
EndSection
Section "Screen"
Identifier "Screen0" #Collapse Monitor and Device section to Screen section
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24 #Choose the depth (16||24)
SubSection "Display"
Depth 24
Modes "1920x1080_60" #Choose the resolution
EndSubSection
EndSection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment