From 85929ff32380166ba6e888b3e3b2dcae26c6806e Mon Sep 17 00:00:00 2001 From: jlo62 <122014753+jlo62@users.noreply.github.com> Date: Sun, 12 May 2024 10:18:26 +0200 Subject: [PATCH] Add WLR_DRM_DEVICES workaround for inconsistent /dev/dri/card* paths --- Home.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 85531ce..0c96f9c 100644 --- a/Home.md +++ b/Home.md @@ -674,6 +674,18 @@ WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 sway The first card is used for actual rendering, and display buffers are copied to the secondary cards for any displays connected to them. +If your card paths aren't consistent (for example with eGPUs), you cannot use paths from `/dev/dri/by-path`, as they contain the delimiter which (unfortunately) cannot be escaped.\ +As a workaround you can create symlinks for the cards with a udev rule (`/etc/udev/rules.d/set-dri-links.rules`): +``` +KERNEL=="card*", SUBSYSTEM=="drm", ATTRS{vendor}=="0x1002", ATTRS{device}=="0x747e", SYMLINK+="dri/by-name/egpu" +KERNEL=="card*", SUBSYSTEM=="drm", ATTRS{vendor}=="0x1002", ATTRS{device}=="0x1681", SYMLINK+="dri/by-name/igpu" +``` +You can get the ATTRS{vendor} and ATTRS{device} from `udevadm info /dev/dri/cardX --attribute-walk`\ +and set the variable as following: +```sh +WLR_DRM_DEVICES=/dev/dri/by-name/egpu:/dev/dri/by-name/igpu +``` + ### My GTK+3 theme isn't working See [GTK 3 settings on Wayland](./GTK-3-settings-on-Wayland). @@ -845,7 +857,7 @@ DRI3 not available or VA-API fails to initialize. -Sway 1.10 has removed support for the legacy `wl_drm` Wayland protocol, which is still used by Xwayland 23.2.4 and earlier, libva 2.20.0 and earlier, and AMDVLK. +Sway 1.10 has removed suĀ§pport for the legacy `wl_drm` Wayland protocol, which is still used by Xwayland 23.2.4 and earlier, libva 2.20.0 and earlier, and AMDVLK. As a workaround, the legacy `wl_drm` Wayland protocol can be re-enabled manually by passing `-Dlegacy-wl-drm` to Sway.