Can't get NixOS on XPS 15 9520 to boot

I’ve been running NixOS on an XPS 13" 9310 for the past year and I love it! Wanted a bigger screen so I ordered an XPS 15" 9520 for Black Friday. This system has an Nvidia video card, I think.

I used the the 22.05 Gnome installer and was not able to get X to start unless I chose the “nomodeset” option.

Proceeded with install, reboot, and now I can’t get the system to boot :frowning:

It gets as far as Started Network Time Synchronization and then it seems to freeze.

Any ideas?

Try this:

blacklistedKernelModules = [ "nouveau" "nvidiafb" ];

Thanks @emmanuelrosa … is there a way to make the change you suggested and apply it while still booted up in the 22.11 Gnome LiveCD? I just completed the install from the Live CD, and I am hoping to make the change you suggested and do a nixos-rebuild switch prior to rebooting.

I did find what I think is the newly installed system under /tmp/calamares-root-hb5363y7 and changed the configuration.nix I found in there. But I don’t know how to rebuild with this new config file while in the LiveCD environment.

I read your answer here: How to rebuild the configuration of a NixOS installation from Live CD? - Unix & Linux Stack Exchange but I can’t figure out what commands I need to run to rebuild the newly installed OS from within the LiveCD environment.

If I don’t make any other changes and reboot after Live CD install then I end up with a non-functional system. :frowning:

Since the kernel is already intialized, no nixos-rebuild switch won’t blacklist the kernel modules. Why not use nixos-rebuild boot with the updated configuration.nix and then reboot?

@emmanuelrosa OK I can do that, but how do I ensure that the nixos-rebuild uses the configuration.nix that’s in /tmp/calamares-root-hb5363y7/etc/nixos/ (the installed OS) and not the one that is in /etc/nixos/ (the LiveCD environment) ?

Like when I run nixos-rebuild boot I get

Warning: do not know how to make this configuration bootable; please enable a boot loader.

Which makes me think it’s trying to rebuild the LiveCD configuration.nix

Try this: nixos-rebuild boot -I nixos-config=/tmp/calamares-root-hb5363y7/etc/nixos/configuration.nix

I also have an XPS 9520! Been a while since I did a fresh NixOS install, but I know that there are some issues when not using the latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest
You can probably either manage to get to a tty (ctrl-alt-f[3-6]) or don’t reboot after install and edit in chroot (nixos-enter) and then rebuild.

boot.kernelPackages = pkgs.linuxPackages_latest that did the trick!!

1 Like

Hey @vlinkz a little off-topic but were you able to get nvidia graphics working on this laptop? If so, can you share relevant config? Thank you!

@boozedog, you might also find nixos-hardware/dell/xps at master · NixOS/nixos-hardware · GitHub interesting: There doesn’t seem to be XPS 9520 specific configuration over there (yet - it might be nice from you to contribute), but you can take inspiration from other configurations…

1 Like

Thanks @Pamplemousse I have tried various combinations of things from nixos-hardware as well as the NixOS wiki to no avail. The result ends up being a black screen with a blinking cursor and X Windows doesn’t start.

Works fine if I just use latest kernel and intel chipset video w/o Nvidia. Although most of my Steam games don’t work with the Intel video.

I’ve been using a 9520 for ~3months now and it works well with the 9500 nixos-hardware module. I had trouble with the nvidia card but got it working using the latest kernel packages from master branch. 6.0.11 is what my current kernel version is

1 Like

On my laptop at the moment I’m using the <nixos-hardware/common/gpu/nvidia/prime.nix> module with the following BusIds

  hardware.nvidia.prime = {
    # Bus ID of the Intel GPU.
    intelBusId = lib.mkDefault "PCI:0:2:0";

    # Bus ID of the NVIDIA GPU.
    nvidiaBusId = lib.mkDefault "PCI:1:0:0";
  };
1 Like

Hey guys. I’m having the same problem too. But the last line that appears in my boot is Starting Update is completed and Finished Update is Completed
After that it freeze, Caps locks works, but it doesn’t leave that screen anymore.
I tried to edit /temp/calamares-root-Xxxxxx/ configuration.nix adding boot.kernelPackages = pkgs.linuxPackages_latest; and run nixos-rebuild switch. But it did not work. Any ideas?