Skip to content

Instantly share code, notes, and snippets.

@Bruno-Hanzen
Forked from xqms/System configuration
Created August 15, 2018 09:39
Show Gist options
  • Save Bruno-Hanzen/6164b0e0ea0ed7e6766e6da6b8b47d53 to your computer and use it in GitHub Desktop.
Save Bruno-Hanzen/6164b0e0ea0ed7e6766e6da6b8b47d53 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