Files
garden/KaraKeep/attachments/68f59c48-9625-4f07-9e08-d2cd2577e253-Multi-seat-support-·-Wiki-·.jpg

172 lines
15 KiB
Plaintext
Raw Permalink Normal View History

2026-04-23 20:22:46 -05:00
<div id="readability-page-1" class="page">
<header tabindex="0"><a href="#content-body" data-testid="super-topbar-skip-to"> <span>
Skip to main content
</span></a> </header>
<div id="static-panel-portal">
<main id="content-body">
<div> <div><header><div><h2 data-testid="page-heading"> <span>Multi seat support</span> </h2> </div> </header></div> <div data-testid="wiki-page-content"><h2 id="user-content-multi-seat-confiuration" data-sourcepos="1:1-1:26" dir="auto">Multi-seat Confiuration<a href="#multi-seat-confiuration" aria-label="Link to heading 'Multi-seat Confiuration'" data-heading-content="Multi-seat Confiuration"></a></h2>
<p data-sourcepos="3:1-3:259" dir="auto">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.</p>
<h2 id="user-content-setup" data-sourcepos="5:1-5:8" dir="auto">Setup<a href="#setup" aria-label="Link to heading 'Setup'" data-heading-content="Setup"></a></h2>
<h4 id="user-content-hw-requirements-validated-only-on-amdgpu-setup" data-sourcepos="7:1-7:57" dir="auto"><strong data-sourcepos="7:6-7:57">HW Requirements (validated only on AMDGPU setup)</strong><a href="#hw-requirements-validated-only-on-amdgpu-setup" aria-label="Link to heading 'HW Requirements (validated only on AMDGPU setup)'" data-heading-content="HW Requirements (validated only on AMDGPU setup)"></a></h4>
<ol data-sourcepos="9:1-12:141" dir="auto">
<li data-sourcepos="9:1-9:20">APU + DGPU setup.</li>
<li data-sourcepos="10:1-10:63">Card0 and Card1 should be enumerated under /dev/dri/ folder.</li>
<li data-sourcepos="11:1-11:85">Each APU and dGPU should be connected with individual monitor, mouse and keyboard.</li>
<li data-sourcepos="12:1-13:0">Connect extra pair of keyboard and mouse which could be easily distinguished (different vendor or product id) with already connected pair.</li>
</ol>
<h4 id="user-content-one-time-setup" data-sourcepos="14:1-14:23" dir="auto"><strong data-sourcepos="14:6-14:23">One Time Setup</strong><a href="#one-time-setup" aria-label="Link to heading 'One Time Setup'" data-heading-content="One Time Setup"></a></h4>
<p data-sourcepos="16:1-16:11" dir="auto"><strong data-sourcepos="16:1-16:11">Step 1:</strong></p>
<p data-sourcepos="18:1-18:99" dir="auto">To make multi-seat setup, make sure to comment the "additional-devices=card1" config in weston.ini.</p>
<p data-sourcepos="20:1-20:80" dir="auto"><a href="https://gitlab.com/acs-wayland/weston/-/wikis/uploads/eebd7f8c68244782d9095ef1d9fe56be/additional_card.jpg" rel="noopener noreferrer" data-canonical-src="uploads/eebd7f8c68244782d9095ef1d9fe56be/additional_card.jpg" role="button" aria-label="View image" aria-haspopup="dialog"><img data-sourcepos="20:1-20:80" alt="additional_card" decoding="async" data-canonical-src="uploads/eebd7f8c68244782d9095ef1d9fe56be/additional_card.jpg" loading="lazy" src="https://gitlab.com/acs-wayland/weston/-/wikis/home/ACS-Features/uploads/eebd7f8c68244782d9095ef1d9fe56be/additional_card.jpg" data-testid="js-lazy-loaded-content"></a></p>
<p data-sourcepos="22:1-22:49" dir="auto"><strong data-sourcepos="22:1-22:49">Step 2: Create udev rule to create a new seat</strong></p>
<ul data-sourcepos="24:1-24:97" dir="auto">
<li data-sourcepos="24:1-25:0">Create a new udev rules file under /etc/udev/rules.d/ by following the below naming convention.</li>
</ul>
<div><pre data-sourcepos="26:1-28:3" id="code-42"><code><span id="LC1" lang="plaintext">&lt;priority&gt;-&lt;device name&gt;.rules</span></code></pre></div>
<ul data-sourcepos="30:1-34:99" dir="auto">
<li data-sourcepos="30:1-35:0">
<p data-sourcepos="30:3-30:211">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/</p>
<p data-sourcepos="32:3-32:86">Ex: New rule 69-graphics-seat.rules in the below figure is created with priority 69.</p>
<p data-sourcepos="34:3-34:99">Copy the below contents into 69-graphics-multseat.rules and update the parameters from next step.</p>
</li>
</ul>
<div><pre data-sourcepos="36:1-45:3" id="code-43"><code><span id="LC1" lang="plaintext">SUBSYSTEM=="drm", KERNEL=="card1", KERNELS=="0000:c7:00.0", TAG+="master-of-seat", </span>
<span id="LC2" lang="plaintext">ENV{ID_SEAT}="seat1"</span>
<span id="LC3" lang="plaintext">SUBSYSTEM=="drm", KERNEL=="renderD129", KERNELS=="0000:c7:00.0", ENV{ID_SEAT}="seat1"</span>
<span id="LC4" lang="plaintext">SUBSYSTEM=="graphics", KERNEL=="fb1", KERNELS=="0000:c7:00.0", ENV{ID_SEAT}="seat1"</span>
<span id="LC5" lang="plaintext">SUBSYSTEM=="input", ATTRS{devnum}=="9", ATTRS{idVendor}=="1bcf", ATTRS{idProduct}=="08a0", </span>
<span id="LC6" lang="plaintext">OWNER="acs2", ENV{ID_SEAT}="seat1"</span>
<span id="LC7" lang="plaintext">SUBSYSTEM=="input", ATTRS{devnum}=="4", ATTRS{idVendor}=="1a2c", ATTRS{idProduct}=="4c5e", </span>
<span id="LC8" lang="plaintext">OWNER="acs2", ENV{ID_SEAT}="seat1"</span></code></pre></div>
<ul data-sourcepos="47:1-51:175" dir="auto">
<li data-sourcepos="47:1-47:64">First 3 lines in above udev script will assign card1 to seat1.</li>
<li data-sourcepos="48:1-48:64">Last 2 lines will assign specific keyboard and mouse to seat1.</li>
<li data-sourcepos="49:1-49:79">By default, system will always have CARD0 assigned to DGPU, and CARD1 to APU.</li>
<li data-sourcepos="50:1-50:128">In above example, update keys like KERNELS, idVendor etc. with the system specific parameters and OWNER with system user-name.</li>
<li data-sourcepos="51:1-52:0">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"</li>
</ul>
<div><pre data-sourcepos="53:1-56:3" id="code-44"><code><span id="LC1" lang="plaintext">$ sudo chmod 777 &lt;path&gt;/share/weston/devices.sh</span>
<span id="LC2" lang="plaintext">$ cd &lt;path&gt;/share/weston &amp;&amp; ./devices.sh</span></code></pre></div>
<div><pre data-sourcepos="58:1-88:3" id="code-45"><code><span id="LC1" lang="plaintext">Sample output of devices.sh script</span>
<span id="LC2" lang="plaintext"></span>
<span id="LC3" lang="plaintext">--------------Card1 details-------------------</span>
<span id="LC4" lang="plaintext"></span>
<span id="LC5" lang="plaintext">/dev/dri/card1 value of KERNELS: 0000:c7:00.0</span>
<span id="LC6" lang="plaintext">fb1 value of KERNELS: 0000:c7:00.0</span>
<span id="LC7" lang="plaintext">render not value of KERNELS: 0000:c7:00.0</span>
<span id="LC8" lang="plaintext"></span>
<span id="LC9" lang="plaintext">---------------Mouses connected-----------------</span>
<span id="LC10" lang="plaintext">Mouse 1:</span>
<span id="LC11" lang="plaintext">Vendor ID: 1bcf</span>
<span id="LC12" lang="plaintext">Product ID: 08a0</span>
<span id="LC13" lang="plaintext">Device No: 009</span>
<span id="LC14" lang="plaintext"></span>
<span id="LC15" lang="plaintext">Mouse 2:</span>
<span id="LC16" lang="plaintext">Vendor ID: 1bcf</span>
<span id="LC17" lang="plaintext">Product ID: 08a0</span>
<span id="LC18" lang="plaintext">Device No: 008</span>
<span id="LC19" lang="plaintext"></span>
<span id="LC20" lang="plaintext">---------------Keyboards connected-----------------</span>
<span id="LC21" lang="plaintext">Keyboard 1:</span>
<span id="LC22" lang="plaintext">Vendor ID: 1a2c</span>
<span id="LC23" lang="plaintext">Product ID: 4c5e</span>
<span id="LC24" lang="plaintext">Device No: 004</span>
<span id="LC25" lang="plaintext"></span>
<span id="LC26" lang="plaintext">Keyboard 2:</span>
<span id="LC27" lang="plaintext">Vendor ID: 1a2c</span>
<span id="LC28" lang="plaintext">Product ID: 4c5e</span>
<span id="LC29" lang="plaintext">Device No: 002</span></code></pre></div>
<ul data-sourcepos="90:1-93:82" dir="auto">
<li data-sourcepos="90:1-90:116">Update the KERNELS param in rule file for card1, fb1 and renderD129 entries based on output from device.sh script.</li>
<li data-sourcepos="91:1-91:134">Select the keyboard and mouse based on information from device.sh and update the idVendor and idProduct, devnum params in rule file.</li>
<li data-sourcepos="92:1-92:102">ATTR{devnum} value can change on reboot so, we need to check this value used in rule on each reboot.</li>
<li data-sourcepos="93:1-94:0">When there is a change update the rule and run below command to reload new rule.</li>
</ul>
<div><pre data-sourcepos="95:1-101:3" id="code-46"><code><span id="LC1" lang="plaintext">Reload udev rules:</span>
<span id="LC2" lang="plaintext">$ sudo udevadm control --reload-rules</span>
<span id="LC3" lang="plaintext"></span>
<span id="LC4" lang="plaintext">Trigger udev to apply the new rules:</span>
<span id="LC5" lang="plaintext">$ sudo udevadm trigger</span></code></pre></div>
<p data-sourcepos="103:1-103:31" dir="auto"><strong data-sourcepos="103:1-103:31">Step 3 : Copy service files</strong></p>
<ol data-sourcepos="105:1-105:138" dir="auto">
<li data-sourcepos="105:1-106:0">Execute the below commands to copy the multi-seat related service files present under /opt/amdgpu/share/weston to respective locations.</li>
</ol>
<div><pre data-sourcepos="107:1-112:3" id="code-47"><code><span id="LC1" lang="plaintext">$ sudo cp &lt;path&gt;/share/weston/mysession.service /etc/systemd/system</span>
<span id="LC2" lang="plaintext">$ sudo cp &lt;path&gt;/share/weston/mysession.target /etc/systemd/user</span>
<span id="LC3" lang="plaintext">$ sudo cp &lt;path&gt;/share/weston/weston.service /etc/systemd/user</span>
<span id="LC4" lang="plaintext">$ sudo cp &lt;path&gt;/share/weston/weston.socket /etc/systemd/user</span></code></pre></div>
<ol data-sourcepos="114:1-114:115" start="2" dir="auto">
<li data-sourcepos="114:1-114:115">Edit /etc/systemd/system/mysession.service file as shown below and update User and Group with system's username.</li>
</ol>
<p data-sourcepos="116:1-116:98" dir="auto"><a href="https://gitlab.com/acs-wayland/weston/-/wikis/uploads/68e29faae4da7c0a964e96ad4c5d54a7/image-2024-7-10_17-16-33.png" rel="noopener noreferrer" data-canonical-src="uploads/68e29faae4da7c0a964e96ad4c5d54a7/image-2024-7-10_17-16-33.png" role="button" aria-label="View image" aria-haspopup="dialog"><img data-sourcepos="116:1-116:98" alt="image-2024-7-10_17-16-33" decoding="async" data-canonical-src="uploads/68e29faae4da7c0a964e96ad4c5d54a7/image-2024-7-10_17-16-33.png" loading="lazy" src="https://gitlab.com/acs-wayland/weston/-/wikis/home/ACS-Features/uploads/68e29faae4da7c0a964e96ad4c5d54a7/image-2024-7-10_17-16-33.png" data-testid="js-lazy-loaded-content"></a></p>
<ol data-sourcepos="118:1-118:88" start="3" dir="auto">
<li data-sourcepos="118:1-118:88">Edit /etc/systemd/user/weston.service file and update the config file path if needed.</li>
</ol>
<p data-sourcepos="120:1-120:96" dir="auto"><a href="https://gitlab.com/acs-wayland/weston/-/wikis/uploads/de9d65a75cb6db166b9f2d4ac59401b3/image-2024-7-10_17-23-6.png" rel="noopener noreferrer" data-canonical-src="uploads/de9d65a75cb6db166b9f2d4ac59401b3/image-2024-7-10_17-23-6.png" role="button" aria-label="View image" aria-haspopup="dialog"><img data-sourcepos="120:1-120:96" alt="image-2024-7-10_17-23-6" decoding="async" data-canonical-src="uploads/de9d65a75cb6db166b9f2d4ac59401b3/image-2024-7-10_17-23-6.png" loading="lazy" src="https://gitlab.com/acs-wayland/weston/-/wikis/home/ACS-Features/uploads/de9d65a75cb6db166b9f2d4ac59401b3/image-2024-7-10_17-23-6.png" data-testid="js-lazy-loaded-content"></a></p>
<ol data-sourcepos="122:1-122:43" start="4" dir="auto">
<li data-sourcepos="122:1-123:0">Run the below commands to reload systemd</li>
</ol>
<div><pre data-sourcepos="124:1-127:3" id="code-48"><code><span id="LC1" lang="plaintext">$ systemctl daemon-reload</span>
<span id="LC2" lang="plaintext">$ systemctl --user daemon-reload</span></code></pre></div>
<p data-sourcepos="129:1-129:24" dir="auto"><strong data-sourcepos="129:1-129:24">Step 4 : Disable GDM</strong></p>
<ol data-sourcepos="131:1-131:74" dir="auto">
<li data-sourcepos="131:1-132:0">Execute the below commands to disable GDM which internally disables GUI</li>
</ol>
<div><pre data-sourcepos="133:1-136:3" id="code-49"><code><span id="LC1" lang="plaintext">$ sudo systemctl disable gdm3</span>
<span id="LC2" lang="plaintext">$ sudo reboot</span></code></pre></div>
<ol data-sourcepos="138:1-138:88" start="2" dir="auto">
<li data-sourcepos="138:1-138:88">After system is rebooted, TTY terminal will appear for login. Login with credentials.</li>
</ol>
<p data-sourcepos="140:1-140:120" dir="auto">With this, One Time Setup for Multi-Seat is completed. These steps are not required unless Multi-Seat setup is disabled.</p>
<h2 id="user-content-launching-acs-on-multi-seat" data-sourcepos="142:1-142:34" dir="auto"><strong data-sourcepos="142:4-142:34">Launching ACS on Multi-Seat</strong><a href="#launching-acs-on-multi-seat" aria-label="Link to heading 'Launching ACS on Multi-Seat'" data-heading-content="Launching ACS on Multi-Seat"></a></h2>
<ol data-sourcepos="144:1-144:219" dir="auto">
<li data-sourcepos="144:1-145:0">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.</li>
</ol>
<div><pre data-sourcepos="146:1-148:3" id="code-50"><code><span id="LC1" lang="plaintext">$ loginctl list-seats</span></code></pre></div>
<ol data-sourcepos="150:1-150:146" start="2" dir="auto">
<li data-sourcepos="150:1-151:0">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</li>
</ol>
<div><pre data-sourcepos="152:1-158:3" id="code-51"><code><span id="LC1" lang="plaintext">Reload udev rules:</span>
<span id="LC2" lang="plaintext">$ sudo udevadm control --reload-rules</span>
<span id="LC3" lang="plaintext"></span>
<span id="LC4" lang="plaintext">Trigger udev to apply the new rules:</span>
<span id="LC5" lang="plaintext">$ sudo udevadm trigger</span></code></pre></div>
<ol data-sourcepos="160:1-163:108" start="3" dir="auto">
<li data-sourcepos="160:1-160:103">Edit /share/weston/multi-seat-setup.sh file to update the user-name and seat name as per the system.</li>
<li data-sourcepos="161:1-161:94">Optional : update the config file path in multi-seat-setup.sh with custom config file path.</li>
<li data-sourcepos="162:1-162:164">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.]</li>
<li data-sourcepos="163:1-164:0">Result - ACS desktop should appear on both the monitors each controllable with set of keyboard and mouse.</li>
</ol>
<h2 id="user-content-disable-multi-seat-setup" data-sourcepos="165:1-165:31" dir="auto"><strong data-sourcepos="165:4-165:31">Disable Multi-Seat setup</strong><a href="#disable-multi-seat-setup" aria-label="Link to heading 'Disable Multi-Seat setup'" data-heading-content="Disable Multi-Seat setup"></a></h2>
<ol data-sourcepos="167:1-169:14" dir="auto">
<li data-sourcepos="167:1-167:61">Move or delete the rule file created in /etc/udev/rules.d/</li>
<li data-sourcepos="168:1-168:54">Enable GDM - systemctl set-default graphical.target</li>
<li data-sourcepos="169:1-169:14">sudo reboot</li>
</ol></div> </div>
</main>
</div>
</div>