Skip to content

Instantly share code, notes, and snippets.

@verdimrc
Last active October 2, 2017 08:40
Show Gist options
  • Save verdimrc/2a81b6ee754d7ad4f5c47a507af0a0af to your computer and use it in GitHub Desktop.
Save verdimrc/2a81b6ee754d7ad4f5c47a507af0a0af to your computer and use it in GitHub Desktop.
config-nvidia-on-g3.txt
# g3.4xlarge has 1 GPU (NVIDIA M60).
# 1. Install nvidia grid driver: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html
# 2. Activate grid feature: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/activate_grid.html
# 3. [OPTIONAL] Power mgmt & freq: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/optimize_gpu.html
# Verify the M60 gpu is running in graphics mode.
# See: https://virtuallyvisual.wordpress.com/2016/04/19/nvidia-m60-m6-problems-check-your-card-in-graphics-mode/
#
# If 0300 then graphics, else compute.
$ lspci -n | grep 10de
00:1e.0 0300: 10de:13f2 (rev a1)
# Configure X: the busId should be in DECIMAL.
# To get this DECIMAL value, simply do: nvidia-xconfig --query-gpu-info.
# NOTE: lspci or nvidia-smi show HEX value, which you may convert manually too to DECIMAL.
#
# See: https://devtalk.nvidia.com/default/topic/769851/linux/multi-nvidia-gpus-and-xorg-conf-how-to-account-for-pci-bus-busid-change-/post/4295653/#4295653
$ nvidia-xconfig --query-gpu-info
Number of GPUs: 1
GPU #0:
Name : Tesla M60
UUID : GPU-ccadec20-a8f1-e5db-c5ae-8933f70477a3
PCI BusID : PCI:0:30:0
Number of Display Devices: 0
# Alternatively, the busID can be gotten by `sudo X :0 &` which should fail,
# then check `/var/log/Xorg.0.log` for the busID associated with /dev/dri/card1.
# Generate Xorg.conf; remember to specify the busid.
# NOTE: GRID device explicitly rejects --use-display-device=none.
$ sudo nvidia-xconfig --enable-all-gpus --busid="PCI:0:30:0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment