Fermi architecture GPUs on NixOS

Having installed NixOS on my fresh SSD I wanted to get my GPU (NVIDIA GT 635M) working. I have thus far failed, even after reading through the wiki page and multiple posts here on Discourse.

The current state of the machine (I am on Wayland, running Niri as my compositor):

# hardware config
# Slightly altered and reorganised hardware config
# for my Asus K75VJ laptop
{ config, lib, pkgs,  ... }: {
  # Kernel
  boot.kernelPackages = pkgs.linuxPackages_6_12;
  boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "ums_realtek" "usb_storage" "usbhid" "sd_mod" ];
  boot.kernelModules = [ "kvm-intel" ];
  # These are likely not needed(?)
  # They are leftovers from my attempts to fix this issue
  boot.initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_drm" "nvidia_uvm" ];
  boot.kernelParams = [ "nvidia-drm.modeset=1" ];

  # Bootloader
  boot.loader.limine.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  # Networking and file system stuff here
  # ... 

  # Hardware
  hardware.enableRedistributableFirmware = true;
  hardware.graphics.enable = true;
  hardware.nvidia = {
    open = false;
    # The latest driver supporting my GPU
    package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
    nvidiaSettings = true;
    prime = {
      sync.enable = true;

      intelBusId = "PCI:0@0:2:0";
      nvidiaBusId = "PCI:1@0:0:0";
    };
  };
  services.xserver.videoDrivers = [ "nvidia" ];

  # Audio. Also not working but this is a topic for another post
  # ...

  # CPU
  nixpkgs.hostPlatform = "x86_64-linux";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
$ lspci -nnk | grep -A2 -e VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
	DeviceName:  Onboard IGD
	Subsystem: ASUSTeK Computer Inc. Device [1043:10bc]
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108M [GeForce GT 635M] [10de:0de3] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device [1043:10bc]
	Kernel driver in use: nvidia
$ nvidia-smi
Tue Sep 22 11:24:47 2026       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.157                Driver Version: 390.157                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GT 635M     Off  | 00000000:01:00.0 N/A |                  N/A |
| N/A   45C    P8    N/A /  N/A |      0MiB /  1985MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+

As seen above, nvidia-smi does detect my GPU, and yet declares most of the readings N/A. Running nvidia-settings doesn’t display the GUI, instead exiting after

$ nvidia-settings

ERROR: Unable to find display on any available system
$ inxi -Gx
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: ASUSTeK driver: i915
    v: kernel arch: Gen-7 bus-ID: 00:02.0
  Device-2: NVIDIA GF108M [GeForce GT 635M] vendor: ASUSTeK driver: nvidia
    v: 390.157 arch: Fermi bus-ID: 01:00.0
  Display: wayland server: X.org v: 1.21.1.24 compositor: niri driver:
    gpu: i915,nvidia resolution: 1600x900~60Hz
  API: EGL v: 1.5 drivers: crocus platforms: active: wayland,x11,surfaceless
    inactive: gbm
  API: OpenGL v: 4.2 vendor: intel mesa v: 26.1.5 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel HD Graphics 4000 (IVB GT2)
  API: Vulkan v: 1.4.341 drivers: intel,llvmpipe surfaces: N/A devices: 2
  Info: Tools: api: eglinfo, glxinfo, vulkaninfo
    gpu: nvidia-settings,nvidia-smi x11: xprop,xrandr

Any and all help would be greatly apppreciated

Do you want any output routed to the dGPU working, do you want the GPU working with Nvidia drivers, or do you want it working at all? I think do-nothing (striking out any mention of nvidia in configuration) has pretty good chances to have it working with Nouveau, OpenGL + Vulkan. Should work better in terms of accessing extra outputs. Might be slower than «CUDA under ideal conditions».

I’d like to have it work at all, since so far I had no luck with even that.
I’ll have at it some more tomorrow, since one of the other issues I had seemingly resolved itself (or rather I found an idiotic workaround for ot)

For more context, this is a laptop GPU specifically.
I’ll try deleting anything nvidia related but hardware.graphics.enable and we’ll see how it goes, though I’m fairly sure I tried that already

Make sure to use nixos-rebuild boot and then reboot your system to test the changes.

Hm, it looks like my T550 GPU is indeed newer (Fermi 2?) but before I was using Nouveau with a much older GPU.

I have no clue about gotchas of nvidia driver, for Nouveau I would look in dmesg for complaints about firmware. All of firmware at once is a lot, so you might need to include the specific missing files into initramfs.

Update:
Removing everything but the hardware.graphics.enable line resulted in the system using the Nouveau drivers, however it still doesn’t work :confused:
lspci -nnk reports the GPU properly:

$ lspci -nnk
...
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108M [GeForce GT 635M] [10de:0de3] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device [1043:10bc]
	Kernel driver in use: nouveau
	Kernel modules: nvidiafb, nouveau
...

dmesg does report the Nouveau driver had an issue with loading the firmware, though the error tells me nothing. All nvidia/nouveau logs here:

$ dmesg
[   16.046697] nouveau 0000:01:00.0: enabling device (0006 -> 0007)
[   16.047472] nouveau 0000:01:00.0: NVIDIA GF108 (0c1180a1)
[   16.077088] nouveau 0000:01:00.0: bios: version 70.08.be.00.13
[   16.185485] nouveau 0000:01:00.0: fb: 2048 MiB DDR3
[   16.244902] nouveau 0000:01:00.0: drm: VRAM: 2048 MiB
[   16.244906] nouveau 0000:01:00.0: drm: GART: 1048576 MiB
[   16.244909] nouveau 0000:01:00.0: drm: TMDS table version 2.0
[   16.245636] nouveau 0000:01:00.0: drm: failed to create ce channel, -22
[   16.269195] nouveau 0000:01:00.0: drm: MM: using M2MF for buffer copies
[   16.270580] [drm] Initialized nouveau 1.4.0 for 0000:01:00.0 on minor 1
[   16.281277] nouveau 0000:01:00.0: drm: [DRM/00000000:kmsOutp] [LOAD_DETECT data:00000154] load:07 (ret:7)
[   16.283089] nouveau 0000:01:00.0: [drm] fb1: nouveaudrmfb frame buffer device
[   16.296045] nouveau 0000:01:00.0: drm: [DRM/00000000:kmsOutp] [LOAD_DETECT data:00000154] load:07 (ret:7)
...
[  161.822265] nouveau 0000:01:00.0: drm: [DRM/00000000:kmsOutp] [LOAD_DETECT data:00000154] load:07 (ret:7)
[  410.616136] r8169 0000:02:00.0: invalid VPD tag 0xff (size 0) at offset 0; assume missing optional EEPROM
[  485.100377] nouveau 0000:01:00.0: Direct firmware load for nouveau/nvc1_fuc084 failed with error -2
[  485.100401] nouveau 0000:01:00.0: Direct firmware load for nouveau/nvc1_fuc084d failed with error -2
[  485.100403] nouveau 0000:01:00.0: msvld: unable to load firmware data
[  485.100407] nouveau 0000:01:00.0: msvld: init failed, -19

On a new fresh boot dmesg seems to indicate no errors on the Nouveau side, except for failing to create a ce channel

[   15.617273] nouveau 0000:01:00.0: drm: VRAM: 2048 MiB
[   15.617283] nouveau 0000:01:00.0: drm: GART: 1048576 MiB
[   15.617290] nouveau 0000:01:00.0: drm: TMDS table version 2.0
[   15.618014] nouveau 0000:01:00.0: drm: failed to create ce channel, -22
[   15.639447] nouveau 0000:01:00.0: drm: MM: using M2MF for buffer copies
[   15.640868] [drm] Initialized nouveau 1.4.0 for 0000:01:00.0 on minor 0
[   15.647480] usb 2-1.1: new full-speed USB device number 5 using ehci-pci
[   15.651549] nouveau 0000:01:00.0: drm: [DRM/00000000:kmsOutp] [LOAD_DETECT data:00000154] load:07 (ret:7)
[   15.852628] Console: switching to colour frame buffer device 200x56
[   15.872234] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[   15.872525] nouveau 0000:01:00.0: [drm] fb1: nouveaudrmfb frame buffer device
[   15.883809] vga_switcheroo: enabled
[   15.899490] nouveau 0000:01:00.0: drm: [DRM/00000000:kmsOutp] [LOAD_DETECT data:00000154] load:07 (ret:7)

With possibly-good boot, what do you have in /dev/dri?

ETA: also in /sys/class/drm/

$ ls -lg /dev/dri
total 0
drwxr-xr-x  2 root        140 Sep 23  2026 by-path
crw-rw----+ 1 video  226,   0 Sep 23  2026 card0
crw-rw----+ 1 video  226,   1 Sep 23  2026 card1
crw-rw-rw-  1 render 226, 128 Sep 23  2026 renderD128
crw-rw-rw-  1 render 226, 129 Sep 23  2026 renderD129
$ ls -lgL /sys/class/drm
total 0
drwxr-xr-x 4 root    0 Sep 23  2026 card0
drwxr-xr-x 3 root    0 Sep 23  2026 card0-VGA-2
drwxr-xr-x 9 root    0 Sep 23  2026 card1
drwxr-xr-x 5 root    0 Sep 23  2026 card1-DP-1
drwxr-xr-x 3 root    0 Sep 23  2026 card1-HDMI-A-1
drwxr-xr-x 4 root    0 Sep 23  2026 card1-LVDS-1
drwxr-xr-x 3 root    0 Sep 23  2026 card1-VGA-1
drwxr-xr-x 3 root    0 Sep 23  2026 renderD128
drwxr-xr-x 3 root    0 Sep 23  2026 renderD129
-r--r--r-- 1 root 4096 Sep 23 17:40 version

Which is decidedly different than before, where only one renderer was present

It seems to be working now, somewhat? At least when running with DRI_PRIME=1

$ glxheads :0
Name: :0
  Display:     0x6027de345e10
  Window:      0x600002
  Context:     0x6027de3e3400
  GL_VERSION:  4.2 (Compatibility Profile) Mesa 26.1.8
  GL_VENDOR:   Intel
  GL_RENDERER: Mesa Intel(R) HD Graphics 4000 (IVB GT2)
$ DRI_PRIME=1 glxheads :0
Name: :0
  Display:     0x5c1d93913e10
  Window:      0x600002
  Context:     0x5c1d939b0fd0
  GL_VERSION:  4.3 (Compatibility Profile) Mesa 26.1.8
  GL_VENDOR:   Mesa
  GL_RENDERER: NVC1

So I guess, success?

Apparently not success, as the “failed to load firmware” messages still pop up in dmesg
xrandr now also displays a second, non-existing monitor?..

$ xrandr
WARNING: running xrandr against an Xwayland server. See the xrandr man page for details.
Screen 0: minimum 16 x 16, current 2624 x 900, maximum 32767 x 32767
LVDS-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 380mm x 210mm
   1600x900      59.95*+
   1152x864      59.96  
   ...
VGA-1 connected 1024x768+1600+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      59.92*+
   800x600       59.86
   ...

NixOS Search and NixOS Search seem relevant to take the necessary firmware paths out of the full Linux firmware collection. (I say «seem relevant» because I am on a non-NixOS but fully Nixpkgs-backed setup)

I think without fixing firmware loading it will be hit-and-miss in terms of weirdly not working things.

xrandr on XWayland sounds like a pain… Is any of Wayland-specific input status listers available for your setup (I am on Xorg so I am not up to date on Wayland basic functionality compatibility matrix)?

Thanks for the links! I’ll look at them as soon as possible

As for native Wayland output listening, the window manager I use (Niri), has an IPC implemented, and as a part of that it has an output listing feature. It returns the same thing, showing two outputs being available

Hm OK, maybe Niri does layout data pasthrough better than others then.

The phantom monitor is on VGA output of Nvidia GPU as far as I understand, and analog output requiring proper firmware wouldn’t surprise me, so I guess let’s fix firmware loading first.

I guess let’s fix firmware loading first.

Searching around the internet for the solution I have found a section on freedesktop’s Nouveau guide detailing how to acquire the firmware files. I decided to try and making a Nix package for it using the 340.108 version of the files provided by NVIDIA, but the NVIDIA extractor script is absolutely terrible (for example it keeps trying to print to stdout even if I give it its --silent flag) and I have not got it working yet

In the meantime, for testing I have looked for how to use VGA switcheroo and managed to actually switch to the dGPU output! It was a black screen and when I managed to switch back the output didn’t return (but the backlight lit up again!)

Oh it does look like you have the inconvenient generation of the GPU (I only need linux-firmware package)

Yeah, I looked at what firmwares linux-firmware provides and there is a big gf108 shaped hole in the nvidia subdirectory :stuck_out_tongue:

I’ll have a closer look at this either tonight or after the weekend

Because I was curious what with this issue so I wrote into Google “NVIDIA GT 635M Linux drivers nixos”

And answer is - you have monument not computer and I think better install other distro but there you’ll have problems too.

For this old driver is needed old kernel or nouveau

__________

# allow unfree

nixpkgs.config.allowUnfree = true;

# old kernel

boot.kernelPackages = pkgs.linuxPackages_6_1; # or pkgs.linuxPackages_5_15

# XServer driver

services.xserver.videoDrivers = [ “nvidia” ];

hardware.graphics = {

enable = true;

};

hardware.nvidia = {

open = false;

nvidiaSettings = true;

# legacy 390

package = config.boot.kernelPackages.nvidiaPackages.legacy_390;

};

But trust me your computer it’s just ready to trash. :wastebasket: :wastebasket: :wastebasket: :wastebasket:

Hi. If you took the time to read the post, you’d know that almost the exact snippet that you sent was already present initially in configuration, as I did search for information on the topic before coming to this forum. And if you read the post, you’d find that that didn’t work

I am aware that my hardware is quite old, nevertheless it’s the newest that I have. It’s not going to change anytime soon, so I make due with what I have.

Feeding my question through an LLM

… is something I find quite rude and disrespectful. If I had wanted help from an LLM I would reach for it myself, and yet I didn’t. Because I find the idea of relaying on output generated by a huge language predictor to be a terrible idea, and I oppose their use wholeheartedly.

If my suspicion is incorrect and you hadn’t used an LLM in your response, then I apologise, but the random switch from English to Polish in the middle of your ill-formated message leads me to believe you have done so

But alas, this is off topic

You have 6.12 kernel - you can try oldest (6.1 or 5.15) if not you can try Fedora or Windows .

Your computer it’s Intel+Nvidia so idk why nix. Try Garuda or if you are insane void Linux. Nix it’s Linux kernel and nothing else. Your hardware is not supported.