Garuda Nix Subsystem black screen (nvidia issues?)

Hello,

I have successfully installed the garuda nix subsystem. When I reboot, I am able to select it as a boot target.

However, after boot completes, I am left with a black screen, and unable to ctrl+alt+f(1,2,3…) into any terminal.

My hunch is that my nvidia card is to blame. I am thinking I could mess with the configuration.nix in the subvolume, but don’t want to interfere if garuda has its own way of performing configuration changes on the subsystem.

Any advice on how to move forward?

If you go into advanced options it should have other kernel options to try (fallback and recovery mode) for each kernel installed.

hmm, other kernel options to try for the nixos subsystem?

From what I understand, those would boot me into main (Arch) system.

When I am on the nixos grub menu, it doesn’t give me any kernel boot options, unfortunately.

If not using the default Garuda grub setup then it won’t show those options. You might be able to edit the Garuda kernel entry in grub to load only open source drivers.

Doing a quick google led to this ubuntu entry with a possible solution:

It was worth a shot!

I edited /@nix-subsystem/boot/grub/grub.cfg to append

modprobe.blacklist=nvidia systemd.setenv=GPUMOD=nouveau rd.driver.blacklist=nvidia nouveau.modeset=1 nvidia.modeset=0 

as arguments to the kernel. But unfortunately that didn’t seem to do the trick.

The NixOS manual for nvidia drivers can be found here: https://nixos.wiki/wiki/Nvidia

But I don’t know how to perform a nixos-rebuild from the outside, and don’t want to accidentally break it beyond repair…

On the topic of chrooting into a nix system…

You can do it from within Garuda iirc. Mount the subsystem root subvolume to /mnt, additionally @nix to /mnt/nix, which should be enough to run nixos-enter from the nixos-install-tools and modify the config + nixos-rebuild switch / boot.

Let me know if these instructions weren’t clear enough.

2 Likes

Thank you, makes sense!

Unfortunately, I get “/nix/store/h0sjmi6a0fxg2qadgkg7f5ha3kp0fpk1-nixos-install-tools-24.11pre-git/bin/nixos-enter: ‘/mnt’ is not a NixOS installation”

Fortunately, I found: https://nixos.wiki/wiki/Change_root#Manual_chroot

So I might get to try that and report out what happens next.


EDIT:I’m silly and forgot that I didn’t mount in /mnt, but another dir. I just had to pass “–root ”

1 Like

Yep, that worked!

So to summarize some steps for the next person:

  1. Mount @nix-subsystem to /mnt
  2. Mount @nix to /mnt/nix
  3. Enter the “/mnt” directory
  4. Start the nix-daemon
  5. “nix shell nixpkgs#nixos-install-tools”
  6. “su”
  7. “nixos-enter”
  8. Apply configuration from https://nixos.wiki/wiki/Nvidia
  9. “nixos-rebuild switch”
  10. Reboot, then profit!
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.