Skip to content

Commit 7d0349c

Browse files
committed
Try to use outputs on all cards
Normally weston uses card0 only. In dual-GPU setup, it may not be the one with monitor connected, and when it doesn't find any connector monitor, it fails to startup. Look also at outputs connected to other cards too. There doesn't seems to be any option to check all connected devices, so enumerate them via sysfs manually.
1 parent 0d9bdd9 commit 7d0349c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

scripts/run-gui-backend.guiweston

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ if [ -n "$XDG_VTNR" ]; then
2929
chvt "${XDG_VTNR}"
3030
fi
3131

32-
weston --config=${CONFIG_FILE} --socket=wl-firstboot-0
32+
cards=$(ls -d /sys/class/drm/card*| grep -v -- -| cut -d / -f 5)
33+
primary_card=$(echo "$cards" | head -1 )
34+
secondary_cards=$(echo "$cards"|
35+
tail -n +2|
36+
xargs printf "%s,")
37+
38+
weston --config=${CONFIG_FILE} --socket=wl-firstboot-0 --drm-device="$primary_card" --additional-devices="$secondary_cards"
3339
exit_code=$(< ${EXIT_CODE_SAVE})
3440

3541
rm ${CONFIG_FILE} ${RUN_SCRIPT} ${EXIT_CODE_SAVE}

0 commit comments

Comments
 (0)