Skip to content

Commit f7bf5d0

Browse files
committed
Added README documentation
1 parent 9974fa1 commit f7bf5d0

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,55 @@ Install like so:
3131
sudo ninja -C build/ install
3232
```
3333

34+
## Debugging
35+
36+
SceneFX includes the same debugging tools and environment variables as upstream wlroots does, but with some extra goodies.
37+
38+
### Environment variables:
39+
40+
- `WLR_RENDERER_ALLOW_SOFTWARE=1`: Use software rendering
41+
- `WLR_SCENE_DEBUG_DAMAGE=rerender`: Re-render the whole display on each commit (don't use damage)
42+
- `WLR_SCENE_DEBUG_DAMAGE=highlight`: Highlights where damage has occurred (where SwayFX get's re-rendered)
43+
- `WLR_SCENE_DISABLE_DIRECT_SCANOUT=1`: Disable direct scanout (always composites, even fullscreen windows)
44+
- `WLR_SCENE_DISABLE_VISIBILITY=1`: Disables culling of non-visible regions of a window/buffer (an example would be a small window fully covered by an opaque window)
45+
- `WLR_SCENE_HIGHLIGHT_TRANSPARENT_REGION=1`: Highlights the transparent areas of a window/buffer
46+
- `WLR_EGL_NO_MODIFIERS=1`: Disables modifiers for EGL
47+
48+
### Tracy profiling
49+
50+
Optional [Tracy](https://github.com/wolfpld/tracy) profiling can be enabled for an extra good view of when and what is happening.
51+
52+
#### Enabling:
53+
54+
Note: These instructions will enable basic profiling
55+
56+
1. Add SceneFX as a subproject to your compositor
57+
2. Import it as a subproject dependency
58+
3. Run `meson subprojects download` to download the tracy project into the subproject directory
59+
4. Compile SceneFX with `-Dtracy_enable=true` (and `--buildtype=debugoptimized` if using meson).
60+
5. Start your compositor
61+
6. Start the `tracy-profiler` and connect to the running compositor (The version of the profiler should not matter, but if any issues are encountered, try using a version that matches the subproject).
62+
63+
To enable more advanced profiling, the compositor in question needs to be run by the root user which comes with its own drawbacks, like DBus not working out of the box. A recommended way of doing this is by running your compositor with the `-E` sudo flag, such as `sudo -E sway`.
64+
65+
To enable DBus, you need to give the root user access to the DBus session bus by adding the following lines to the `/etc/dbus-1/session-local.conf` file (you might have to create said file), and reboot your system.
66+
67+
```xml
68+
<!-- /etc/dbus-1/session-local.conf -->
69+
<!-- Allow root to access session bus -->
70+
<busconfig>
71+
<policy context="mandatory">
72+
<allow user="root"/>
73+
</policy>
74+
</busconfig>
75+
```
76+
77+
#### Additional tracy documentation
78+
79+
The links below are helpful when learning how to use tracy:
80+
81+
- https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf
82+
- https://www.youtube.com/watch?v=ghXk3Bk5F2U
3483

3584
---
3685
[Join our Discord](https://discord.gg/qsSx397rkh)

0 commit comments

Comments
 (0)