I’ve tried to switch to dGPU as a primary display adapter with the following configuration file:
Section "ServerLayout"
Identifier "layout"
Screen 0 "dGPU"
Option "AllowNVIDIAGPUScreens" "1"
EndSection
Section "Device"
Identifier "iGPU"
Driver "modesetting"
BusID "pci:00:02:00"
EndSection
Section "Screen"
Identifier "iGPU"
Device "iGPU"
EndSection
Section "Device"
Identifier "dGPU"
Driver "nvidia"
EndSection
Section "Screen"
Identifier "dGPU"
Device "dGPU"
EndSection
After writing this configuration to the /etc/X11/xorg.conf.d/gpu.conf and restarting Xorg session (log out and log in again) I’ve found, that there is no freezes while running glxgears, running on discrete GPU. So I’m sure, that low-level discrete GPU driver and rendering engine works as expected in all configuration. But in latter configuration there is no lines with AIGLX string in /var/log/Xorg.0.log. This is the most significant difference. So I’m almost sure, that the root of freezes in “Reverse PRIME” mode lays in Xorg AIGLX implementation or NVIDIA driver interaction with AIGLX.
There is an issue in above setup - it has more laggy GUI and slowly interface rendering. F.e. scrolling in Firefox is not so smooth, as with Intel GPU. I’m very supprised, that Intel integrated GPU with generic modesetting driver is running faster and smoothly than NVIDIA powerful discrete adapter with proprietary drivers. :-\


