Xorg scaling, dualscreen, DPI, Intel chipset and slow OpenGL

Everything about X, Gnome, KDE, ... and everything running on it

Xorg scaling, dualscreen, DPI, Intel chipset and slow OpenGL

Postby nabajour » 2019-07-16 10:16

Hi,

I have a weird issue with sluggish opengl on part of a screen on debian unstable. I noticed it using Kitty terminal, and confirmed it with glxgears. I use a dualscreen setup and glxgears FPS drops when moving the window to a certain portion of the screen.

Hardware setup:
    Dell XPS13 9360, with a 4K screen (3800x1800), 276dpi on eDP-1
    Asus HD screen connected through thunderbolt. (1920x1080), 96 dpi. on DP-1

To avoid dpi issues in dualscreen setup, I scaled the image on the asus screen by a factor of two. From what I understand, the image is then drawn at twice the resolution and scaled by a factor of two before rendering on the screen. This way, I can define one DPI size and a font size for applications and I get about the same UI elements and font size on both screens and can move windows from one screen to the other.

I use this xrandr command to setup the two screens:
Code: Select all
xrandr --output DP-1 --scale 2x2 --fb 7040x2160 --pos 0x0 --left-of eDP-1 --mode 1920x1080; xrandr --output eDP-1 --pos 3840x0 --dpi 276.05x276.05


This works fine, other than OpenGL rendering, which seems to get pretty sluggish when moving the window to certain portions of the external screen. It seems that when it gets outside of the about half the screen horizontally and vertically, it gets slow. (like switching from hardware to software rendering outside of the scaled portion of the image)

I don't know where to start looking for clues on the issue, as I'm not an expert in Xorg and DRI.

Any suggestion are welcome. And if you need more info, please ask.

Thanks,

nab
nabajour
 
Posts: 6
Joined: 2013-05-02 19:21

Re: Xorg scaling, dualscreen, DPI, Intel chipset and slow Op

Postby ruwolf » 2019-07-16 11:54

User avatar
ruwolf
 
Posts: 392
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: Xorg scaling, dualscreen, DPI, Intel chipset and slow Op

Postby nabajour » 2019-07-23 08:38

Hi, thanks for the answer.

I had a look at it, but nothing that exactly matches what I observe.

I seem to have the correct intel driver, and direct rendering is working. And it's working correctly on the main screen, and on most of the second screen.

But if I drag glxgears around on the second screen, which is scaled by a factor of two to have the DPI matching the main screen, I get the FPS dropping when the window crosses the middle of the screen, both vertically and horizontally. It feels like the 3d acceleration only works on a part of the image in memory that matches the physical resolution of the screen.

I don't know if it's a bug, or a physical limitation of the graphics card and the rendering pipeline. In the mental image I have of this, it should do accelerated rendering into a memory buffer, and then scale the image before drawing it on the screen, so I don't understand this limitation and how to get around it if it's possible.

Thanks,

nab
nabajour
 
Posts: 6
Joined: 2013-05-02 19:21

Re: Xorg scaling, dualscreen, DPI, Intel chipset and slow Op

Postby nabajour » 2019-07-30 09:29

From what I understand, it's using the Xorg "modeset" driver, which should use the kernel intel driver. It looks like Debian encourages this use, instead of the Xorg intel driver.

Note that running glxgears maximised works at full FPS. Looks like when I move the window around and the top left corner moves past half the screen on the scaled display, the frame rate drops.
nabajour
 
Posts: 6
Joined: 2013-05-02 19:21

Re: Xorg scaling, dualscreen, DPI, Intel chipset and slow Op

Postby nabajour » 2019-07-30 09:47

Creating an Xorg hint file to force Xorg to use the intel Xorg drive seems to fix the issue ( /etc/X11/xorg.conf.d/20-intel.conf )

Code: Select all
Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
EndSection


So it looks like an issue with the KMS infrastructure...
nabajour
 
Posts: 6
Joined: 2013-05-02 19:21


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable