<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nutthawit Lilawannasin</title>
    <description>The latest articles on Forem by Nutthawit Lilawannasin (@nutthawit-l).</description>
    <link>https://forem.com/nutthawit-l</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3853205%2F85fdd4d7-283c-47c8-b03c-f00239f20b1a.png</url>
      <title>Forem: Nutthawit Lilawannasin</title>
      <link>https://forem.com/nutthawit-l</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nutthawit-l"/>
    <language>en</language>
    <item>
      <title>Configuring GPU Pass-Through for AMD cards on openSUSE Kalpa</title>
      <dc:creator>Nutthawit Lilawannasin</dc:creator>
      <pubDate>Wed, 01 Apr 2026 23:35:24 +0000</pubDate>
      <link>https://forem.com/nutthawit-l/configuring-gpu-pass-through-for-amd-cards-on-opensuse-kalpa-31e</link>
      <guid>https://forem.com/nutthawit-l/configuring-gpu-pass-through-for-amd-cards-on-opensuse-kalpa-31e</guid>
      <description>&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You need an &lt;strong&gt;additional display card&lt;/strong&gt; on the host (eg. 1 igpu + 1 dedicate gpu or 2 dedicate gpu).&lt;/li&gt;
&lt;li&gt;GPU pass-through is supported on the AMD64/Intel 64 architecture only.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configuring the host
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Verify the host environment
&lt;/h3&gt;

&lt;p&gt;Verify that the host support &lt;a href="https://doc.opensuse.org/documentation/leap/virtualization/html/book-virtualization/gloss-vt-glossary.html#gloss-vt-acronym-vtd" rel="noopener noreferrer"&gt;VT-d&lt;/a&gt; technology and that it is already enabled in the firmware settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dmesg | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"Directed I/O"&lt;/span&gt;
&lt;span class="go"&gt;[    0.283295] [      T1] DMAR: Intel(R) Virtualization Technology for Directed I/O
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Enable IOMMU
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://doc.opensuse.org/documentation/leap/virtualization/html/book-virtualization/gloss-vt-glossary.html#gloss-vt-acronym-iommu" rel="noopener noreferrer"&gt;IOMMU&lt;/a&gt; is disabled by default. You need to enable it at boot time in the /etc/kernel/cmdline configuration file. &lt;/p&gt;

&lt;p&gt;1) For Intel CPU add this line to file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;intel_iommu=on iommu=pt rd.driver.pre=vfio-pci
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) For AMD CPU add this line instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;amd_iommu=on iommu=pt rd.driver.pre=vfio-pci
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Finally, when you &lt;code&gt;cat&lt;/code&gt; the file, you will see content like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/kernel/cmdline 
&lt;span class="go"&gt;root=/dev/nvme0n1p2 splash=silent swapaccount=1 systemd.show_status=1 mitigations=auto quiet security=selinux selinux=1 intel_iommu=on iommu=pt rd.driver.pre=vfio-pci
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure &lt;a href="https://doc.opensuse.org/documentation/leap/virtualization/html/book-virtualization/gloss-vt-glossary.html#gloss-vt-acronym-vfio" rel="noopener noreferrer"&gt;VFIO&lt;/a&gt; and isolate the GPU used for pass-through
&lt;/h3&gt;

&lt;p&gt;1) Find the card vendor and model IDs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;lspci &lt;span class="nt"&gt;-nn&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"AMD"&lt;/span&gt;
&lt;span class="go"&gt;03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] [1002:7480] (rev cf)
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 HDMI/DP Audio [1002:ab30]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Create the file /etc/modprobe.d/vfio.conf with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;options vfio-pci ids=1002:7480,1002:ab30
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Load the VFIO driver
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Including the driver in the initrd file
&lt;/h4&gt;

&lt;p&gt;1) Create the file /etc/dracut.conf.d/gpu-passthrough.conf and add the following content &lt;strong&gt;(mind the leading whitespace)&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;add_drivers+=" vfio vfio_iommu_type1 vfio_pci "
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Re-generate the initrd file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sdbootutil list-snapshots
1 first root filesystem
2 Snapshot Update of #1
3 Snapshot Update of #2
4 Snapshot Update of #2
5 Snapshot Update of #4
6 Snapshot Update of #5
7 Snapshot Update of #4

# sdbootutil list-kernels 7
ok /lib/modules/6.19.5-2-default/vmlinuz -&amp;gt; opensuse-microos-6.19.5-2-default-7.conf

# sdbootutil update-all-entries 7
# sdbootutil mkinitrd 7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Reboot the host machine&lt;/p&gt;

&lt;p&gt;For most of the changes in the above steps to take effect, you need to reboot the host machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) Verify IOMMU is Active&lt;/p&gt;

&lt;p&gt;After your Kalpa host boots back up, open a terminal and check the kernel logs to confirm that the hardware isolation is working:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;dmesg | grep -i "Adding to iommu group"
[    0.283068] [      T1] pci 0000:00:00.0: Adding to iommu group 0
[    0.283078] [      T1] pci 0000:00:01.0: Adding to iommu group 1
[    0.283091] [      T1] pci 0000:00:14.0: Adding to iommu group 2
[    0.283097] [      T1] pci 0000:00:14.2: Adding to iommu group 2
[    0.283106] [      T1] pci 0000:00:15.0: Adding to iommu group 3
[    0.283115] [      T1] pci 0000:00:16.0: Adding to iommu group 4
[    0.283122] [      T1] pci 0000:00:17.0: Adding to iommu group 5
[    0.283137] [      T1] pci 0000:00:1a.0: Adding to iommu group 6
[    0.283147] [      T1] pci 0000:00:1c.0: Adding to iommu group 7
[    0.283155] [      T1] pci 0000:00:1c.3: Adding to iommu group 8
[    0.283163] [      T1] pci 0000:00:1c.4: Adding to iommu group 9
[    0.283172] [      T1] pci 0000:00:1d.0: Adding to iommu group 10
[    0.283188] [      T1] pci 0000:00:1f.0: Adding to iommu group 11
[    0.283195] [      T1] pci 0000:00:1f.3: Adding to iommu group 11
[    0.283201] [      T1] pci 0000:00:1f.4: Adding to iommu group 11
[    0.283208] [      T1] pci 0000:00:1f.5: Adding to iommu group 11
[    0.283216] [      T1] pci 0000:01:00.0: Adding to iommu group 12
[    0.283224] [      T1] pci 0000:02:00.0: Adding to iommu group 13
[    0.283235] [      T1] pci 0000:03:00.0: Adding to iommu group 14
[    0.283245] [      T1] pci 0000:03:00.1: Adding to iommu group 15
[    0.283260] [      T1] pci 0000:04:00.0: Adding to iommu group 16
[    0.283268] [      T1] pci 0000:06:00.0: Adding to iommu group 17
[    0.283275] [      T1] pci 0000:07:00.0: Adding to iommu group 18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configuring the guest
&lt;/h2&gt;

&lt;p&gt;This section describes how to configure the guest virtual machine so that it can use the host's GPU.&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements for the guest configuration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use Q35 chipset if possible.&lt;/li&gt;
&lt;li&gt;Install the guest VM using UEFI firmware.&lt;/li&gt;
&lt;li&gt;Add the following emulated Graphic: Spice or VNC&lt;/li&gt;
&lt;li&gt;Add the following emulated Device: qxl, VGA or Virtio&lt;/li&gt;
&lt;li&gt;Add the host PCI device (03:00.0 in our example) to the guest. &lt;/li&gt;
&lt;li&gt;For the best performance, we recommend using virtio drivers for the network card and storage. &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💡 Credits &amp;amp; Inspiration
&lt;/h3&gt;

&lt;p&gt;This article was inspired by &lt;a href="https://doc.opensuse.org/documentation/leap/virtualization/html/book-virtualization/app-gpu-passthru.html" rel="noopener noreferrer"&gt;Configuring GPU Pass-Through for NVIDIA cards&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>linux</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Install NetBird on openSUSE MicroOS</title>
      <dc:creator>Nutthawit Lilawannasin</dc:creator>
      <pubDate>Wed, 01 Apr 2026 23:34:46 +0000</pubDate>
      <link>https://forem.com/nutthawit-l/install-netbird-on-opensuse-microos-b2c</link>
      <guid>https://forem.com/nutthawit-l/install-netbird-on-opensuse-microos-b2c</guid>
      <description>&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ensure the &lt;code&gt;netbird&lt;/code&gt; binary is installed on the laptop or PC intended for use as a remote client.&lt;/li&gt;
&lt;li&gt;You will need to generate a &lt;strong&gt;Setup Key&lt;/strong&gt; from the NetBird Dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configure the Remote host
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install NetBird binary
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://app.netbird.io/install" rel="noopener noreferrer"&gt;official NetBird installation&lt;/a&gt; puts the binary in &lt;code&gt;/usr/bin/netbird&lt;/code&gt;. Because &lt;code&gt;/usr/bin&lt;/code&gt; is read-only, you'll need to remount it as read-write before running the curl installation script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;transactional-update shell
&lt;span class="gp"&gt;transactional update#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://pkgs.netbird.io/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Restore the SELinux file contexts
&lt;/h3&gt;

&lt;p&gt;Because SELinux is active by default on openSUSE, a relabeling of the NetBird binary is required for the systemd service to function properly.&lt;/p&gt;

&lt;p&gt;1) Resets file security contexts to their default values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;transactional update#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-ldZ&lt;/span&gt; /usr/bin/netbird 
&lt;span class="go"&gt;-rwxr-xr-x. 1 1001 1001 unconfined_u:object_r:user_tmp_t:s0 36741304 Mar 26 17:11 /usr/bin/netbird

&lt;/span&gt;&lt;span class="gp"&gt;transactional update#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;restorecon &lt;span class="nt"&gt;-v&lt;/span&gt; /usr/bin/netbird
&lt;span class="go"&gt;Relabeled /usr/bin/netbird from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:bin_t:s0
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Verify that the context is set to &lt;code&gt;unconfined_u:object_r:bin_t:s0&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;transactional update#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-ldZ&lt;/span&gt; /usr/bin/netbird 
&lt;span class="go"&gt;-rwxr-xr-x. 1 1001 1001 unconfined_u:object_r:bin_t:s0 36741304 Mar 26 17:11 /usr/bin/netbird
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Exist the shell and reboot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;transactional update#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) After a reboot, NetBird should start up automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;systemctl status netbird
&lt;span class="go"&gt;● netbird.service - NetBird mesh network client
&lt;/span&gt;&lt;span class="gp"&gt;     Loaded: loaded (/etc/systemd/system/netbird.service;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;enabled&lt;span class="p"&gt;;&lt;/span&gt; preset: disabled&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;     Active: active (running) since Wed 2026-04-01 08:44:41 +07;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;21s ago
&lt;span class="go"&gt; Invocation: e5061c215da54c8486540512dc798163
   Main PID: 1343 (netbird)
      Tasks: 9 (limit: 4465)
        CPU: 19ms
     CGroup: /system.slice/netbird.service
&lt;/span&gt;&lt;span class="gp"&gt;             └─1343 /usr/bin/netbird service run --log-level info --daemon-addr unix:///var/run/netbird.sock --log-file /var/log/netbird&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;
Apr 01 08:44:41 web-dev-microos systemd[1]: Started NetBird mesh network client.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup the connection with setup-key:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;netbird up &lt;span class="nt"&gt;--setup-key&lt;/span&gt; &amp;lt;YOUR-SETUP-KEY&amp;gt;
&lt;span class="go"&gt;Connected
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>linux</category>
      <category>networking</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
