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

nixos/bumblebee: allow legacy nvidia drivers #59780

Closed
wants to merge 1 commit into from

Conversation

fgaz
Copy link
Member

@fgaz fgaz commented Apr 17, 2019

Motivation for this change

I have an old GPU that requires a legacy driver. Without this patch using bumblebee with it is impossible. While this didn't fix my problem and I ended up using nouveau (so I can't properly test this), I think it's a nice addition to the module

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@fgaz
Copy link
Member Author

fgaz commented Jun 18, 2019

/cc @abbradar (maintainer of the package, not sure if they maintain the module too)

@abbradar
Copy link
Member

I think it'd be better to introduce something akin to hardware.video.nvidia.package and use it both for NVIDIA module and for Bumblebee module - this way we avoid bumblebee-specific option.

@fgaz
Copy link
Member Author

fgaz commented Jun 18, 2019

Hmm now that I think about it this pr is probably useless since one can just do boot.kernelPackages = pkgs: pkgs.linuxPackages.override (old: { nvidia_x11 = old.nvidia_x11_legacy390; }) and it will be picked up by bumblebee... I'm not so sure anymore if adding a separate option for this is a good idea

@jD91mZM2
Copy link
Member

jD91mZM2 commented Jun 23, 2019

@fgaz Huge thanks for the example code. It's a tiny bit off, but it helped me try the legacy drivers

{
  # ...

  boot.kernelPackages = pkgs.linuxPackages.extend (self: super: {
    nvidia_x11 = super.nvidia_x11_legacy390;
  });

  # ...
}

@fgaz
Copy link
Member Author

fgaz commented Jun 26, 2019

I guess I can close this now that we have a working config

@fgaz fgaz closed this Jun 26, 2019
@jD91mZM2
Copy link
Member

I'm not entirely sure, logs from bumblebeed seemed to claim some non-legacy drivers were still in use. I couldn't be bothered to debug it either, hah. Shame testing the config in a VM can't test Nvidia Optimus hardware (AFAIK)

@fgaz
Copy link
Member Author

fgaz commented Jun 26, 2019

@jD91mZM2 Hmm that may explain why it stopped working for me... I don't have much time nor access to my hardware right now but I'd like to investigate this further. I'll open a separate issue.

@fgaz
Copy link
Member Author

fgaz commented Jun 26, 2019

There's a copule open issues about this already: #30185 and maybe #56729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants