Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

wlr_drm_bo_handle_table makes session totally unresponsive [KWinFT] #3150

Closed
frmonteiro opened this issue Aug 30, 2021 · 9 comments
Closed

Comments

@frmonteiro
Copy link

Hello!

I'm currently. using KWinFT which has a regression introduced by the following commit backend/drm: introduce wlr_drm_bo_handle_table (5dfaf5e) introduces a inicial session crash which recovers by itself (black screen with a _ blinking and I can see a few times the mouse appearing and disappearing but still in that black screen and very laggy).

It also shows red artifacts after the behaviour said before which I'm able to see the mouse but cannot move.

I have tried to check if using mesa from git as of the commit resolved anything but It did not.
I'm not able to change ttys to get logs.

System Information:

Distribution: Arch Linux
Linux Kernel: 5.13.13-arch1-1
GPU: Intel(R) UHD Graphics (CML GT2) using iris.
Mesa Version: 21.2.1-1 / mesa-git
KWinFT commit: 0435b1d4209b589a4b32b08586ceddf20586c108

@emersion
Copy link
Member

Do you have compositor debug logs?

Maybe related to #3145.

@frmonteiro
Copy link
Author

There is a gdb backtrace from the kwin_wayland but more than that I don't have anything else.

Program terminated with signal SIGABRT, Aborted.
#0  0x00007f97da2abd22 in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f97d616ec40 (LWP 35552))]
(gdb) bt
#0  0x00007f97da2abd22 in raise () at /usr/lib/libc.so.6
#1  0x00007f97da29590e in abort () at /usr/lib/libc.so.6
#2  0x00007f97cc1d75eb in  () at /usr/lib/dri/iris_dri.so
#3  0x00007f97cd0ea0c3 in  () at /usr/lib/dri/iris_dri.so
#4  0x00007f97cc3c2014 in  () at /usr/lib/dri/iris_dri.so
#5  0x00007f97cc2016f5 in  () at /usr/lib/dri/iris_dri.so
#6  0x00007f97d4bc44da in  () at /usr/lib/libEGL_mesa.so.0
#7  0x00007f97d4bb36a2 in  () at /usr/lib/libEGL_mesa.so.0
#8  0x00007f97d4bac01a in  () at /usr/lib/libEGL_mesa.so.0
#9  0x000055854fe92537 in KWin::render::backend::wlroots::egl_backend::endRenderingFrameForScreen(KWin::AbstractOutput*, QRegion const&, QRegion const&) (this=0x55855119cdd0, output=
    0x55855119cf20, renderedRegion=..., damagedRegion=...) at /home/fernando/dev/plasma-desktop/kwinft/kwinft/src/platformsupport/scenes/opengl/abstract_egl_backend.h:54
#10 0x00007f97d43f9d9a in KWin::SceneOpenGL::paint(KWin::AbstractOutput*, QRegion, std::deque<KWin::Toplevel*, std::allocator<KWin::Toplevel*> > const&, std::chrono::duration<long, std::ratio<1l, 1000l> >)
    (this=this@entry=0x55855118b6b0, output=0x55855119cf20, damage=..., windows=std::deque with 0 elements, presentTime=..., presentTime@entry=...)
    at /home/fernando/dev/plasma-desktop/kwinft/kwinft/src/plugins/scenes/opengl/scene_opengl.cpp:730
#11 0x00007f97ddb71d3c in KWin::render::wayland::output::run() (this=0x5585511e9710) at /home/fernando/dev/plasma-desktop/kwinft/kwinft/src/render/wayland/output.cpp:155
#12 0x00007f97ddb71fde in KWin::render::wayland::output::timerEvent(QTimerEvent*) (event=<optimized out>, this=<optimized out>)
    at /home/fernando/dev/plasma-desktop/kwinft/kwinft/src/render/wayland/output.cpp:258
#13 KWin::render::wayland::output::timerEvent(QTimerEvent*) (this=<optimized out>, event=<optimized out>) at /home/fernando/dev/plasma-desktop/kwinft/kwinft/src/render/wayland/output.cpp:255
#14 0x00007f97db6aa42f in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#15 0x00007f97dabc2d62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#16 0x00007f97db67d3ba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#17 0x00007f97db6d535d in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#18 0x00007f97db6d3839 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#19 0x000055854fef291e in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#20 0x00007f97db67bd2c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#21 0x00007f97db684294 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#22 0x000055854fe7c3f5 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/fernando/dev/plasma-desktop/kwinft/kwinft/src/main_wayland.cpp:571

@subdiff
Copy link
Contributor

subdiff commented Aug 30, 2021

Do you have the normal debug output? For example by running KWinFT from a VT or by looking into the SDDM log at $HOME/.local/share/sddm/wayland-session.log.

@frmonteiro
Copy link
Author

frmonteiro commented Aug 30, 2021

From $HOME/.local/share/sddm/wayland-session.log. I have removed some unnecessary parts which weren't needed (ibinput successfully initialized, The XKEYBOARD keymap compiler (xkbcomp) reports)

https://paste.opensuse.org/31563498

@frmonteiro
Copy link
Author

@emersion I believe this has something to do with the iris driver. So a issue with it.

The following image is using MESA_LOADER_DRIVER_OVERRIDE=zink dbus-run-session startplasma-wayland to start a session from X11 of plasma.

image

While with iris that window is just a transparent one so in this case It would show the wallpaper only.

@subdiff
Copy link
Contributor

subdiff commented Sep 1, 2021

Just updated to current wlroots master HEAD and can confirm the crash.

I get the following output lines just before it:

00:00:01.493 [backend/drm/renderer.c:256] drmModeAddFB2WithModifiers failed: Invalid argument
00:00:01.493 [backend/drm/renderer.c:330] Failed to import BO in KMS
00:00:01.493 [backend/drm/drm.c:425] connector eDP-1: Failed to import buffer for scan-out

Reverting 5dfaf5e makes it work again.

I don't know, is the drm "renderer" supposed to do stuff if KWinFT does not use the renderer of wlroots but renders on its own?

@emersion
Copy link
Member

emersion commented Sep 1, 2021

Can you try this? #3153

@subdiff
Copy link
Contributor

subdiff commented Sep 1, 2021

#3153 fixes the session for me.

@frmonteiro
Copy link
Author

Can confirm that #3153 fixes this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants