-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
bumblebee not working #267540
Comments
Maybe this Bumblebee-Project/Bumblebee#920 (comment) would solve the issue, but I’m not sure how to try it on NixOS. |
I’ve ran
as described in the comment I’ve linked to, then restarted my pc. It didn’t solve anything, same error message optirun glxgears
[ 612.660668] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "mouse" (module does not exist, 0)
[ 612.660697] [ERROR]Aborting because fallback start is disabled. |
Hey did you get it working? |
@leg7
|
Hey I gave up too and found out that I can just use offload mode even if my gpu is older than turing generation gpus. https://nixos.wiki/wiki/Nvidia#Optimus_PRIME_Option_A:_Offload_Mode |
I remember trying to set this up but it gave an error because offload mode didn’t support my legacy driver. Did you try to run |
yeah that works for me
With nvidia-offload:
|
@shadyalfred what gpu do you have? |
My GPU is pretty old, it uses the nvidia driver version 390. |
Yeah I checked on the nvidia website and you really need to use the legacy driver. The nvidia page the nixos wiki links was telling me my gpu needed legacy drivers but when I checked on here https://www.nvidia.com/download/find.aspx I saw that I could use the stable driver so I thought maybe your gpu would have similar documentation issues but unforunately it doesn't. I don't really know how to help you beyond this. Maybe try sync mode? |
I just gave up, it is pretty old so it is not that useful even if it is working I guess, it doesn’t even support vulkan. |
Same issue. Btw, @leg7 do you power off the card to save power? How? On my i7 7700 the new Nvidia power management is not supported, so I need bbswitch :/ |
I've found how to fix the "mouse" module issue: #282646 nixpkgs.overlays = [
(final: prev:
{
bumblebee = prev.bumblebee.override { extraNvidiaDeviceOptions = "BusID \"PCI:01:00:0\""; };
})
(final: prev:
let
xmodules = lib.concatStringsSep "," (map (x: "${x.out or x}/lib/xorg/modules") ([ pkgs.xorg.xorgserver pkgs.xorg.xf86inputmouse ]));
in
{
bumblebee = prev.bumblebee.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.xorg.xf86inputmouse ];
CFLAGS = [
"-DX_MODULE_APPENDS=\\\"${xmodules}\\\""
];
});
})
]; |
Were you using flakes, @abmantis? |
No flakes here. |
I’m trying to make it work with flakes. I have this now: {
nixConfig = {
experimental-features = ["nix-command" "flakes"];
allowUnfree = true;
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = {
nixpkgs,
...
}: {
nixosConfigurations = {
"nixos" = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = rec {
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
config.nvidia.acceptLicense = true;
overlays = [
(final: prev: {
bumblebee = prev.bumblebee.override {
nvidia_x11 = pkgs.linuxKernel.packages.linux_6_1.nvidia_x11_legacy390;
extraNvidiaDeviceOptions = "BusID \"PCI:01:00:0\"";
};
})
(final: prev: let
xmodules = nixpkgs.lib.concatStringsSep "," (
map (x: "${x.out or x}/lib/xorg/modules") [
pkgs.xorg.xorgserver
pkgs.xorg.xf86inputmouse
]
);
in {
bumblebee = prev.bumblebee.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.xorg.xf86inputmouse];
CFLAGS = [
"-DX_MODULE_APPENDS=\\\"${xmodules}\\\""
];
});
})
];
};
};
modules = [
./configuration.nix
./hardware-configuration.nix
];
};
};
};
}
{
config,
pkgs,
...
}: {
boot.kernelPackages = pkgs.linuxPackages.extend (self: super: {
nvidia_x11 = super.nvidia_x11_legacy390;
});
services.xserver.videoDrivers = [
"modesetting"
];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
hardware.bumblebee.enable = true;
} It builds without errors, I can see
|
@shadyalfred is 01:00:0 the correct address for the Nvidia card? |
@abmantis yes, when I run
|
using @shadyalfred's config (maybe we both have a T420?) I get the mentioned log entries and a coredump:
I think this should be investigated |
Oh, yeah. I’ve just noticed that when I show the logs for everything not just logs
It’s the same as @woffs’ but has this line duplicated for some reason: I wonder if this is relevant |
It just crashes on |
Not sure how to downgrade. One of the comments there mentions that it might be because of a different glibc version though. |
I tried with 22.11 (using Does it work with nouveau somehow? |
Bumblebee supports nouveau if you change the config. If you have the same GPU as mine though, nouveau doesn’t support it unfortunately. |
(23.05 does not work. 22.11 does.)
runtime glx again ... 😵💫 |
Yes, I agree. glibc and nvidia are a pain. |
I suspect you might be running into #277694 However it looks like that recently got backported into |
You are right, X does not crash anymore! 👍 |
Describe the bug
Bumblebee does not work
Steps To Reproduce
Steps to reproduce the behavior:
hardware.bumblebee.enable = true;
optirun glxgears
or really any other program other thanglxgears
Expected behavior
glxgears
to run properly.Additional context
The rest of my config:
hardware-configuration.nix
Notify maintainers
@abbradar
Metadata
"x86_64-linux"
Linux 6.1.62, NixOS, 23.05 (Stoat), 23.05.20231110.da4024d
yes
yes
nix-env (Nix) 2.13.6
"nixos-23.05, nixpkgs-unstable"
/nix/var/nix/profiles/per-user/root/channels/nixos
"x86_64-linux"
Linux 6.1.62, NixOS, 23.05 (Stoat), 23.05.20231110.da4024d
yes
yes
nix-env (Nix) 2.13.6
"nixos-23.05, nixpkgs-unstable"
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: