I’m having a bad time getting the nvidia proprietary driver to work. Normally I boot it up using nouveau
, and this works fine. But I wanted to use the proprietary driver for performance, because for some reason nouveau
just uses the intel GPU.
I am having a laptop supporting Optimus, with both an intel GPU and an nvidia GPU.
$ lspci -v | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if
00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [Quadro NVS 4200M] (rev a1) (prog-if 00 [VGA controller])
I started trying with the latest nvidia driver. When rebooting X didn’t want to start, however looking at dmesg
I had a nice error message saying that my GPU is only supported by the 390 legacy drivers. Thus I switched to that.
Here is my current attempt:
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
sync.enable = true;
};
};
nixpkgs.config.nvidia.acceptLicense = true;
And it doesn’t work, I have no idea why. The system boots normally until reaching the display manager (lightdm), and there it just shows a black screen. At this point my system is completely frozen, I can’t switch to TTY, the cursor is not blinking on the screen, the only thing I can do is shutting down my computer.
Here’s the X log when this is happening: https://0x0.st/HEsQ.log
I’ve tried a lot of things to make it work, but I didn’t. Disabling modesetting, the i915 driver, using rcutree.rcu_idle_gp_delay=1
as kernel parameter, removing sync.enable = true
from my config, setting modesetting.enable = false
, using bumblebee instead, nothing works.
If I remove sync.enable
, X just fails to start because the nvidia driver isn’t configured for Optimus in that case, which plainly fails. Fiddling with kernel parameters and modesetting didn’t change anything. Using bumblebee just didn’t work, it allowed me to boot as I usually do with nouveau
but when using optirun
it says it can’t find the GPU. So I think my current config is the closest thing to something working, if it weren’t for that freeze !
Does anyone have an idea to fix this freeze ?