2024-02-20 21:16:07 +01:00
|
|
|
---
|
|
|
|
weight: 10
|
|
|
|
title: Tearing
|
|
|
|
---
|
|
|
|
|
2023-09-28 22:58:51 +02:00
|
|
|
Screen tearing is used to reduce latency and/or jitter in games.
|
|
|
|
|
|
|
|
## Enabling tearing
|
|
|
|
|
|
|
|
To enable tearing:
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
- Set `general:allow_tearing` to `true`. This is a "master toggle"
|
|
|
|
- Add `env = WLR_DRM_NO_ATOMIC,1` to your Hyprland config. This disables the
|
|
|
|
usage of a newer kernel DRM API that doesn't support tearing yet.
|
|
|
|
- Add an `immediate` windowrule to your game of choice. This makes sure that
|
|
|
|
Hyprland will tear it.
|
|
|
|
|
|
|
|
{{< callout >}}
|
|
|
|
|
|
|
|
Please note that tearing will only be in effect when the game is in fullscreen
|
|
|
|
and the only thing visible on the screen.
|
|
|
|
|
|
|
|
{{< /callout >}}
|
2023-09-28 22:58:51 +02:00
|
|
|
|
|
|
|
Example snippet:
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-09-28 22:58:51 +02:00
|
|
|
```env
|
|
|
|
general {
|
|
|
|
allow_tearing = true
|
|
|
|
}
|
|
|
|
|
|
|
|
env = WLR_DRM_NO_ATOMIC,1
|
|
|
|
|
|
|
|
windowrulev2 = immediate, class:^(cs2)$
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout >}}
|
|
|
|
|
|
|
|
`env = WLR_DRM_NO_ATOMIC,1` is not recommended. If your kernel ver is >= 6.8,
|
|
|
|
you can remove it.
|
2024-01-27 15:00:49 +01:00
|
|
|
|
|
|
|
For kernels < 6.8, this env is required.
|
|
|
|
|
|
|
|
Check your kernel version with `uname -r`.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< /callout >}}
|
|
|
|
|
|
|
|
{{< callout type=warning >}}
|
|
|
|
|
|
|
|
If you experience graphical issues, you may be out of luck. Tearing support is
|
|
|
|
experimental.
|
2023-09-28 22:58:51 +02:00
|
|
|
|
|
|
|
See the likely culprits below.
|
2024-02-20 21:16:07 +01:00
|
|
|
|
|
|
|
{{< /callout >}}
|
2023-09-28 22:58:51 +02:00
|
|
|
|
|
|
|
## Common issues
|
|
|
|
|
2023-09-28 23:06:29 +02:00
|
|
|
### No tearing at all
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2024-04-21 16:35:48 +02:00
|
|
|
Make sure your window rules are matching and you have the master toggle enabled.
|
2023-09-28 23:06:29 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Also make sure nothing except for your game is showing on your monitor. No
|
|
|
|
notifications, overlays, lockscreens, bars, other windows, etc. (on a different
|
|
|
|
monitor is fine)
|
2023-09-29 02:19:40 +02:00
|
|
|
|
2023-09-28 23:06:29 +02:00
|
|
|
### Apps that should tear, freeze
|
2024-02-20 21:16:07 +01:00
|
|
|
|
|
|
|
Almost definitely means your GPU driver does not support tearing, like e.g.
|
2024-04-13 01:26:11 +02:00
|
|
|
Intel's, or AMD if you don't use the legacy backend with `env = WLR_DRM_NO_ATOMIC,1` or patch your kernel.
|
2023-09-28 23:06:29 +02:00
|
|
|
|
|
|
|
Please _do not_ report issues if this is the culprit.
|
|
|
|
|
2023-09-28 22:58:51 +02:00
|
|
|
### Graphical artifacts (random colorful pixels, etc)
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-09-28 23:06:29 +02:00
|
|
|
Likely issue with your graphics driver.
|
2023-09-28 22:58:51 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Please _do not_ report issues if this is the culprit. Unfortunately, it's most
|
|
|
|
likely your GPU driver's fault.
|
2023-09-28 22:58:51 +02:00
|
|
|
|
2024-04-21 16:35:48 +02:00
|
|
|
### Other graphical issues/Hyprland instantly crashes on launch
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-09-28 22:58:51 +02:00
|
|
|
Likely issue with `WLR_DRM_NO_ATOMIC`.
|
|
|
|
|
|
|
|
NO_ATOMIC forces the use of a legacy, less tested drm API.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Please _do not_ report issues if this is the culprit. Unfortunately, you will
|
|
|
|
have to wait for the Linux kernel to support tearing page flips on the atomic
|
|
|
|
API.
|