Thank you, once again, @nrdxp.
I changed my config so that Optimus PRIME Option B: Sync Mode
is chosen. Then, I started up Hyprland
and ran glxinfo | egrep "OpenGL"
to check what GPU was active (I got some help from this page). The result I got was:
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Interl(R) HD Graphics 630 (KBL GT2)
You wrote that:
Prime Sync … routes all graphics through the Nvidia card but presents it through the Intel display buffer so it will actually show on the laptop screen.
Still, I assumed I should have seen NVIDIA in the above result, if that card was active. So, to me it seems like I have not managed to activate the NVIDIA GPU.
When I start nvidia-settings
, no card shows up in the menu.
As well, running nvidia-smi
, I get:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
lspci -vnnn
outputs:
Kernel driver in use: nouveu
Kernel modules: nvidiafb, nouveau
Something I find strange, that I though I was using the proprietary NVIDIA driver, and not the open source nouveau driver. How can I specify to a proprietary NVIDIA driver, instead of nouveau?
For a Linux newbie this is not super easy. The NixOS learning curve is steep indeed.
UPDATE: OK, I am a beginner. It shows as I did not think of having to do a reboot for the effects taking place. I suddenly realised that it might be needed. After I rebooted my system, I now get the following values for the NVIDIA GPU:
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
Running nvidia-smi
my card is listed, and when I open nvidia-settings
I also see my card.
Here is my latest configuration.nix.
So, it looks like my problem is solved. Thanks a lot for great help, @nrdxp. I will set your first answer as the solution, even though the second one also contained great info.