Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Intel X4500HD, lag when any compositor is enabled (Mesa bug)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 587
Location: Ásgarðr

PostPosted: Sat Jan 04, 2020 6:46 pm    Post subject: Intel X4500HD, lag when any compositor is enabled (Mesa bug) Reply with quote

EDIT : All of this is caused by a bug in Mesa 19.2.x
See also https://gitlab.freedesktop.org/mesa/mesa/issues/1886

Hello,

So I'm using an old G41 motherboard with integrated gpu (Intel X4500HD) and a hardened 17.1 profile.
Everything works just fine except when I enable any compositor.
I use xfce4 (4.14) and by default it uses xfwm4 but it causes so much lag when moving windows, playing fullscreen videos that I've had to disable it.
I tried with two other compositor but both of them are giving more or less the same results.
- compton
- picom (a fork of compton)

Here are some options I tried :
Code:
picom --xrender-sync-fence --vsync --no-fading-destroyed-argb --backend glx
picom --xrender-sync-fence --vsync --backend glx
picom -CG --xrender-sync-fence --vsync --backend glx


When I start picom in a terminal (and not as daemon) and close it, it shows the following :

Code:
Error of failed request:  GLXBadPixmap
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  23 (X_GLXDestroyPixmap)
  Serial number of failed request:  3488
  Current serial number in output stream:  3495


I use modesetting since the xf86-video-intel driver causing all sort of troubles and artifacts.

Code:
Portage 2.3.79 (python 3.6.9-final-0, default/linux/amd64/17.1/hardened, gcc-9.2.0, glibc-2.29-r7, 4.14.161-gentoo-gnu x86_64


/etc/X11/xorg.conf.d/20-modesetting
Code:
Section "Device"
    Identifier  "modesetting"
    Driver      "modesetting"
EndSection


mesa 19.2.8
X classic dri3 egl gallium gbm gles2 llvm vaapi -d3d9 -debug -gles1 -libglvnd -lm-sensors -opencl -osmesa -pax_kernel -selinux -test -unwind -valgrind -vdpau -vulkan -vulkan-overlay -wayland -xa -xvmc ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" VIDEO_CARDS="i965 intel -freedreno -i915 -iris -lima -nouveau -panfrost -r100 -r200 -r300 -r600 -radeon -radeonsi -vc4 -virgl -vivante -vmware"

xorg-server 1.20.6 (without -suid, started as user, I also tried to start it as root but it doesn't change anything)
elogind ipv6 libressl udev xcsecurity xorg xvfb -debug -dmx -doc -kdrive -libglvnd -minimal -selinux -static-libs -suid -systemd -unwind -wayland -xephyr -xnest

Any idea ? I even tried to install mate to see if marco (compositor) was improving anything, but no, same issues.
If anyone uses a similar board or same igpu and know how to properly make compositor working, it would be great.

Thanks.


Last edited by sdauth on Tue Jan 14, 2020 2:04 pm; edited 2 times in total
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 587
Location: Ásgarðr

PostPosted: Thu Jan 09, 2020 6:42 pm    Post subject: Reply with quote

So after various tests, here is what I found to be the most stable on my old motherboard.

I use xf86-video-intel (9999 version) instead of modesetting :

/etc/portage/package/accept.keywords/xf86-video-intel
Code:

x11-drivers/xf86-video-intel **


with the following xorg conf to make sure it is used instead of modesetting :

/etc/X11/xorg.conf.d/20-intel.conf
Code:
Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
EndSection


(I do not use TearFree option as from my tests, it causes various glitchs..)

And I switch from picom (fork of compton) to compton-9999 (it uses chjj repo)
I think picom is not a good bet for my old hardware (which supports OpenGL 2.1 max) since opengl minimum version required is 3.0 according to USE flag :
Code:
opengl    : Enable OpenGL backend (requires at least OpenGL 3.0)


/etc/portage/package/accept.keywords/compton
Code:
x11-misc/compton **


compton is launched with the following options :

Code:
compton -CG --backend glx --vsync opengl --sw-opti --paint-on-overlay --unredir-if-possible --glx-no-stencil --no-fading-openclose


So far, everything works fine. Except that when a window is fullscreen (mpv for example), it lags badly. (and causes ton of dropped frames) But I have a shortcut to turn off the compositor when watching a fullscreen video.
Strangely, watching fullscreen video with palemoon does not cause any lag, even when compton is running...
I'm still trying to find the cause for lag with fullscreen mpv.
At least, now moving, opening, closing windows is fast.

EDIT : If I use openbox instead of xfce and the exact same configuration (including compton command with same options) then there is no issues with fullscreen videos with mpv ! I guess I will switch to that. So tired of fixing stuff.
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 587
Location: Ásgarðr

PostPosted: Tue Jan 14, 2020 1:50 pm    Post subject: Reply with quote

Just in case it helps anyone, it seems the culprit was neither modesetting, xorg, compton.. but Mesa !
Yesterday, I installed a dual boot with Debian Buster, stable release which still uses Mesa 18.3.x and there is not a single issue with compositor enabled. Then I upgraded to Debian testing release (bullseye) which uses Mesa 19.2.x and suddenly, shtf badly.. with severe lag with fullscreen video, opening / closing windows.

So back on Gentoo, I decided to try out the live ebuild using the 18.3 branch at the latest commit :
Code:

EGIT_OVERRIDE_BRANCH_MESA_MESA=18.3 EGIT_OVERRIDE_COMMIT_MESA_MESA=eb9da68cbf23aafb1192beed084b2f05df65dd04 emerge -1 mesa


Bingo.. everything works great if I use 18.3.x branch. Not a single frame drop, no glitches etc.
To be sure, I also tried latest ebuild (19.3.2) and with that one installed, problems are back again..

While writing this, I stumbled upon this bug report : https://gitlab.freedesktop.org/mesa/mesa/issues/1886
It confirms the issue.
Good thing, there is still an ebuild for 19.1.8, so I compiled it and it works great, just as 18.3.x. So I'm using this one currently and I hope the issue will be fixed upstream.
A nasty bug appeared in 19.2.x it seems.
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 587
Location: Ásgarðr

PostPosted: Thu Apr 30, 2020 7:41 am    Post subject: Reply with quote

For those interested, it seems that using latest Mesa fixes the issue. (Currently 20.0.5 using keyword)
Although I need to test a little more, the various issues I mentioned above are no longer showing up. No more framedrop when watching videos for example.

EDIT : After a month of usage, I consider this is fixed. None of the issues mentioned earlier are showing up. Currently using Mesa 20.1.0_rc4. Stable release should happen soon.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum