I have just reinstalled nixos installation on my old Surface Book 2, and after this my external monitor is no longer discovered. This is strange since it was discovered fine on the old installation.
Some facts:
The external monitor is connected through one of the mini display ports on the surface dock witch is connected to the computer with the Microsoft propriety magnetic connector. DisplayLink in not involved.
Screen works fine in windows (dual boot)
I have tried another screen and another cable without success.
xrandr -q do not show the screen at all.
I can find the ports of the dock under /sys/class/drm, and if i write “on” to the “status” file the screen starts up, but un-configured and not persistent.
The SB2 is equipped with a HD Graphics 620 integrated GPU and a NVIDIA GeForce GTX 1050 discrete GPU.
I’m on Nixos 24.11 now but i have tried to revert to 24.05, and even the early 24.5 releases to see if the problems is related to changes, but the problem persists there as well.
I don´t have the linux surface kernel installed now, but i have tried with and without. Before the reinstall the screen worked fine with both.
On Plasma 6 now, and have tried Gnome as well.
My nixos is a clean install now with a “vanilla” configuration.nix as of now. Nvidia card not configured. I’ve had the nvidia dgpu configured (prime) before.
This is a real mystery to me. What have changed since my original nixos install?
I’m fairly new to Nixos, and may have missed something obvious. I would really appreciate some pointers on how to research this further.
I’d suspect this being the issue; Normally the internal monitor is connected to the iGPU, and the external port to the dGPU. They can share data via a mux, but the dGPU needs a driver to take your screen data and put it on the monitor.
IME nouveau can handle it sometimes, but your card is quite old and among the ones that don’t have as much implemented in firmware (read: don’t have a GSP), so maybe nouveau isn’t sufficient here.
Thanks for the reply!
Sorry, I see I was a bit unclear. I have tested with the nvidia card configured. It was just not configured at the time of writing because i started fresh with a new install.
Just to be sure i configured it again with this config:
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = false; #Tried true, did not help
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Enable dynamic boost
#dynamicBoost.enable = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.production; #
};
# Enable dual GPU
hardware.nvidia.prime = {
# Enable Sync mode
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:2:0:0";
};
Same problem still unfortunately.
What you said gets me thinking though. If the nvidia configuration can effect external screens, maybe there has been a change in the nvidia drivers that is relevant to this? Maybe i should try another nvidia driver version?