#985769 xwayland: 100% of CPU, The system gets stuck.

Package:
xwayland
Source:
xwayland
Description:
X server for running X clients under Wayland
Submitter:
john
Date:
2023-07-27 04:03:03 UTC
Severity:
important
#985769#5
Date:
2021-03-23 07:57:41 UTC
From:
To:
Dear Maintainer,

The xwayland cpu utilization rate reaches 100%, which often happens.One of the
reproduction process is as follows:

1. System boot, open terminal window.
2. Drag the window so that the mouse pointer touches the right edge of the
screen,
   The xwayland cpu usage rate will reach 100% (Especially when the system is
just started):

进程号 USER      PR  NI    VIRT    RES    SHR    %CPU  %MEM     TIME+ COMMAND
   1413 john      20   0 1071740  59244  39136 R 100.0   1.5   0:06.20 Xwayland

  At this point, the mouse is still available, and the terminal is also
available.

3. Ctrl+D exit the terminal program and the GUI will be completely stuck and
unusable, but ssh still works.

In addition, many other operations may also cause this problem.

#985769#10
Date:
2021-03-23 10:57:52 UTC
From:
To:
Is this using GNOME, or a different Wayland environment?

Which terminal emulator application?

So the terminal window's contents are still updating at this point? Is the window still at the original size?

I'd be interested in more examples, I've been unable to reproduce this so far.

#985769#15
Date:
2021-03-24 04:31:36 UTC
From:
To:
I'm using Google Translate, which may not be very good. If additional
information is required, I will do my best to provide it.
GNOME, default environment.
I'm using the system's default terminal emulator. gnome-terminal? I'm not
sure what it's called.
The other terminal simulator, Terminator, doesn't seem to have this
problem, I haven't tested it too much.
In order to ensure the validity of the test results, I restart the system
before each test.
the window still at the original size?
Yes,It's still being updated. The window size will change, but it's a bit
delayed.
The original description may not be accurate, the mouse can be moved, you
can open a new TAB of this window,
but you can not operate other places, such as the system toolbar, otherwise
the GUI will be completely unresponsive.


 > I'd be interested in more examples, I've been unable to reproduce this
so far.
Sometimes this happens when you drag the right scrollbar of QtCreator. Using
the mouse wheel to scroll the QtCreator window does not cause this problem
These problems are obvious when the system starts up and seem less likely
to occur after a while of use or after a while of waiting.

A similar problem has occurred in Thunderbird, which happened
unintentionally. I don’t use too many programs.
I use VMware virtual machine on Win10, which may also be related to the
hardware environment.

I recorded the whole process in a GIF animation, the file is about 1.8MB,
if necessary, I can provide.

Michel Dänzer <michel@daenzer.net> 于2021年3月23日周二 下午6:57写道:

#985769#20
Date:
2022-10-29 19:54:51 UTC
From:
To:
Hello, I am seeing this behavior with a new and up-to-date installation of
Debian.  I am running Debian as a guest OS in VMWare Player.  The host OS
is Windows 11 running on a Dell XPS laptop.

John

#985769#25
Date:
2023-03-18 22:29:06 UTC
From:
To:
Hi,

indeed. Debian 11 desktop is very unstable under VMware Workstation Pro. I
tracked this down to
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1132 and managed to
fix it by applying
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1061/diffs?commit_id=ba644a64a415962956de72936d21b6527ee8cd57

#985769#30
Date:
2023-06-22 10:47:13 UTC
From:
To:
I have actually had this problem a few times since I upgraded from
bullseye to bookworm. The UI becomes unresponsive and the only
alternative is to ssh into the machine and kill Xwayland.

I don't think I ever had this problem in bullseye. I think this tends
to happen when I am using Steam (and I don't mean playing a game but
simply browsing the store or the library).

Unfortunately the patch suggested by Timo Lindfors is already applied
in bookworm so if that solves the problem for him then the underlying
cause is probably different.

Berto

#985769#35
Date:
2023-06-22 12:30:25 UTC
From:
To:
Could be https://gitlab.freedesktop.org/xorg/xserver/-/issues/1442 fixed by https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1086 .
#985769#40
Date:
2023-06-22 12:42:51 UTC
From:
To:
Thanks, it does sound like that, I'll try to cherry pick that fix and
see how it goes. I'll come back in a week or two with my conclusions.

Berto

#985769#45
Date:
2023-07-03 14:23:30 UTC
From:
To:
I have been using xwayland 2:22.1.9-1 with those two commits
cherry-picked and so far I haven't had any issues.

Berto

#985769#50
Date:
2023-07-27 03:58:43 UTC
From:
To:
I have been using those patches for around one month now and I haven't
had the problem again. I think it would be great to have this fixed in
bookworm.

Berto