Absolute paths for WLR_DRM_DEVICES (file not found otherwise)

Dillon Dixon 2019-02-10 21:27:28 -08:00
parent 2e4cdb00b3
commit 9380e1b176

@ -286,7 +286,7 @@ Unless specified otherwise, `wlroots` will choose a card for you and you could h
To use a different default card (listed in `/dev/dri/`), set this environment variable before starting sway: To use a different default card (listed in `/dev/dri/`), set this environment variable before starting sway:
``` ```
WLR_DRM_DEVICES=card1 sway WLR_DRM_DEVICES=/dev/dri/card1 sway
``` ```
It's likely that you want sway to use the integrated (Intel) card, because probably that's the only one directly connected to the laptop monitor. However, the mapping between node names in `/dev/dri/` and actual cards isn't guaranteed to be the same across reboots. It's likely that you want sway to use the integrated (Intel) card, because probably that's the only one directly connected to the laptop monitor. However, the mapping between node names in `/dev/dri/` and actual cards isn't guaranteed to be the same across reboots.
@ -296,14 +296,14 @@ This script detects which is the device path of the integrated card and launches
``` ```
#!/bin/sh #!/bin/sh
val=$(udevadm info -a -n /dev/dri/card1 | grep boot_vga | rev | cut -c 2) val=$(udevadm info -a -n /dev/dri/card1 | grep boot_vga | rev | cut -c 2)
cmd="WLR_DRM_DEVICES=card$val sway" cmd="WLR_DRM_DEVICES=/dev/dri/card$val sway"
eval "$cmd" eval "$cmd"
``` ```
You can also configure multiple graphics cards like so: You can also configure multiple graphics cards like so:
``` ```
WLR_DRM_DEVICES=card0:card1 sway 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. The first card is used for actual rendering, and display buffers are copied to the secondary cards for any displays connected to them.