Modesetting GPU offloading from UDL to Intel, glxgears runs at 1fps
After !335 (merged) , !336 (merged) and !337 (merged) I can use an USB DisplayLink device on DISPLAY=:0.2 with the modesetting driver for both the main Intel device and the USB one. I just learned about Reverse Prime, so I have tried:
Section "Screen"
...
Device "Intel2"
GPUDevice "UDL"
...
EndSection
This is counter-intuitive, since the "Device" should be the framebuffer to render on and the GPU hardware should be the "GPUDevice". Also, I need to manually enable the DVI-I-1-1 output. Xorg.0.log shows:
[ 7812.889] (II) modeset(0): using drv /dev/dri/card1
[ 7812.889] (II) modeset(1): using drv /dev/dri/card1
[ 7812.889] (II) modeset(2): using drv /dev/dri/card1
[ 7812.889] (II) modeset(G0): using drv /dev/dri/card0
...
[ 7813.526] (II) AIGLX: Loaded and initialized i965
[ 7813.526] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 7813.538] (II) AIGLX: Loaded and initialized i965
[ 7813.538] (II) GLX: Initialized DRI2 GL provider for screen 1
[ 7813.550] (II) AIGLX: Loaded and initialized i965
[ 7813.550] (II) GLX: Initialized DRI2 GL provider for screen 2
So, all 3 screens are using the i965 driver for GL. Almost everything is running nicely, but I noticed the glxgears is synced to the monitor refresh rate on DISPLAY=:0.0 and DISPLAY=:0.1 but it's throttled to 1fps on DISPLAY=:0.2 after the first 5 second report:
# DISPLAY=:0.2 glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
639 frames in 5.7 seconds = 112.047 FPS
6 frames in 6.0 seconds = 1.000 FPS
6 frames in 6.0 seconds = 1.000 FPS
6 frames in 6.0 seconds = 1.000 FPS
...
Xorg and glxgears are using less than 10% CPU in the first 5 seconds, then they disappear from "top".
With the reverse setup:
Section "Screen"
...
Device "UDL"
GPUDevice "Intel2"
...
EndSection
the result is that the UDL device is woken up automatically but DISPLAY=0.2 gets "swrast" as the GL driver and glxgears is synced to the monitor refresh rate. Now Xorg and glxgears are using 55-65% CPU each in this case.
I would like to see the best of both: the UDL device woken up automatically and the GL rendering doesn't get throttled to 1fps.