From 1697ba5662cda473add5effc2707c4a053b948ae Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 15 Sep 2026 08:35:51 +0300 Subject: [PATCH] wiki: Add kernel tracing remount & paranoid cmd for profiling --- docs/wiki/Development:-Developing-niri.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/wiki/Development:-Developing-niri.md b/docs/wiki/Development:-Developing-niri.md index 96a9344a..acdab799 100644 --- a/docs/wiki/Development:-Developing-niri.md +++ b/docs/wiki/Development:-Developing-niri.md @@ -52,6 +52,12 @@ We have integration with the [Tracy](https://github.com/wolfpld/tracy) profiler cargo build --release --features=profile-with-tracy-ondemand ``` +Before starting Tracy-integrated niri, run the following commands to give Tracy access to CPU scheduling and context switches (can be very useful for diagnosing slowdowns): + +``` +sudo mount -o remount,gid=$(id -g),mode=750 /sys/kernel/tracing; echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid +``` + Then you can open Tracy (you will need the latest stable release) and attach to a running niri instance to collect profiling data. Profiling data is collected "on demand"—that is, only when Tracy is connected. You can run a niri build like this as your main compositor if you'd like. > [!NOTE]