My video-related configuration is like the following:
hardware.opengl.driSupport32Bit = true;
hardware.opengl.enable = true;
hardware.opengl.extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
libva
vaapiIntel
];
hardware.nvidia.prime = {
offload.enable = true;
nvidiaBusId = "PCI:1:0:0";
intelBusId = "PCI:0:2:0";
};
hardware.nvidia.modesetting.enable = true;
#hardware.nvidia.nvidiaPersistenced = true;
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.dpi = 96;
Everything seems to be running well, and I can use the nvidia-offload
script to run stuff in my nvidia card. But when I check nvidia-smi, I notice that my X server is running on my nvidia card, when I expected it to run on my Intel card, since I’m not offloading it.
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66 Driver Version: 450.66 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 960M Off | 00000000:01:00.0 Off | N/A |
| N/A 35C P8 N/A / N/A | 4MiB / 4046MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 13441 G ...-xorg-server-1.20.8/bin/X 3MiB |
+-----------------------------------------------------------------------------+
What am I doing wrong?