This install the driver, yes, but for the first 30 seconds it shows tty1 (frozen) and then switches to tty7. Gnome on tty7 is also frozen and I therefore cannot login. The screen is frozen for maybe 10 minutes at a time, unfreezes for 5 seconds and then is frozen for 10 minutes again. This repeats.
After it has initially switched to tty7, I can freely switch to tty1 and use the terminal (unfrozen thankfully!).
Using tty1 I can login and see the nvidia driver is installed, at least according to nvidia-smi:
$ nvidia-smi
NVIDIA-SMI 470.256.02 Driver Version: 470.256.02 CUDA Version: 11.4
GPU Name Persistence-M
Fan Temp Perf Pwr:Usage/Cap
0 NVIDIA GeForce ... Off
10% 45C P8 N/A / N/A
Bus-Id Disp.A
Memory-Usage
00000000:08:00.0 N/A
93MiB / 978MiB
Volatile Uncorr. ECC
GPU-Util Compute M.
MIG M.
N/A
N/A Default
N/A
Processes:
...
No running processes found
(sorry for the nvidia-smi formatting, I had to manually type it out!)
What steps can I take to resolve the issue of Gnome on tty7 freezing and also install the nvidia driver?
If you also have an integrated GPU then Gnome might be forcefully trying to use the Nvidia driver as reported in this issue and that could be causing issues since the driver is pretty outdated.
You can forcing it to use the integrated GPU by default and see if that fixes it:
environment.variables = {
# Use integrated GPU for gnome-shell
# See https://gitlab.gnome.org/GNOME/mutter/-/issues/2969
__EGL_VENDOR_LIBRARY_FILENAMES = "${pkgs.mesa.drivers.outPath}/share/glvnd/egl_vendor.d/50_mesa.json";
__GLX_VENDOR_LIBRARY_NAME = "mesa";
# Choose your correct Vulkan icd loader
VK_DRIVER_FILES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json";
# VK_DRIVER_FILES = "/run/opengl-driver/share/vulkan/icd.d/intel_icd.x86_64.json";
};
If you don’t have an integrated GPU or if that doesn’t work, does this still happen when you don’t use the proprietary drivers? I believe the open source nouveau drivers are enabled by default, so you just need to remove the hardware.nvidia block to test it.
I only have the dedicated GPU and the DVI video cable is directly connected to it.
If I remove the hardware.nvidia = {...} block and also remove the services.xserver.videoDrivers = [ "nvidia" ];. It still launches in tty1 and is frozen for around 30 seconds. However, after switching to tty7 i can actually log in with gnome.
It boots to tty1, freezes for 2 minutes and when it finally automatically switches to tty7 the screen resolution is very long and i cannot open gnome settings, alacritty nor any other installed terminal. Firefox works fine, but the mousepointer loading icon leaves artifacts across the screen.
If i then enable the mode setting option (modesetting.enable = true;) in the hardware.nvidia block. I get the previous error where i cannot login with tty7 and gnome.
Can you try with the proprietary drivers again but with nouveau blacklisted?
boot.extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';
Also, you can run nvidia-bug-report.sh in tty1 then switch to tty7 to collect more information. After some time, it should create a log file in the same directory.
Something else you might want to try. Apparently gdm default to using Wayland instead of X11, but that might cause issues with the 470 drivers. Does Gnome still freeze with services.xserver.displayManager.gdm.wayland = false; ?
If it’s too long you can maybe split it and paste those separately to pastebin. If you can see something interesting like an error or something that would make it easier to only include relevant parts.
That said, you should try setting Wayland to false for gdm first.
Just as a general Gnome tip, you can apply the dynamic triple buffering patch, which will give you better performance. The only downside is you’d have to re-compile mutter each time it’s updated or if you update the patch, but that doesn’t happen that frequently, thankfully.
Hope you have a great time configuring your system