Upgrading GPU in a NixOS machine

Unfortunately, I’m currently using an nvidia GPU. I got a used AMD card of ebay, it seems to be in very good condition, but when I put it in my computer things started to go south. In essence, I would get a blackscreen after the BIOS. (Not a loss of signal where the monitor powers off, but a signal of a black screen)

I’m still not sure what the problem is, but I was wondering if there was any way that NixOS might have something to do with it?

More generally, is there potential for problems when switching out hardware in a NixOS machine, like having to re-generate hardware.nix somehow?

1 Like

Run nixos-generate-config --show-hardware-config, and add anything under boot to your configuration.nix. Also set services.fwupd.enable = true;, then reboot. Finally RTFM here Nvidia - NixOS Wiki and fwupd - ArchWiki. After you should have a better idea of what your doing. Good luck!

Thank you for your response.

I enabled fwupd successfully, but nixos-generate-config --show-hardware-config gives me an error (Failed to retrieve subvolume info for /) which I suspect is due to using btrfs.

It seems as if my power supply might be the reason for my problems, so I’ll wait until I get a new one to try switching GPUs again.

Running nixos-generate-config --show-hardware-config --no-filesystems should get around that error. Or use --root=/<rootfs_subvol> if you ever need it.

1 Like