Booting into nixos-gnome-21.05.3892.70904d4a992-x86_64-linux.iso hangs at
nouveau 0000:01:00.0: unknown chipset (b76000a1)
or
Found device Ultra_Fit nixos-gnome-21.05-x86-64.
or
Finished mount-pstore.service
or … some other message.
OTOH, booting into ubuntu-20.04.3-desktop-amd64.iso goes smoothly every time. Inside the ubuntu live image, I can install Nix, and use that to install NixOS (I have tried both 20.09 and 21.05) onto the machine’s drive, and booting into that, hangs at similar sorts of places.
I have tried the debug option on the NixOS installer image, which seems to spew extra information to the screen during boot, but I am not able to extract anything meaningful from it.
All the messages at which it gets stuck are reports of success ([ OK ]), except
nouveau 0000:01:00.0: unknown chipset (b76000a1)
so this is my prime suspect, but it means very little to me. A quick search suggests that nouveau is an Accelerated Open Source driver for nVidia cards.
Noveau is the open source and not very feature complete nvidia hardware driver. Unless your nvidia card is fairly old, then you should probably use the proprietary nvidia driver anyway to get the most out of the card. I’m not sure there is any way to boot the binary driver from the official ISO, but you could build your own iso if needed, or if you’ve already installed NixOS successfully from the ubuntu image, try to set the binary driver services.xserver.videoDrivers = [ "nvidia" ].
Picking the nomodeset version the NixOS installer, the boot succeeds, but the screen goes blank immediately after booting completes.
Attempting to switch virtual console (with ALT + F{2…7}) flashes up (for a fraction of a second) a logged in session for user nixos. The information that flashes past, includes the statement that an ssh server is running and that both root and nixos have empty passwords, which would need to be set before sshing in.
So I tried to set the password blind, without seeing what is on the screen, and noticed that what I type shows up extremely faintly (only visible with ambient light turned off). I managed to set a password and ssh in to the machine. This gives me access to dmesg, but I don’t really know what to look for, and nothing stands out.
First of all, you haven’t provided any details on what machine you have, other than that it’s a laptop. That’s pretty useful to do in general…
That said, if it’s a new (2021) laptop the first thing you’ll want to do in case of non-booting images is to make sure you’re booting the iso image with the latest (5.14) kernel instead of the current 21.05 default kernel (5.10). See if that gets you anywhere - do note it’s a minimal iso, so it won’t boot to GNOME.
In case the latest_kernel iso doesn’t help: sounds like your backlight doesn’t work. So that’s what you’ll want to look for - and moreso, consult Arch Wiki’s page about it.
This boots without any problems (and even mentions something about setting backlight brightness towards the end, but this stays on the screen very briefly, so I didn’t catch the details).
Thank you!
I edited configuration.nix on the system I installed earlier, adding
boot.kernelPackages = pkgs.linuxPackages_latest;
After another nixos-install --root /mnt, booting into the installed NixOS appears to get past the backlight problem, as I see
Starting Load/Save Screen Backlight Brightness of backlight:intel_backlight...
[ OK ] Finished Load/Save Screen Backlight Brightness of backlight:intel_backlight...
but all attempts to boot include, somewhere along the line
[FAILED] Failed to start X11 Server
and hang. Everything else that remains visible on the screen is [ OK ].
You’ll want to attempt to switch to a usable VT so you can check the logs (journalctl) to figure out why your display manager fails to start.
If I had to guess I’d say the issue might be that it’s trying to initialize the nvidia adapter - which fails according to your kernel log excerpt (probably requires proprietary drivers). Arch Wiki: NVIDIA Optimus. NixOS wiki: Nvidia
Your laptop also has an intel adapter - these generally work out of the box, so the easiest way (for now) might be to disable the discrete graphics adapter (BIOS or blacklist the module) to see if that helps. Or try enabling the proprietary module for your nvidia card (as suggested by @nrdxp).
in my configuration.nix. Now I removed "modesetting" before nixos-rebuild switch and the backlight disappeared. So I reinstated "modesetting" and nixos-rebuild switched again. This time the display manager popped up. What‽ But rebooting into this generation … the X server fails to start, once again.
Putting back "modesetting" resulted in a different generation than the one from which I removed it in the first place, so there must have been some other difference, but I now get the following behaviour consistently:
boot
display manager fails to start
nixos-rebuild switch (without changing configuration, no new generation is created) …