Sway: Two simultaneous instances with different GPUs.

Created on 5 Feb 2019  路  1Comment  路  Source: swaywm/sway

I am trying to run multiple simultaneous instances of Sway running on different monitors (with different GPUs). I made two different config files disabling all but one monitor and disabling all but one keyboard and mouse.

I made an sh file to run both instances (I also added a sleep in the middle).

It didn't work (only one ran); my guess is that I would have to disable the other GPU on each instance but this is not something that I found possible in the manual pages.

Is this actually at all doable in sway/wlroots?

Most helpful comment

This is called multiseat and is possible with systemd/logind. This is referring to a different multiseat than the wayland one, so be careful of the terminology. It'll work with more than just sway; anything that uses logind properly should work.

  • Use a display manager. I tried this with GDM a while ago, which seemed to have issues with starting wayland sessions on the other seat (the option does not appear). Maybe it's fixed there now, or maybe another display manager will do it properly.
  • Using the loginctl command, assign your GPU and input devices you want to be on the other seat.
    You can get all of the devices associated with the default seat (seat0) with loginctl seat-status seat0.
    Then identify which device is your GPU and new input devices, and attach them like loginctl attach seat1 /sys/path/to/device.
  • The display manager should appear on both GPUs/monitors as separate instances, and you should be able to log into them separately.

More info:
https://www.freedesktop.org/wiki/Software/systemd/multiseat/
https://github.com/swaywm/wlroots/pull/1063

>All comments

This is called multiseat and is possible with systemd/logind. This is referring to a different multiseat than the wayland one, so be careful of the terminology. It'll work with more than just sway; anything that uses logind properly should work.

  • Use a display manager. I tried this with GDM a while ago, which seemed to have issues with starting wayland sessions on the other seat (the option does not appear). Maybe it's fixed there now, or maybe another display manager will do it properly.
  • Using the loginctl command, assign your GPU and input devices you want to be on the other seat.
    You can get all of the devices associated with the default seat (seat0) with loginctl seat-status seat0.
    Then identify which device is your GPU and new input devices, and attach them like loginctl attach seat1 /sys/path/to/device.
  • The display manager should appear on both GPUs/monitors as separate instances, and you should be able to log into them separately.

More info:
https://www.freedesktop.org/wiki/Software/systemd/multiseat/
https://github.com/swaywm/wlroots/pull/1063

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aidanharris picture aidanharris  路  3Comments

ddevault picture ddevault  路  4Comments

emersion picture emersion  路  4Comments

J0nnyMak0 picture J0nnyMak0  路  3Comments

StephenBrown2 picture StephenBrown2  路  4Comments