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 blocking nvidia driver #16711

Closed
f11r opened this issue Jul 4, 2016 · 5 comments
Closed

nouveau blocking nvidia driver #16711

f11r opened this issue Jul 4, 2016 · 5 comments

Comments

@f11r
Copy link

f11r commented Jul 4, 2016

Issue description

Trying to enable nvidia drivers on my Lenovo Y50 (GeForce GTX 860M) via

  services.xserver.videoDrivers = [ "nvidia" ];
  systemd.services.nvidia-control-devices = {
    wantedBy = [ "multi-user.target" ];
    serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11}/bin/nvidia-smi";
  };

After running nixos-rebuild switch, journalctl -xe gives the following output indicating that nouveau was loaded instead of nvidia:

Jul 04 20:18:16 nixos kernel: nouveau 0000:01:00.0: priv: HUB0: 10ecc0 ffffffff (1b40822c)
Jul 04 20:18:16 nixos kernel: nouveau 0000:01:00.0: DRM: resuming client object trees...
Jul 04 20:18:16 nixos kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 249
Jul 04 20:18:16 nixos kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Jul 04 20:18:16 nixos 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).
Jul 04 20:18:16 nixos 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.
Jul 04 20:18:16 nixos kernel: NVRM: No NVIDIA graphics adapter probed!
Jul 04 20:18:16 nixos kernel: [drm] Module unloaded
Jul 04 20:18:16 nixos kernel: nvidia-nvlink: Unregistered the Nvlink Core, major device number 249
Jul 04 20:18:16 nixos kernel: NVRM: NVIDIA init module failed!
Jul 04 20:18:16 nixos nvidia-smi[6215]: modprobe: ERROR: could not insert 'nvidia': No such device
Jul 04 20:18:16 nixos nvidia-smi[6215]: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
Jul 04 20:18:16 nixos systemd[1]: nvidia-control-devices.service: Main process exited, code=exited, status=9/n/a
Jul 04 20:18:16 nixos systemd[1]: nvidia-control-devices.service: Unit entered failed state.

lspci -v gives:

        Subsystem: Lenovo Device 3978
        Flags: bus master, fast devsel, latency 0, IRQ 33
        Memory at d0000000 (32-bit, non-prefetchable) [size=16M]
        Memory at a0000000 (64-bit, prefetchable) [size=256M]
        Memory at b0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 5000 [size=128]
        Expansion ROM at d1000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [250] Latency Tolerance Reporting
        Capabilities: [258] L1 PM Substates
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] #19
        Kernel driver in use: nouveau

I have tried blacklisting nouveau via

boot.blacklistedKernelModules = ["nouveau"];

with no effect.

I've also tried using nvidiaBeta and the nixos unstable channel.

Technical details

  • System: NixOS: 16.03.909.f199be0 (Emu)
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 16.03.909.f199be0

Any ideas on how I can get my system to use nvidia instead of nouveau?

@RamKromberg
Copy link
Contributor

Did you allow Unfree? This works with my gfx460:

  nixpkgs.config = {
    allowUnfree = true;
  };

  services.xserver = {
    enable = true;
    layout = "us,de";
    xkbOptions = "grp:switch,grp:alt_shift_toggle";

    videoDrivers = [ "nvidia" ];

    desktopManager.xfce.enable = true;
    desktopManager.default = "none";
    desktopManager.xterm.enable = false;
    displayManager = {
      lightdm.enable = true;
      };
    windowManager.default = "i3";
    windowManager.i3.enable = true;
  };

@vcunat
Copy link
Member

vcunat commented Jul 5, 2016

I guess your problem is that you didn't reboot.

switch is much more fragile and it won't e.g. exchange kernel modules AFAIK. Don't get me wrong; switch is a great way to apply many other kinds of changes. Note that enabling nvidia automatically blacklists nouveau, but that won't immediately unload it during switch. (You probably wouldn't like switch to auto-kill your X session, too.)

@f11r
Copy link
Author

f11r commented Jul 5, 2016

Good tip w/ the rebooting. Although I did reboot several times, I did not realize that my system is actually booting into an old configuration. So this is most likely not a problem w/ nvidia at all, but instead something else.

What is your policy on issue changes? Should I close this issue and if I can't figure out what is wrong I'll open a new one? Or can you give me some tips in this issue? I think I messed something up with the system encryption and boot loader.

@vcunat
Copy link
Member

vcunat commented Jul 6, 2016

It sounds like the current issue's contents won't be much relevant to your actual issue, so it seems better to start a new thread.

@vcunat vcunat closed this as completed Jul 6, 2016
@vcunat
Copy link
Member

vcunat commented Jul 6, 2016

For quick questions/tips it might be better to use IRC (but I rarely go there personally).

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

3 participants