I have difficulty in setting up my laptop’s nvidia card and external displays.
Currently through the forum I have collected a few different approaches to this problem:
nouveau driver
dom0 with nvidia driver
sys-gui-gpu with nvidia driver
What I did
nouveau does not work as content does not appear on external displays but just mouse pointer is visible. This is weird, I am curious why the driver fails… maybe it is fixable.
dom0 with nvidia driver
(later i found a similar story in this thread [qubes-users] nVidia binary in dom0 (ThinkPad P1 gen4))
a. I have tried first 455.45.01 (on the 5.10.109 kernel) from the cuda repos in Index of /compute/cuda/repos/fedora32/x86_64
This was not successful with the Failed to allocate shared surface error.
b. Then I tried 510.47.03 (on the 5.16.18 kernel) from the Index of /compute/cuda/repos/rhel8/x86_64
The error was Push buffer DMA allocation failed
I have run strace on it to see what system calls it’s making. ioctl(31, DRM_IOCTL_I810_GETAGE or DRM_IOCTL_R128_CCE_IDLE or DRM_IOCTL_RADEON_CP_IDLE, 0) = -1 EINVAL (Invalid argument)
This was the only ioctl that was getting an error.
the 31 corresponds to /dev/dri/renderD128: openat(AT_FDCWD, "/dev/dri/renderD128", O_RDWR|O_CLOEXEC) = 31
The error code suggests that the ioctl argument is invalid.
At this point I can’t move forward because I don’t know any details on the ioctl communication, but will send an email to nvidia support. Hopefully someone reads this.
this assumes, that your external monitor is left of your main monitor.
Maybe you can configure it with the xfce gui, but i have it fail on me.
If you want a gui and the xfce one is failing on you, you can install arandr in dom0 with sudo qubes-dom0-update arandr.
Other than that: If it can display your mouse, it can display anything, but maybe the background image is black. The bar is only displayed on one screen per default. This can be changed in its settings.
Try opening a window on your main monitor and drag it to the external one.
dom0 with nvidia driver is not successful. See the error messages.
Thanks for the randr stuff. This is for the nouveau case I think. Using something other than xfce display panel is typically useful to me. However, the issue i am facing, I wish it could be as simple as it sounds, but it is not , the external screen is connected but is blank, and even while dragging windows to the screen what you can see is the mouse pointer but not the window and/or any graphics.
In my current config where I am trying to play with nouveau, no, I can’t get those results again.
I decided to try again with nouveau only. Now I have only the nouveau driver running. And surprisingly, my external monitor connections worked beyond my expectations.
The laptop bios had a discrete video only option. I enabled it so it is no longer hybrid.
Blacklisted i915 and nvidia.
Removed nouveau-firmware as it loads an irrelevant firmware (I do not recall at the moment if qubes provided that package or i installed it from rpmfusion later )
added nouveau into dracut.conf as a forced dependency and generated a new initrd using --force.
Now both displays boot mirroring each other, and xfce4-display-settings and other tools work fine to arrange the layouts.
I will test this config, as it is sufficient for my daily workload.
Thanks @Suspicious_Actions as your question triggered me to check my setup again