New install hangs on boot

I got a new laptop (HP ZBook Power G9), and figured I’d try NixOS 22.05. After booting the live image from a USB stick and using the “nomodeset” variant, I ran the Calamares installer.

After reboot, the bootloader hangs at an entry about synchronizing network time. This hang is eternal, so the bootloader will never progress beyond this.

I’ve tried to troubleshoot, but kind of new to Linux, so could use some help or suggestions.

Im not sure how to get ahold of the boot log for the hung boot after rebooting back into the live environment from the USB stick. I mounted the root partition from the NVME drive into /mnt and the ESP partition into /mnt/boot and did nixos-enter. Did this once and switched to Grub, but eventually went back to systemd via a fresh reinstall with the same issue.

Could someone help or give me some tips. I guess that first I need to be able to look at the boot log from the boot that is hanging.

Thanks,

~Mike

You can access the logs from the installer:

  1. boot back into the installer
  2. mount your root partition into /mnt
  3. run sudo nixos-enter to chroot into the system in /mnt
  4. journalctl -b to see the log of the last boot

Thanks for the help.

After a hung boot and then after booting from the installer ISO, mounting my root partition (nvme0n1p2) to /mnt, doing nixos-enter, and doing journalctl -b, journalctl says there are no entries.

Here’s what is happening on boot, where it’s hanging on “Started Network Time Synchronization”

I did some googling, and mostly what I found were issues like this in the past with systemd where it would hang or have other issues with the time sync service. However, I did a manual install and attempted to set up Grub instead, and after seeing the Grub boot menu, the boot hung at the same point, so I guess not related to systemd per se, though I’m not very well versed in this stuff.

One thing that has me curious is the line in configuration.nix:

boot.loader.efi.efiSysMountPoint = “/boot/efi”;

In the actual boot partition, the directory is “EFI”, not “efi”. Probably nothing, just thought it was curious.

Having failed to boot, and then rebooting back into the instatller ISO, how can I edit the mounted configuration.nix and apply the changes? Do I just do nixos-enter (after mounting root to /mnt) and then ??? (not sure).

Thanks

I went ahead and just looked at the system.journal file in /var/log/journal/.

It looks to me like this is a video driver issue and the time synchronization thing is just a red herring. I’m attaching the log in case that helps.

I think that I need to set some kernel params or set some options on the boot (linux) command or something, such as turning modesetting off, but I’m not sure how to do that with NixOS via configuration.nix when booting to a live ISO due to the actual boot having failed.

journal file

Thanks for any help.

Here are some excerpts from the journal that seem to indicate that the boot worked fine, but the xserver was unable to launch, causing what appeared to be a hung boot:

Sep 03 21:12:25 nixos systemd[1]: Starting Network Time Synchronization…

Sep 03 21:12:25 nixos kernel: i915 0000:00:02.0: Your graphics device 46a6 is not properly supported by the driver in this
kernel version. To force driver probe anyway, use i915.force_probe=46a6
module parameter or CONFIG_DRM_I915_FORCE_PROBE=46a6 configuration option,
or (recommended) check for kernel updates.
Sep 03 21:12:25 nixos kernel: ACPI Warning: _SB.PC00.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20210730/nsarguments-61)
Sep 03 21:12:25 nixos kernel: ACPI Warning: _SB.PC00.PEG1.PEGP.DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20210730/nsarguments-61)
Sep 03 21:12:25 nixos kernel: pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
Sep 03 21:12:25 nixos kernel: VGA switcheroo: detected Optimus DSM method _SB
.PC00.PEG1.PEGP handle
Sep 03 21:12:25 nixos kernel: nouveau: detected PR support, will not use DSM
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: enabling device (0006 → 0007)
Sep 03 21:12:25 nixos kernel: Console: switching to colour dummy device 80x25
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: NVIDIA TU117 (167000a1)

Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: bios: version 90.17.8d.40.44
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: pmu: firmware unavailable
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: fb: 4096 MiB GDDR6
Sep 03 21:12:25 nixos kernel: e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: sec2: unhandled intr 00000010
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: DRM: VRAM: 4096 MiB
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: DRM: GART: 536870912 MiB
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: DRM: BIT table ‘A’ not found
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: DRM: BIT table ‘L’ not found
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: DRM: Pointer to TMDS table not found
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: DRM: DCB version 4.1
Sep 03 21:12:25 nixos kernel: nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies
Sep 03 21:12:25 nixos kernel: [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 0

Sep 03 21:12:26 nixos systemd[1]: Finished Permit User Sessions.
Sep 03 21:12:26 nixos systemd[1]: Starting X11 Server…
Sep 03 21:12:26 nixos systemd[1]: Started Getty on tty1.
Sep 03 21:12:26 nixos systemd[1]: Reached target Login Prompts.
Sep 03 21:12:26 nixos systemd[1]: Starting Hostname Service…
Sep 03 21:12:26 nixos systemd[1]: Started X11 Server.

Sep 03 21:12:26 nixos sddm[1119]: Initializing…
Sep 03 21:12:26 nixos sddm[1119]: Starting…
Sep 03 21:12:26 nixos sddm[1119]: Logind interface found

Sep 03 21:12:27 nixos sddm[1119]: Adding new display on vt 7 …
Sep 03 21:12:27 nixos systemd-udevd[762]: Using default interface naming scheme ‘v250’.
Sep 03 21:12:27 nixos sddm[1119]: Loading theme configuration from “”
Sep 03 21:12:27 nixos sddm[1119]: Display server starting…
Sep 03 21:12:27 nixos sddm[1119]: Adding cookie to “/var/run/sddm/{1e846d9f-401b-449c-8806-ecc86b25682d}”
Sep 03 21:12:27 nixos kernel: e1000e 0000:00:1f.6 eno1: renamed from eth0
Sep 03 21:12:27 nixos sddm[1119]: Running: /nix/store/0rphzsk9wp1bhkx6qjm9nnicnvp6vimv-xserver-wrapper -nolisten tcp -auth /var/run/sddm/{1e846d9f-401b-449c-8806-ecc86b25682d} -background none -noreset -displayfd 17 -seat seat0 vt7
Sep 03 21:12:27 nixos kernel: iTCO_wdt iTCO_wdt: Found a Intel PCH TCO device (Version=6, TCOBASE=0x0400)
Sep 03 21:12:27 nixos kernel: iTCO_wdt iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
Sep 03 21:12:27 nixos systemd-udevd[760]: Using default interface naming scheme ‘v250’.
Sep 03 21:12:27 nixos kernel: iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0

Sep 03 21:12:27 nixos xserver-wrapper[1184]: X.Org X Server 1.20.14
Sep 03 21:12:27 nixos xserver-wrapper[1184]: X Protocol Version 11, Revision 0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Build Operating System: Nix
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Current Operating System: Linux nixos 5.15.63 #1-NixOS SMP Thu Aug 25 09:40:49 UTC 2022 x86_64
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Kernel command line: initrd=\efi\nixos\r2sjxhj9bvvavx8dgbnw8lywricvvfb4-initrd-linux-5.15.63-initrd.efi init=/nix/store/lwpqyl0kq9vaj3byghbjva8dsn9dp622-nixos-system-nixos-22.05.2818.b82ccafb541/init loglevel=4
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Build Date: 15 December 2021 07:01:53PM
Sep 03 21:12:27 nixos xserver-wrapper[1184]:
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Current version of pixman: 0.38.4
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Before reporting problems, check http://wiki.x.org
Sep 03 21:12:27 nixos xserver-wrapper[1184]: to make sure that you have the latest version.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Markers: (–) probed, () from config file, (==) default setting,
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (++) from command line, (!!) notice, (II) informational,
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (++) Log file: “/dev/null”, Time: Sat Sep 3 21:12:27 2022
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (++) Using config file: “/nix/store/12i3hq00bga3zjxhhdjbrbi2ca34r1iw-xserver.conf”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) Using config directory: “/etc/X11/xorg.conf.d”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) Using system config directory “/nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/share/X11/xorg.conf.d”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) ServerLayout “Layout[all]”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) |–>Screen “Screen-amdgpu[0]” (0)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () | |–>Monitor “”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) | |–>Device “Device-amdgpu[0]”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) No monitor specified for screen “Screen-amdgpu[0]”.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Using a default monitor configuration.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () |–>Screen “Screen-radeon[0]” (1)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) | |–>Monitor “”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () | |–>Device “Device-radeon[0]”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) No monitor specified for screen “Screen-radeon[0]”.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Using a default monitor configuration.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) |–>Screen “Screen-nouveau[0]” (2)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () | |–>Monitor “”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) | |–>Device “Device-nouveau[0]”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) No monitor specified for screen “Screen-nouveau[0]”.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Using a default monitor configuration.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () |–>Screen “Screen-modesetting[0]” (3)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) | |–>Monitor “”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () | |–>Device “Device-modesetting[0]”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) No monitor specified for screen “Screen-modesetting[0]”.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Using a default monitor configuration.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) |–>Screen “Screen-fbdev[0]” (4)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () | |–>Monitor “”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) | |–>Device “Device-fbdev[0]”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) No monitor specified for screen “Screen-fbdev[0]”.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Using a default monitor configuration.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () Option “DontZap” “on”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) Option “AllowMouseOpenFail” “on”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) Automatically adding devices
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) Automatically enabling devices
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) Automatically adding GPU devices
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (==) Max clients allowed: 256, resource mask: 0x1fffff
Sep 03 21:12:27 nixos xserver-wrapper[1184]: () FontPath set to:
Sep 03 21:12:27 nixos xserver-wrapper[1184]: /nix/store/l7hwiqwqxzxl71i1z6gm6cn9yd1nliv7-unifont-14.0.03/share/fonts,
Sep 03 21:12:27 nixos xserver-wrapper[1184]: /nix/store/y7v7dfqp284364s0p0yypqvpadmi0dpc-font-cursor-misc-1.0.3/lib/X11/fonts/misc,
Sep 03 21:12:27 nixos xserver-wrapper[1184]: /nix/store/cf6ny2x59c5lj8y41pfny7p2knc7cg5h-font-misc-misc-1.1.2/lib/X11/fonts/misc,
Sep 03 21:12:27 nixos xserver-wrapper[1184]: /nix/store/mx0c0mzagx8b52spl4z6q6krlm2p5avm-font-adobe-100dpi-1.0.3/lib/X11/fonts/100dpi,
Sep 03 21:12:27 nixos xserver-wrapper[1184]: /nix/store/20qxyxxg0p72xlvh7prp0h717xzyvpy7-font-adobe-75dpi-1.0.3/lib/X11/fonts/75dpi
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (
) ModulePath set to “/nix/store/vz918np51javbcw7i9cyn63lbfzm8ci1-xf86-video-amdgpu-21.0.0/lib/xorg/modules/drivers,/nix/store/rvqmkbxmhwn4r42rjlvmcggw8dabl8sq-xf86-video-ati-5eba006e4129e8015b822f9e1d2f1e613e252cda/lib/xorg/modules/drivers,/nix/store/k7fd64kharzfwahnrfq7zw1fj0iww7li-xf86-video-nouveau-3ee7cbca8f9144a3bb5be7f71ce70558f548d268/lib/xorg/modules/drivers,/nix/store/iig4kpyr10y805l3913vl3dnisrv6bgf-xf86-video-fbdev-0.5.0/lib/xorg/modules/drivers,/nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/lib/xorg/modules,/nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/lib/xorg/modules/extensions,/nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/lib/xorg/modules/drivers,/nix/store/28y7kza8p0g6ymbglw54i71ap5i95f93-xf86-input-evdev-2.10.6/lib/xorg/modules/input,/nix/store/7pnasfiblwly82v3pamra5k533iwdwn0-xf86-input-libinput-1.2.0/lib/xorg/modules/input”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) The server relies on udev to provide the list of input devices.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: If no devices become available, reconfigure udev or disable AutoAddDevices.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loader magic: 0x62cd40
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module ABI versions:
Sep 03 21:12:27 nixos xserver-wrapper[1184]: X.Org ANSI C Emulation: 0.4
Sep 03 21:12:27 nixos xserver-wrapper[1184]: X.Org Video Driver: 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: X.Org XInput driver : 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: X.Org Server Extension : 10.0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (++) using VT number 7
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) xfree86: Adding drm device (/dev/dri/card0)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (–) PCI:*(0@0:2:0) 8086:46a6:103c:89c0 rev 12, Mem @ 0x6032000000/16777216, 0x4000000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x???/131072
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (–) PCI: (1@0:0:0) 10de:1fb6:103c:89c1 rev 161, Mem @ 0x83000000/16777216, 0x6020000000/268435456, 0x6030000000/33554432, I/O @ 0x00003000/128
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) “glx” will be loaded by default.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “glx”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/lib/xorg/modules/extensions/libglx.so
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module glx: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 1.0.0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Server Extension, version 10.0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “amdgpu”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/vz918np51javbcw7i9cyn63lbfzm8ci1-xf86-video-amdgpu-21.0.0/lib/xorg/modules/drivers/amdgpu_drv.so
Sep 03 21:12:27 nixos systemd-logind[999]: Watching system buttons on /dev/input/event2 (Lid Switch)
Sep 03 21:12:27 nixos systemd-logind[999]: Watching system buttons on /dev/input/event1 (Sleep Button)
Sep 03 21:12:27 nixos systemd-logind[999]: Watching system buttons on /dev/input/event3 (Power Button)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module amdgpu: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 21.0.0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Module class: X.Org Video Driver
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Video Driver, version 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “ati”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/rvqmkbxmhwn4r42rjlvmcggw8dabl8sq-xf86-video-ati-5eba006e4129e8015b822f9e1d2f1e613e252cda/lib/xorg/modules/drivers/ati_drv.so
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module ati: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 19.1.0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Module class: X.Org Video Driver
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Video Driver, version 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “nouveau”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/k7fd64kharzfwahnrfq7zw1fj0iww7li-xf86-video-nouveau-3ee7cbca8f9144a3bb5be7f71ce70558f548d268/lib/xorg/modules/drivers/nouveau_drv.so
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module nouveau: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 1.0.17
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Module class: X.Org Video Driver
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Video Driver, version 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “modesetting”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/lib/xorg/modules/drivers/modesetting_drv.so
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module modesetting: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 1.20.14
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Module class: X.Org Video Driver
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Video Driver, version 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “fbdev”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/iig4kpyr10y805l3913vl3dnisrv6bgf-xf86-video-fbdev-0.5.0/lib/xorg/modules/drivers/fbdev_drv.so
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module fbdev: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 0.5.0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Module class: X.Org Video Driver
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Video Driver, version 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) AMDGPU: Driver for AMD Radeon:
Sep 03 21:12:27 nixos xserver-wrapper[1184]: All GPUs supported by the amdgpu kernel driver
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) NOUVEAU driver
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) NOUVEAU driver for NVIDIA chipset families :
Sep 03 21:12:27 nixos xserver-wrapper[1184]: RIVA TNT (NV04)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: RIVA TNT2 (NV05)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 256 (NV10)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 2 (NV11, NV15)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 4MX (NV17, NV18)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 3 (NV20)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 4Ti (NV25, NV28)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce FX (NV3x)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 6 (NV4x)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 7 (G7x)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 8 (G8x)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce 9 (G9x)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce GTX 2xx/3xx (GT2xx)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce GTX 4xx/5xx (GFxxx)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce GTX 6xx/7xx (GKxxx)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce GTX 9xx (GMxxx)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: GeForce GTX 10xx (GPxxx)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) modesetting: Driver for Modesetting Kernel Drivers: kms
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) FBDEV: driver for framebuffer: fbdev
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (WW) Falling back to old probe method for modesetting
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) modeset(1): using default device
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading sub module “fbdevhw”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “fbdevhw”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/lib/xorg/modules/libfbdevhw.so
Sep 03 21:12:27 nixos systemd-logind[999]: Watching system buttons on /dev/input/event4 (Intel HID events)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module fbdevhw: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 0.0.2
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Video Driver, version 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) Unable to find a valid framebuffer device
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (WW) Falling back to old probe method for fbdev
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading sub module “fbdevhw”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) LoadModule: “fbdevhw”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Loading /nix/store/2dlgkw0pdpmkkxc812n3vwjngnhl77fs-xorg-server-1.20.14/lib/xorg/modules/libfbdevhw.so
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) Module fbdevhw: vendor=“X.Org Foundation”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: compiled for 1.20.14, module version = 0.0.2
Sep 03 21:12:27 nixos xserver-wrapper[1184]: ABI class: X.Org Video Driver, version 24.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) open /dev/fb0: No such file or directory
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) [drm] nouveau interface version: 1.3.1
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) Unknown chipset: NV167
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) modeset(G0): using drv /dev/dri/card0
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) Screen 0 deleted because of no matching config section.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) UnloadModule: “modesetting”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) Screen 1 deleted because of no matching config section.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) UnloadModule: “fbdev”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (II) UnloadSubModule: “fbdevhw”
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Fatal server error:
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: Please consult the The X.Org Foundation support
Sep 03 21:12:27 nixos xserver-wrapper[1184]: at http://wiki.x.org
Sep 03 21:12:27 nixos xserver-wrapper[1184]: for help.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) Please also check the log file at “/dev/null” for additional information.
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE)
Sep 03 21:12:27 nixos xserver-wrapper[1184]: (EE) Server terminated with error (1). Closing log file.
Sep 03 21:12:27 nixos systemd[1]: Started Load/Save RF Kill Switch Status.
Sep 03 21:12:27 nixos systemd[1]: Reached target Bluetooth Support.
Sep 03 21:12:27 nixos sddm[1119]: Failed to read display number from pipe
Sep 03 21:12:27 nixos sddm[1119]: Could not start Display server on vt 7

Yes, most likely. That is usually the last thing you see before the kernel attemps modesetting.

Sep 03 21:12:25 nixos kernel: nouveau:

Ah, you probably don’t want this and it’s likely the reason why you don’t get any graphics.

By default the nouveau drivers are enabled and will be used, but AFAIK they work rather poorly outside a few particular GPUs. You can either stick to free software and use the integrated intel graphics or enable the proprietary nvidia drivers for your card.

Actually, you probably want to use optimus mode: Nvidia - NixOS Wiki

If you have an iGPU and a dGPU, I’d wager it’s failing to boot because it doesn’t know what to do with which GPU, rather than because you’re using nouveau. Nouveau is much slower than the official driver, but it can drive most nvidia GPUs enough to run gnome, so I doubt it’s causing a flat out failure here.

I don’t know in detail what the issues with this are, but every time someone asks about weird graphics failures it’s due to mixed GPU setups that don’t have Optimus configured.

Edit: yep, at least modesetting should work with nouveau: FeatureMatrix

1 Like

Thanks for the help everyone.

The laptop has an Nvidia RTX T600 gpu, which is Turing architecture and is using Optimus (lspci shows “3D controller”).

As I said initially, I’m pretty new to Linux. I installed Debian on my desktop PC about a month ago and had a similar problem with Nvidia drivers: would not boot to a graphical environment with nouveau with modesetting turned on. I turned it off by editing the Grub linux command in the boot menu so that I could boot the system, and then installed the newest Nvidia driver (515.65.01), and then after a reboot everything was golden. Also, as a note, even the NixOS live installer image also would not boot to a graphical environment without using the “nomodesetting” variant.

I typically run 5-6 external monitors via a dock in addition to the laptop screen, so I need to get it working as well as possible, so will want to use the Nvidia proprietary driver.

Looking at the wiki and at the nixpkgs repo, on the unstable branch it looks like it will use the 515.61.05 driver as “latest”, but on the release-22.05 branch it uses the 515.48.07 driver. I don’t know at this point how to use the unstable branch (channels maybe?), so I’m just going to try the stuff listed in the wiki and see how that goes.

BTW, I think the Calamares installer is a great addition to NixOS. It makes it much easier to install on a PC than probably many other distros (definitely easier than Debian). I think there might be some opportunities to make it even easier by calling out or pre-checking for problems with, e.g., Nvidia GPUs so that it usually “just works.”

Really excited about NixOS; it kind of brings order to the chaos.

I’ll follow back up after I’ve made some progress. I assume that while booted into the installer image and having run nixos-enter, I can edit the configuration.nix and then just run “nixos-rebuild switch”, or do I need to run some other command?

~Mike

You’re correct about the nvidia driver version, as well as the fact that channels control which NixOS version you download things from. I’d recommend sticking to stable, unless you desperately need a more up-to-date driver. Turing GPUs have been around for a while, and NixOS’ nvidia drivers tend to be more up-to-date than debian’s, so don’t worry too much about that.

Just following the wiki is definitely the way to go :slight_smile:

I agree! The calamares installer is still very new, and because people rarely reinstall systems the powerusers around here have not used it much. Maybe once those of us who make custom Live CDs for quick installation start adopting it.

Either way, in general we’ve definitely not seen all the edge cases. Suggestions like this one will fall onto users like you, so make sure to report them in issues; but I do think matters will improve a lot now the installer exists :slight_smile:

That’s correct!

This now seems to be working. After lots of googling, looking at lots of journalctl logs, and lots of config changes and reboots, down below is what I have at this point in the configuration.nix.

The GUI environment does load and currently is extended to three external monitors, and it seems that things shut down and resume properly other than a brief flicker when initially booting.

This laptop has a newish CPU (Intel i7-12700H). After doing the stuff in the wiki trying to get Optimus/Prime working, it still wouldn’t boot to a graphical environment, which seemed to be related to the newish CPU with newish Intel integrated graphics. From the journalctl log:

i915 0000:00:02.0: Your graphics device 46a6 is not properly supported by the driver in this kernel version. To force driver probe anyway, use i915.force_probe=46a6 module parameter or CONFIG_DRM_I915_FORCE_PROBE=46a6 configuration option, or (recommended) check for kernel updates.

I tried adding this recommended modprobe option in boot.extraModprobeConfig. I also found some other posts from folks with various problems on other distros and other laptops with this same CPU, and I ended up with one extra kernel param. I’m not sure if that is needed, but it’s listed down below.

After all of this, I was quite relieved to see the graphical environment load on the laptop and 3 of the external monitors. I have two more external monitors that I was driving using DisplayLink on the old (Windows) laptop, but I think the new laptop can drive them just using Thunderbolt. Otherwise I’ll have to try to get DisplayLink working on NixOS.

Anyway, here are some excerpts from my current configuration.nix, in case anyone finds that helpful or notices something that doesn’t look right. Interestingly, I think that if I didn’t take out services.xserver.displayManager.sddm.enable out, then it did not work loading a graphical environment (I think that was in there from the installer’s default config, but can’t remember).

  # configuration.nix
  boot.kernelParams = [
    "i915.enable_psr=0" "loglevel=3"
  ];
  boot.extraModprobeConfig = ''
    options i915 force_probe=46a6
  '';

...

  hardware.nvidia = {
    package = config.boot.kernelPackages.nvidiaPackages.stable;
    modesetting.enable = true;
    powerManagement.enable = true;
    prime = {
      offload.enable = true;
      intelBusId = "PCI:0:2:0";
      nvidiaBusId = "PCI:1:0:0";
    };
  };

...

 services.xserver = {
    enable = true;
    videoDrivers = [ "nvidia" ];
    desktopManager = {
      plasma5.enable = true;
    };
    layout = "us";
    xkbVariant = "";
    dpi = 96;
  };
1 Like

You could also consider doing that. NixOS ships multiple kernel versions, among which “latest”, and you can flip between them with boot.kernelPackages.

The default is usually a few versions behind, especially on stable, like with most distros.

Using a very new kernel sometimes makes the nvidia drivers fail to compile, but I keep an eye out for that and usually backport fixes pretty quickly.

Thank you!
This was very helpful. I struggled with getting nvidia drivers to run on my TUXEDO InfinityBook Pro 14 (Gen7).
In my case the kernelParams are not needed.
I uploaded the config as a gist.