mutter:fix-amdgpu-crash

Last commit made on 2023-10-17
Get this branch:
git clone -b fix-amdgpu-crash https://git.launchpad.net/mutter

Branch merges

Branch information

Name:
fix-amdgpu-crash
Repository:
lp:mutter

Recent commits

7c4b3db... by Ray Strode <email address hidden>

wip! thread stuff idk

This is just whatever I was working on last when I ran out of
bandwidth to investigate the issue.

290dc24... by Ray Strode <email address hidden>

hack! Bump LIMIT_RTTIME hard limit

RTKit only let's us set the LIMIT_RTTIME hard limit to 200ms.

Because of a kernel bug, it's taking longer than that. Finding
the bug is hard when it's getting killed so quickly.

This commit adds a hack to work around RTKit's limitation.

ef2942c... by Ray Strode <email address hidden>

hack! Add a busy loop

This is just for testing.

7a48499... by Ray Strode <email address hidden>

thread-watcher: Re-enable real SIGXCPU signals

Right now we synthesize SIGXCPU with kernel timers, but let's add
back SIGXCPU into the mix too.

This may give us a clearer picture of the situation when the
signal-monitor is run.

39f5fb0... by Ray Strode <email address hidden>

thread-watcher: Watch real-time thread from main loop in addition to signal handler

It seems like the kernel is blocking timer signals from getting emitted
in some cases when it is stuck, so we ned to watch for stalls from a
different thread than the stalled thread.

This commit adds code to watch from the main loop.

f7d4e71... by Ray Strode <email address hidden>

native: Stop using real-time thread if it stalls

RTKit requires mutter to set a hard rlimit on how long its thread will
use CPU before going back to the kernel. This limit is about 12 frames.

Unfortunately, amdgpu seems to have a bug at the moment where it will
cause the thread to stall longer than that when the screen is locked.

It also seemingly stalls during some games.

Rather than let the display server get slayed, this commit adds a
roundtrip through the kernel to reset the clock when things are stalled,
and tells mutter to switch away from using real-time threads.

Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/3037

5f06104... by Ray Strode <email address hidden>

clutter: Add ms2ns helper

Some system apis we're going to need in the future use
nanoseconds, but we're never going to need more timing
precision that milliseconds.

In preparate for that, this commit adds a new helper ns2ms
to help avoid bugs in unit conversion.

6dd0df6... by Ray Strode <email address hidden>

util: Add way to print backtraces

Now that mutter can use a realtime thread its very important that
it doesn't stall for too long, since that can result in the kernel
killing it. Ironically, a main reason mutter could stall is
kernel bugs.

When a stall happens, we need a way to see why. This commit adds
a new function, "meta_print_backtrace" to print backtrace of the
current process and the kernel (if possible).

A future commit will use this new function.

4f6c918... by =?utf-8?q?Florian_M=C3=BCllner?= <email address hidden>

Bump version to 45.0

Update NEWS.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3285>

4836018... by Pascal Nowack

backends/eis-client: Do not add device before adding EIS regions

When a device is added, libei does not allow adding additional regions
for that particular device, as it is already advertised to the EI
client.
As a result, mutter currently effectively only adds the first region to
a device, but not the others.
This makes input in multi monitor sessions only possible on one monitor,
as the EI client cannot look up the other regions, since they were not
advertised to it.

Fix this situation by not adding and resuming the device, when a shared
device is used.
Instead, for shared devices, always add all regions first, and then
after that, add and resume the device.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3273>