Multi seat support
Multi-seat Confiuration
ACS supports limited multi-seat config to allow individual set of input subsystem devices for each of the connect GPU. This support is mostly desired in Automotive/Infotainment subsystems where the screens can be used as different panels or different usages.
Setup
HW Requirements (validated only on AMDGPU setup)
- APU + DGPU setup.
- Card0 and Card1 should be enumerated under /dev/dri/ folder.
- Each APU and dGPU should be connected with individual monitor, mouse and keyboard.
- Connect extra pair of keyboard and mouse which could be easily distinguished (different vendor or product id) with already connected pair.
One Time Setup
Step 1:
To make multi-seat setup, make sure to comment the "additional-devices=card1" config in weston.ini.
Step 2: Create udev rule to create a new seat
- Create a new udev rules file under /etc/udev/rules.d/ by following the below naming convention.
<priority>-<device name>.rules-
In the above naming convention, priority number determines the order of rule execution. Lesser the number, the higher the priority. So, use the priority number less than existing rules under /etc/udev/rules.d/
Ex: New rule 69-graphics-seat.rules in the below figure is created with priority 69.
Copy the below contents into 69-graphics-multseat.rules and update the parameters from next step.
SUBSYSTEM=="drm", KERNEL=="card1", KERNELS=="0000:c7:00.0", TAG+="master-of-seat",
ENV{ID_SEAT}="seat1"
SUBSYSTEM=="drm", KERNEL=="renderD129", KERNELS=="0000:c7:00.0", ENV{ID_SEAT}="seat1"
SUBSYSTEM=="graphics", KERNEL=="fb1", KERNELS=="0000:c7:00.0", ENV{ID_SEAT}="seat1"
SUBSYSTEM=="input", ATTRS{devnum}=="9", ATTRS{idVendor}=="1bcf", ATTRS{idProduct}=="08a0",
OWNER="acs2", ENV{ID_SEAT}="seat1"
SUBSYSTEM=="input", ATTRS{devnum}=="4", ATTRS{idVendor}=="1a2c", ATTRS{idProduct}=="4c5e",
OWNER="acs2", ENV{ID_SEAT}="seat1"- First 3 lines in above udev script will assign card1 to seat1.
- Last 2 lines will assign specific keyboard and mouse to seat1.
- By default, system will always have CARD0 assigned to DGPU, and CARD1 to APU.
- In above example, update keys like KERNELS, idVendor etc. with the system specific parameters and OWNER with system user-name.
- To get the details of KERNELS of card1, idVendor, idProduct of Keyboard and Mouse connected to the system, run the devices.sh script present under "/share/weston/devices.sh"
$ sudo chmod 777 <path>/share/weston/devices.sh
$ cd <path>/share/weston && ./devices.shSample output of devices.sh script
--------------Card1 details-------------------
/dev/dri/card1 value of KERNELS: 0000:c7:00.0
fb1 value of KERNELS: 0000:c7:00.0
render not value of KERNELS: 0000:c7:00.0
---------------Mouses connected-----------------
Mouse 1:
Vendor ID: 1bcf
Product ID: 08a0
Device No: 009
Mouse 2:
Vendor ID: 1bcf
Product ID: 08a0
Device No: 008
---------------Keyboards connected-----------------
Keyboard 1:
Vendor ID: 1a2c
Product ID: 4c5e
Device No: 004
Keyboard 2:
Vendor ID: 1a2c
Product ID: 4c5e
Device No: 002- Update the KERNELS param in rule file for card1, fb1 and renderD129 entries based on output from device.sh script.
- Select the keyboard and mouse based on information from device.sh and update the idVendor and idProduct, devnum params in rule file.
- ATTR{devnum} value can change on reboot so, we need to check this value used in rule on each reboot.
- When there is a change update the rule and run below command to reload new rule.
Reload udev rules:
$ sudo udevadm control --reload-rules
Trigger udev to apply the new rules:
$ sudo udevadm triggerStep 3 : Copy service files
- Execute the below commands to copy the multi-seat related service files present under /opt/amdgpu/share/weston to respective locations.
$ sudo cp <path>/share/weston/mysession.service /etc/systemd/system
$ sudo cp <path>/share/weston/mysession.target /etc/systemd/user
$ sudo cp <path>/share/weston/weston.service /etc/systemd/user
$ sudo cp <path>/share/weston/weston.socket /etc/systemd/user- Edit /etc/systemd/system/mysession.service file as shown below and update User and Group with system's username.
- Edit /etc/systemd/user/weston.service file and update the config file path if needed.
- Run the below commands to reload systemd
$ systemctl daemon-reload
$ systemctl --user daemon-reloadStep 4 : Disable GDM
- Execute the below commands to disable GDM which internally disables GUI
$ sudo systemctl disable gdm3
$ sudo reboot- After system is rebooted, TTY terminal will appear for login. Login with credentials.
With this, One Time Setup for Multi-Seat is completed. These steps are not required unless Multi-Seat setup is disabled.
Launching ACS on Multi-Seat
- Run the below command to list the seats connected to the system. In the case of multi-seat, it should list seat0 and seat1. If not, onetime setup is not done properly, please check the steps again for One Time Setup.
$ loginctl list-seats- Run script device.sh and verify the device number returned from script is same as used in udev rule, if not udpate the rule and reload the rule
Reload udev rules:
$ sudo udevadm control --reload-rules
Trigger udev to apply the new rules:
$ sudo udevadm trigger- Edit /share/weston/multi-seat-setup.sh file to update the user-name and seat name as per the system.
- Optional : update the config file path in multi-seat-setup.sh with custom config file path.
- Execute /share/weston/multi-seat-setup.sh script file from target machine TTY terminal. [Note: This script shall not be executed from remote machine terminal.]
- Result - ACS desktop should appear on both the monitors each controllable with set of keyboard and mouse.
Disable Multi-Seat setup
- Move or delete the rule file created in /etc/udev/rules.d/
- Enable GDM - systemctl set-default graphical.target
- sudo reboot


