Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nouveau loaded with nvidia #29514

Closed
moaxcp opened this issue Sep 18, 2017 · 9 comments
Closed

nouveau loaded with nvidia #29514

moaxcp opened this issue Sep 18, 2017 · 9 comments

Comments

@moaxcp
Copy link
Contributor

moaxcp commented Sep 18, 2017

Issue description

I'm trying to get nvidia working on my laptop. I have added nvidia_x11 to my configuration.

Steps to reproduce

  boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];

Technical details

the module appears to blacklist nouveau but the kernal log show it being loaded before nvidia.

Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: VRAM: 2048 MiB
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: TMDS table version 2.0
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB version 4.0
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB outp 03: 080153d6 0f220020
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB outp 04: 08015392 00020020
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB outp 05: 080143c6 0f220010
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB outp 06: 08014382 00020010
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB outp 10: 020273a6 0f220010
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB outp 11: 02027362 00020010
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 00: 00000040
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 01: 00001161
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 02: 00001231
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 03: 01000331
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 04: 01000446
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 05: 02000546
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 06: 00010631
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 07: 00010746
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 08: 00020846
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: DRM: DCB conn 09: 00000900
Sep 17 20:06:40 n1 kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Sep 17 20:06:40 n1 kernel: [drm] Driver supports precise vblank timestamp query.
Sep 17 20:06:40 n1 kernel: nouveau 0000:01:00.0: hwmon_device_register() is deprecated. Please convert the driver to us
Sep 17 20:06:41 n1 kernel: nouveau 0000:01:00.0: DRM: MM: using COPY0 for buffer copies
Sep 17 20:06:41 n1 kernel: [drm] Cannot find any crtc or sizes - going 1024x768
Sep 17 20:06:41 n1 kernel: nouveau 0000:01:00.0: DRM: allocated 1024x768 fb: 0x60000, bo ffff9ef657961000
Sep 17 20:06:41 n1 kernel: Console: switching to colour frame buffer device 128x48
Sep 17 20:06:41 n1 kernel: nouveau 0000:01:00.0: fb0: nouveaufb frame buffer device
Sep 17 20:06:43 n1 kernel: nvidia: loading out-of-tree module taints kernel.
Sep 17 20:06:43 n1 kernel: nvidia: module license 'NVIDIA' taints kernel.
Sep 17 20:06:43 n1 kernel: Disabling lock debugging due to kernel taint
Sep 17 20:06:43 n1 kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 244
Sep 17 20:06:43 n1 kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Sep 17 20:06:43 n1 kernel: NVRM: This can occur when a driver such as: 
                           NVRM: nouveau, rivafb, nvidiafb or rivatv 
                           NVRM: was loaded and obtained ownership of the NVIDIA device(s).
Sep 17 20:06:43 n1 kernel: NVRM: Try unloading the conflicting kernel module (and/or
                           NVRM: reconfigure your kernel without the conflicting
                           NVRM: driver(s)), then try loading the NVIDIA kernel module
                           NVRM: again.
Sep 17 20:06:43 n1 kernel: NVRM: No NVIDIA graphics adapter probed!
Sep 17 20:06:43 n1 kernel: nvidia-nvlink: Unregistered the Nvlink Core, major device number 244
Sep 17 20:06:43 n1 kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 244
Sep 17 20:06:43 n1 kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Sep 17 20:06:43 n1 kernel: NVRM: This can occur when a driver such as: 
                           NVRM: nouveau, rivafb, nvidiafb or rivatv 
                           NVRM: was loaded and obtained ownership of the NVIDIA device(s).
Sep 17 20:06:43 n1 kernel: NVRM: Try unloading the conflicting kernel module (and/or
                           NVRM: reconfigure your kernel without the conflicting
                           NVRM: driver(s)), then try loading the NVIDIA kernel module
                           NVRM: again.
Sep 17 20:06:43 n1 kernel: NVRM: No NVIDIA graphics adapter probed!
  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
  • Nix version: (run nix-env --version)
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
  • Sandboxing enabled: (run grep build-use-sandbox /etc/nix/nix.conf)
@peterhoeg
Copy link
Member

You don't need extraModulePackages. Instead do this:

  boot = {
    extraModprobeConfig = "options nvidia-drm modeset=1";

    initrd.kernelModules = [
      "nvidia"
      "nvidia_modeset"
      "nvidia_uvm"
      "nvidia_drm"
    ];
  };
  services.xserver.videoDrivers = [ "nvidia" ];

@moaxcp
Copy link
Contributor Author

moaxcp commented Sep 19, 2017

This seems to be loading but I'm getting an error

Sep 18 21:04:14 n1 display-manager[1105]: (EE) no screens found(EE)
...
Sep 18 21:04:15 n1 systemd[1]: display-manager.service: Service hold-off time over, scheduling restart.
Sep 18 21:04:15 n1 systemd[1]: Stopped X11 Server.
Sep 18 21:04:15 n1 systemd[1]: display-manager.service: Start request repeated too quickly.
Sep 18 21:04:15 n1 systemd[1]: Failed to start X11 Server.
Sep 18 21:04:15 n1 systemd[1]: display-manager.service: Unit entered failed state.
Sep 18 21:04:15 n1 systemd[1]: display-manager.service: Failed with result 'exit-code'.

This happens even if I just set services.xserver.videoDrivers.

My laptop card uses optimus. Could that have something to do with it?

@peterhoeg
Copy link
Member

I don't know - I don't have any optimus hardware.

@vcunat
Copy link
Member

vcunat commented Sep 19, 2017

The switchable GPUs were always more complicated. I don't know details as I never had one, but I'd try things like https://nixos.org/nixos/manual/options.html#opt-hardware.bumblebee.enable

@Ekleog
Copy link
Member

Ekleog commented Oct 4, 2018

(triage) @moaxcp , did you try bumblebee as mentioned by @vcunat ? It's indeed the solution I had found for optimus drivers last time I checked (a couple years ago): run everything on the integrated graphics card by default, and have the optirun command provided by bumblebee to run things on the discrete card.

@peti
Copy link
Member

peti commented Sep 16, 2019

For what it's worth, I just tried to enable nvidia prime on my Dell Precision latop, too. and I ran into the exact same problem as @moaxcp: X would no longer start, complaining that no viable screen had been found. :-(

@moaxcp
Copy link
Contributor Author

moaxcp commented Sep 17, 2019

@peti
Copy link
Member

peti commented Sep 17, 2019

Yeah, that setup finally worked for me, too, albeit with the latest nvidia driver rather than the legacy one. :-)

BTW, does the original problem you reported in this PR still exist? I can set

extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];

and it works just fine on the current nixos-unstable.

@moaxcp
Copy link
Contributor Author

moaxcp commented Sep 19, 2019

Good point maybe I should close this.

@moaxcp moaxcp closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants