`gnome-shell-perf-tool` does not work on Wayland
The MR !887 (merged) (commit 0185c288 and commit 3c4c37e4) removed the X11 dependency from perf-tool-helper
, however that is not sufficient to be able to run gnome-shell-perf-tool
on Wayland.
gnome-shell-perf-tool
is designed to replace the running shell but --replace
cannot work when gnome-shell is being run as a Wayland compositor. It also uses a helper tool perf-tool-helper
through D-Bus.
An alternate solution could have been to run gnome-shell-perf-tool
in place of gnome-shell
and get the entire Wayland session running (that was !941 (merged)) but that won't work either unfortunately because perf-tool-helper
which is run first, needs to connect to the display first, whereas gnome-shell-perf-tool
spawns gnome-shell
later in a loop:
src/gnome-shell-perf-tool.in:
214 start_perf_helper()
215
216 for i in range(0, iters):
217 # We create an empty temporary file that the shell will overwrite
218 # with the contents.
219 handle, output_file = tempfile.mkstemp(".json", "gnome-shell-perf.")
220 os.close(handle)
221
222 # Run the performance test and collect the output as JSON
223 normal_exit = False
224 try:
225 normal_exit = run_shell(perf_output=output_file)
226 except:
227 stop_perf_helper()
228 raise
229 finally:
230 if not normal_exit:
231 os.remove(output_file)
232
...
We end up with a chicken and egg problem, perf-tool-helper
needs to connect to a display prior to run gnome-shell
, whereas the display server is gnome-shell
itself on Wayland.
Removing the X11 dependency from perf-tool-helper
is therefore not sufficient, gnome-shell-perf-tool
needs to be redesigned to work on (or, rather as) a Wayland compositor.