You are not logged in.

#1 2021-10-13 13:47:26

dd3f
Member
Registered: 2014-10-02
Posts: 11

[Solved] Xrandr scale 2 on external monitor=>huge drop in performances

Hi,
I use i3 in a laptop  dell xps 3570. I have the nvidia card disabled.

Before a recent update of the entire system, I used to plug my external monitor and simply run

xrandr  --output DP-3 --mode 2560x1080 --scale 2x2 --right-of eDP-1 --rate 60.00

for completeness xrandr --listmonitors gives:

Monitors: 2
 0: +*eDP-1 3840/344x2160/194+0+0  eDP-1
 1: +DP-3 5120/798x2160/334+3840+0  DP-3

Now, when I have two windows next to each other in the external screen (for example firefox or even alacritty), any operation on the one on the right is very very slow making the second screen completely unusable. With any operation I mean scroll or even write on the alacritty terminal. 
I find that if I set --scale 1 everything goes back to normal. However, since the laptop screen is HiDPI, without scaling everything looks huge.
Oddly enough, if on the right I have a terminal like terminator, it works completely fine. So i have no idea how to debug it or correct it.

Any suggestion?
Please let me know if you need any log or a video of the problem for understanding better the issue.

Last edited by dd3f (2021-10-16 10:43:09)

Offline

#2 2021-10-14 09:19:08

dd3f
Member
Registered: 2014-10-02
Posts: 11

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

After some tests, I realized that I get the same problem also with xfce. Actually the slow down happens when a window (alacritty) crosses about (virtual) pixel 6400.
When I scale the second screen  I get virtual screen  with 8960 pixels in total. Beyond pixel 6400 seem to start the issues.

Screen 0: minimum 320 x 200, current 8960 x 2160, maximum 16384 x 16384
eDP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
     3840x2160     60.00*+  59.98    59.97
DP-3 connected 5120x2160+3840+0 (normal left inverted right x axis y axis) 798mm x 334mm 
     2560x1080     59.98*+  74.99    50.00

what can I check?

Offline

#3 2021-10-14 20:19:34

seth
Member
Registered: 2012-09-03
Posts: 23,983

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

I guess if you move DP-3 to "--pos 0x0" the problem doesn't exist?

Offline

#4 2021-10-15 08:33:43

dd3f
Member
Registered: 2014-10-02
Posts: 11

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

Hi seth, thank you! I tested and  if I move it to 0x0 the problem does not appear. However the two screens overlap. If then I move on the right side the laptop, namely:

eDP-1 connected primary 3840x2160+5120+0 
   3840x2160     60.00*+  59.98    59.97
DP-3 connected 5120x2160+0+0
   2560x1080     59.98*+  74.99    50.00

the problem appears again on the external large screen (DP-3, the one scaled). So my guess, that the limit was pixel 6400, was not correct. What can generate the problem?
Alacritty uses openGL ... maybe firefox also tries to use the graphical acceleration... could it be the problem linked to this on a scaled screen?

Last edited by dd3f (2021-10-15 08:34:39)

Offline

#5 2021-10-15 10:24:47

seth
Member
Registered: 2012-09-03
Posts: 23,983

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

However the two screens overlap.

That was the point.

I think you're running into HW limitations w/ the extended dimensions (eg. texture/shader support limited to 8192x8192 and then resorting to software)
You can try moving the right screen into a partial overlap (so the combined width remains <= 8192) or arrange them vertically (5120x4320)

Do you run some sort of compositor? (picom, or one built into the WM of your desktop environment)

Lastly, please post an xorg log, https://wiki.archlinux.org/title/Xorg#General so that we can rule out that the external display is actually wired to the nvidia chip and won't have to look into the optimus situation)

Offline

#6 2021-10-15 22:09:22

dd3f
Member
Registered: 2014-10-02
Posts: 11

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

Thank you, seth! I think it is solved: Looking at the log, X tried to load intel module, but it was not installed.

[     5.338] (II) LoadModule: "glx"
[     5.340] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     5.347] (II) Module glx: vendor="X.Org Foundation"
[     5.347] 	compiled for 1.20.13, module version = 1.0.0
[     5.347] 	ABI class: X.Org Server Extension, version 10.0
[     5.347] (==) Matched intel as autoconfigured driver 0
[     5.347] (==) Matched modesetting as autoconfigured driver 1
[     5.347] (==) Matched fbdev as autoconfigured driver 2
[     5.347] (==) Matched vesa as autoconfigured driver 3
[     5.347] (==) Assigned the driver to the xf86ConfigLayout
[     5.347] (II) LoadModule: "intel"
[     5.347] (EE) Failed to load module "intel" (module does not exist, 0)
[     5.347] (II) LoadModule: "modesetting"
[     5.348] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[     5.350] (II) Module modesetting: vendor="X.Org Foundation"
[     5.350] 	compiled for 1.20.13, module version = 1.20.13
[     5.350] 	Module class: X.Org Video Driver
[     5.350] 	ABI class: X.Org Video Driver, version 24.1
[     5.350] (II) LoadModule: "fbdev"
[     5.351] (WW) Warning, couldn't open module fbdev
[     5.351] (EE) Failed to load module "fbdev" (module does not exist, 0)
[     5.351] (II) LoadModule: "vesa"
[     5.351] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[     5.351] (II) Module vesa: vendor="X.Org Foundation"
[     5.351] 	compiled for 1.20.9, module version = 2.5.0
[     5.351] 	Module class: X.Org Video Driver
[     5.351] 	ABI class: X.Org Video Driver, version 24.1
[     5.351] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[     5.351] (II) VESA: driver for VESA chipsets: vesa
[     5.389] (II) modeset(0): using drv /dev/dri/card0
[     5.389] (II) modeset(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[     5.389] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[     5.389] (==) modeset(0): RGB weight 888
[     5.389] (==) modeset(0): Default visual is TrueColor
[     5.389] (II) Loading sub module "glamoregl"
[     5.389] (II) LoadModule: "glamoregl"
[     5.389] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[     5.398] (II) Module glamoregl: vendor="X.Org Foundation"
[     5.398] 	compiled for 1.20.13, module version = 1.0.1
[     5.398] 	ABI class: X.Org ANSI C Emulation, version 0.4
[     5.558] (II) modeset(0): glamor X acceleration enabled on Mesa Intel(R) UHD Graphics 630 (CFL GT2)
[     5.558] (II) modeset(0): glamor initialized

So after I installed

 pacman -S xf86-video-intel 

and restarted X it solved the problem. Did I spent 2 years using the wrong drivers? roll
Also fbdev was missing, I installed it too, but no idea if it was needed.
Here wiki says that it is not recommended it https://wiki.archlinux.org/title/intel_ … stallation .

Offline

#7 2021-10-16 06:19:37

seth
Member
Registered: 2012-09-03
Posts: 23,983

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

Also fbdev was missing, I installed it too, but no idea if it was needed.

No. Neither the vesa driver.
The intel driver is in limbo (it can also fail on you badly anytime) and you're actually advised to use the modesetting driver (but of course you should use the driver that works best for you)
I assume the problem is between glamor and your (xrender?) compositor?

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#8 2021-10-16 14:22:38

dd3f
Member
Registered: 2014-10-02
Posts: 11

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

(I think?) I have no compositor if there is no default one coming with Xorg or i3.    Beside i3 I should have only lightdm.
Here https://pastebin.com/ACeEir2n , you can see the entire Xorg log. The nvidia card is disabled on purpose.

The intel driver is in limbo (it can also fail on you badly anytime) and you're actually advised to use the modesetting driver

This scares me since I cannot rely on an unstable configuration.

 
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] (prog-if 00 [VGA controller])
	DeviceName:  Onboard IGD
	Subsystem: Dell Device 087c
	Flags: bus master, fast devsel, latency 0, IRQ 144
	Memory at eb000000 (64-bit, non-prefetchable) [size=16M]
	Memory at 80000000 (64-bit, prefetchable) [size=256M]
--
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

from lspci -v I can see that i915 is the relevant module. Do you think the issue could have been solved (removing the intel driver) by following some of the suggestions in  https://wiki.archlinux.org/title/intel_ … re_loading ?
I do not understand which one could be associated with the issue I had, and executing all of those that mention i915  is probably not a wise solution.

Offline

#9 2021-10-16 17:30:53

seth
Member
Registered: 2012-09-03
Posts: 23,983

Re: [Solved] Xrandr scale 2 on external monitor=>huge drop in performances

sudo journalctl -b | grep -iE '(g|h)uc'

but it should™ automatically load for your GPU

glxinfo -l | grep -i max

will print GL limitations and you may want to compare the results between intel and modesetting driver.

Offline

Board footer

Powered by FluxBB