fluxbb_forum_topic.html - webdump_tests - Testfiles for webdump
 (HTM) git clone git://git.codemadness.org/webdump_tests
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
       fluxbb_forum_topic.html (47092B)
       ---
            1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
            2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
            3 <head>
            4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            5 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
            6 <title>GPU passthrough / Kernel &amp; Hardware / Arch Linux Forums</title>
            7 <link rel="stylesheet" type="text/css" href="style/ArchLinux.css" />
            8 <link rel="canonical" href="viewtopic.php?id=288163" title="Page 1" />
            9 <link rel="alternate" type="application/atom+xml" href="extern.php?action=feed&amp;tid=288163&amp;type=atom" title="Atom topic feed" />
           10     <link rel="stylesheet" media="screen" href="style/ArchLinux/arch.css?v=5"/>
           11         <link rel="stylesheet" media="screen" href="style/ArchLinux/archnavbar.css?v=5"/>
           12     
           13 <link rel="shortcut icon" href="style/ArchLinux/favicon.ico" />
           14 </head>
           15 
           16 <body>
           17 <div id="archnavbar" class="anb-forum">
           18         <div id="archnavbarlogo"><h1><a href="http://archlinux.org/">Arch Linux</a></h1></div>
           19         <div id="archnavbarmenu">
           20                 <ul id="archnavbarlist">
           21                         <li id="anb-home"><a href="http://archlinux.org/">Home</a></li><li id="anb-packages"><a href="http://archlinux.org/packages/">Packages</a></li><li id="anb-forums" class="anb-selected"><a href="https://bbs.archlinux.org/">Forums</a></li><li id="anb-wiki"><a href="https://wiki.archlinux.org/">Wiki</a></li><li id="anb-bugs"><a href="https://bugs.archlinux.org/">Bugs</a></li><li id="anb-security"><a href="https://security.archlinux.org/">Security</a></li><li id="anb-aur"><a href="https://aur.archlinux.org/">AUR</a></li><li id="anb-download"><a href="http://archlinux.org/download/">Download</a></li>                </ul>
           22         </div>
           23 </div>
           24 
           25 
           26 <div id="punviewtopic" class="pun">
           27 <div class="top-box"></div>
           28 <div class="punwrap">
           29 
           30 <div id="brdheader" class="block">
           31         <div class="box">
           32                 <div id="brdmenu" class="inbox">
           33                         <ul>
           34                                 <li id="navindex" class="isactive"><a href="index.php">Index</a></li>
           35                                 <li id="navrules"><a href="misc.php?action=rules">Rules</a></li>
           36                                 <li id="navsearch"><a href="search.php">Search</a></li>
           37                                 <li id="navregister"><a href="register.php">Register</a></li>
           38                                 <li id="navlogin"><a href="login.php">Login</a></li>
           39                         </ul>
           40                 </div>
           41                 <div id="brdwelcome" class="inbox">
           42                         <p class="conl">You are not logged in.</p>
           43                         <ul class="conr">
           44                                 <li><span>Topics: <a href="search.php?action=show_recent" title="Find topics with recent posts.">Active</a> | <a href="search.php?action=show_unanswered" title="Find topics with no replies.">Unanswered</a></span></li>
           45                         </ul>
           46                         <div class="clearer"></div>
           47                 </div>
           48         </div>
           49 </div>
           50 
           51 
           52 
           53 <div id="brdmain">
           54 <div class="linkst">
           55         <div class="inbox crumbsplus">
           56                 <ul class="crumbs">
           57                         <li><a href="index.php">Index</a></li>
           58                         <li><span>»&#160;</span><a href="viewforum.php?id=22">Kernel &amp; Hardware</a></li>
           59                         <li><span>»&#160;</span><strong><a href="viewtopic.php?id=288163">GPU passthrough</a></strong></li>
           60                 </ul>
           61                 <div class="pagepost">
           62                         <p class="pagelink conl"><span class="pages-label">Pages: </span><strong class="item1">1</strong></p>
           63                 </div>
           64                 <div class="clearer"></div>
           65         </div>
           66 </div>
           67 
           68 <div id="p2116307" class="blockpost rowodd firstpost blockpost1">
           69         <h2><span><span class="conr">#1</span> <a href="viewtopic.php?pid=2116307#p2116307">2023-08-20 03:09:41</a></span></h2>
           70         <div class="box">
           71                 <div class="inbox">
           72                         <div class="postbody">
           73                                 <div class="postleft">
           74                                         <dl>
           75                                                 <dt><strong>rasmuoy</strong></dt>
           76                                                 <dd class="usertitle"><strong>Member</strong></dd>
           77                                                 <dd><span>Registered: 2023-07-19</span></dd>
           78                                                 <dd><span>Posts: 13</span></dd>
           79                                         </dl>
           80                                 </div>
           81                                 <div class="postright">
           82                                         <h3>GPU passthrough</h3>
           83                                         <div class="postmsg">
           84                                                 <p>Followed the guide to set up identical GPU pass-through from the wiki (<a href="https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Using_identical_guest_and_host_GPUs" rel="nofollow">https://wiki.archlinux.org/title/PCI_pa … _host_GPUs</a>), and ended up in an interesting position.</p><p>I have two Nvidia M4000&#039;s (it&#039;s what I had) and would like to share one with a Windows VM. Everything seems to work except:</p><p>If I load Nvidia modules first in mkinitcpio.conf I can see my screen during boot for LUKS encryption - but I won&#039;t get vfio pci passthrough on the second GPU<br />If I load vfio modules first, I can&#039;t see the screen when I need to type in the password for LUKS (since Nvidia is not loaded) but when I type inn the password and everything works - VFIO works as well.</p><p>mkinitcpio.conf:</p><div class="codebox"><pre><code>MODULES=(vmd nvidia nvidia_modeset nvidia_uvm nvidia_drm vfio_pci vfio vfio_iommu_type1) - this show my screen, but no VFIO
           85 MODULES=(vmd vfio_pci vfio vfio_iommu_type1 nvidia nvidia_modeset nvidia_uvm nvidia_drm ) - blank screen at boot, but VFIO works
           86 FILES=(/usr/local/bin/vfio-pci-override.sh)
           87 HOOKS=(base udev autodetect keyboard encrypt lvm2 keymap consolefont block filesystems modconf fsck)</code></pre></div><p>/boot/loader/entries/arch-lts.conf </p><div class="codebox"><pre><code>title   Arch Linux
           88 linux   /vmlinuz-linux-lts
           89 initrd  /intel-ucode.img
           90 initrd  /initramfs-linux-lts.img
           91 options cryptdevice=UUID=xyz:luks root=/dev/mapper/vg0-root rw quiet splash intel_iommu=on</code></pre></div><p>/usr/local/bin/vfio-pci-override.sh</p><div class="codebox"><pre><code>#!/bin/sh
           92 
           93 DEVS=&quot;0000:08:00.0 0000:08:00.1&quot;
           94 
           95 if [ ! -z &quot;$(ls -A /sys/class/iommu)&quot; ]; then
           96     for DEV in $DEVS; do
           97         echo &quot;vfio-pci&quot; &gt; /sys/bus/pci/devices/$DEV/driver_override
           98     done
           99 fi
          100 
          101 modprobe -i vfio-pci</code></pre></div><p>Is there some sort of order I can put the Modules/Hooks in, to allow for me to load VFIO, but also see when I need to input password and when I fail to put it in right, need to repeat?</p>
          102                                         </div>
          103                                 </div>
          104                         </div>
          105                 </div>
          106                 <div class="inbox">
          107                         <div class="postfoot clearb">
          108                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          109                         </div>
          110                 </div>
          111         </div>
          112 </div>
          113 
          114 <div id="p2116330" class="blockpost roweven">
          115         <h2><span><span class="conr">#2</span> <a href="viewtopic.php?pid=2116330#p2116330">2023-08-20 08:21:13</a></span></h2>
          116         <div class="box">
          117                 <div class="inbox">
          118                         <div class="postbody">
          119                                 <div class="postleft">
          120                                         <dl>
          121                                                 <dt><strong>seth</strong></dt>
          122                                                 <dd class="usertitle"><strong>Member</strong></dd>
          123                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          124                                                 <dd><span>Registered: 2012-09-03</span></dd>
          125                                                 <dd><span>Posts: 41,420</span></dd>
          126                                         </dl>
          127                                 </div>
          128                                 <div class="postright">
          129                                         <h3>Re: GPU passthrough</h3>
          130                                         <div class="postmsg">
          131                                                 <p>You&#039;re probably booting on 0000:08:00.0, did you try to pass through the other GPU?</p>
          132                                         </div>
          133                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          134                                 </div>
          135                         </div>
          136                 </div>
          137                 <div class="inbox">
          138                         <div class="postfoot clearb">
          139                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          140                         </div>
          141                 </div>
          142         </div>
          143 </div>
          144 
          145 <div id="p2116362" class="blockpost rowodd">
          146         <h2><span><span class="conr">#3</span> <a href="viewtopic.php?pid=2116362#p2116362">2023-08-20 11:58:25</a></span></h2>
          147         <div class="box">
          148                 <div class="inbox">
          149                         <div class="postbody">
          150                                 <div class="postleft">
          151                                         <dl>
          152                                                 <dt><strong>rasmuoy</strong></dt>
          153                                                 <dd class="usertitle"><strong>Member</strong></dd>
          154                                                 <dd><span>Registered: 2023-07-19</span></dd>
          155                                                 <dd><span>Posts: 13</span></dd>
          156                                         </dl>
          157                                 </div>
          158                                 <div class="postright">
          159                                         <h3>Re: GPU passthrough</h3>
          160                                         <div class="postmsg">
          161                                                 <p>To check this I tried the &quot;Passthrough all GPUs but the boot GPU&quot; but same issue.</p><p>Once again, everything works fine once it&#039;s booted - it&#039;s just during the LUKS password phase where the screen is black.</p><div class="codebox"><pre><code>#!/bin/sh
          162 
          163 for i in /sys/bus/pci/devices/*/boot_vga; do
          164     if [ $(cat &quot;$i&quot;) -eq 0 ]; then
          165         GPU=&quot;${i%/boot_vga}&quot;
          166         AUDIO=&quot;$(echo &quot;$GPU&quot; | sed -e &quot;s/0$/1/&quot;)&quot;
          167         USB=&quot;$(echo &quot;$GPU&quot; | sed -e &quot;s/0$/2/&quot;)&quot;
          168         echo &quot;vfio-pci&quot; &gt; &quot;$GPU/driver_override&quot;
          169         if [ -d &quot;$AUDIO&quot; ]; then
          170             echo &quot;vfio-pci&quot; &gt; &quot;$AUDIO/driver_override&quot;
          171         fi
          172         if [ -d &quot;$USB&quot; ]; then
          173             echo &quot;vfio-pci&quot; &gt; &quot;$USB/driver_override&quot;
          174         fi
          175     fi
          176 done
          177 
          178 modprobe -i vfio-pci</code></pre></div><p>It very much seems like because I am not loading the Nvidia driver, the screen is black when I need to input the password for LUKS, but if I load the Nvidia driver, VFIO cannot claim the graphics card that has already been loaded using the Nvidia driver?</p>
          179                                         </div>
          180                                 </div>
          181                         </div>
          182                 </div>
          183                 <div class="inbox">
          184                         <div class="postfoot clearb">
          185                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          186                         </div>
          187                 </div>
          188         </div>
          189 </div>
          190 
          191 <div id="p2116363" class="blockpost roweven">
          192         <h2><span><span class="conr">#4</span> <a href="viewtopic.php?pid=2116363#p2116363">2023-08-20 12:12:14</a></span></h2>
          193         <div class="box">
          194                 <div class="inbox">
          195                         <div class="postbody">
          196                                 <div class="postleft">
          197                                         <dl>
          198                                                 <dt><strong>Lone_Wolf</strong></dt>
          199                                                 <dd class="usertitle"><strong>Member</strong></dd>
          200                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/4504.jpg?m=1572193439" width="61" height="79" alt="" /></dd>
          201                                                 <dd><span>From: Netherlands, Europe</span></dd>
          202                                                 <dd><span>Registered: 2005-10-04</span></dd>
          203                                                 <dd><span>Posts: 11,248</span></dd>
          204                                         </dl>
          205                                 </div>
          206                                 <div class="postright">
          207                                         <h3>Re: GPU passthrough</h3>
          208                                         <div class="postmsg">
          209                                                 <p>It&#039;s supposed to be&#160; a driver <strong>override</strong> so I expect it will work .</p><p>Let&#039;s verify which gpu is seen as boot vga .</p><p>What is the output of </p><div class="codebox"><pre><code>$ for i in /sys/bus/pci/devices/*/boot_vga; do echo $i ; done</code></pre></div>
          210                                         </div>
          211                                         <div class="postsignature postmsg"><hr /><p>Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.</p><br /><p>(A works at time B)&#160; &amp;&amp; (time C &gt; time B ) ≠&#160; (A works at time C)</p></div>
          212                                 </div>
          213                         </div>
          214                 </div>
          215                 <div class="inbox">
          216                         <div class="postfoot clearb">
          217                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          218                         </div>
          219                 </div>
          220         </div>
          221 </div>
          222 
          223 <div id="p2116367" class="blockpost rowodd">
          224         <h2><span><span class="conr">#5</span> <a href="viewtopic.php?pid=2116367#p2116367">2023-08-20 12:21:46</a></span></h2>
          225         <div class="box">
          226                 <div class="inbox">
          227                         <div class="postbody">
          228                                 <div class="postleft">
          229                                         <dl>
          230                                                 <dt><strong>rasmuoy</strong></dt>
          231                                                 <dd class="usertitle"><strong>Member</strong></dd>
          232                                                 <dd><span>Registered: 2023-07-19</span></dd>
          233                                                 <dd><span>Posts: 13</span></dd>
          234                                         </dl>
          235                                 </div>
          236                                 <div class="postright">
          237                                         <h3>Re: GPU passthrough</h3>
          238                                         <div class="postmsg">
          239                                                 <p>for i in /sys/bus/pci/devices/*/boot_vga; do echo $i ; done</p><div class="codebox"><pre><code>/sys/bus/pci/devices/0000:01:00.0/boot_vga
          240 /sys/bus/pci/devices/0000:08:00.0/boot_vga</code></pre></div>
          241                                         </div>
          242                                 </div>
          243                         </div>
          244                 </div>
          245                 <div class="inbox">
          246                         <div class="postfoot clearb">
          247                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          248                         </div>
          249                 </div>
          250         </div>
          251 </div>
          252 
          253 <div id="p2116369" class="blockpost roweven">
          254         <h2><span><span class="conr">#6</span> <a href="viewtopic.php?pid=2116369#p2116369">2023-08-20 12:28:19</a></span></h2>
          255         <div class="box">
          256                 <div class="inbox">
          257                         <div class="postbody">
          258                                 <div class="postleft">
          259                                         <dl>
          260                                                 <dt><strong>seth</strong></dt>
          261                                                 <dd class="usertitle"><strong>Member</strong></dd>
          262                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          263                                                 <dd><span>Registered: 2012-09-03</span></dd>
          264                                                 <dd><span>Posts: 41,420</span></dd>
          265                                         </dl>
          266                                 </div>
          267                                 <div class="postright">
          268                                         <h3>Re: GPU passthrough</h3>
          269                                         <div class="postmsg">
          270                                                 <p>The content of that file matters, notably wrt that script:</p><div class="codebox"><pre><code>tail /sys/bus/pci/devices/*/boot_vga</code></pre></div>
          271                                         </div>
          272                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          273                                 </div>
          274                         </div>
          275                 </div>
          276                 <div class="inbox">
          277                         <div class="postfoot clearb">
          278                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          279                         </div>
          280                 </div>
          281         </div>
          282 </div>
          283 
          284 <div id="p2116370" class="blockpost rowodd">
          285         <h2><span><span class="conr">#7</span> <a href="viewtopic.php?pid=2116370#p2116370">2023-08-20 12:29:58</a></span></h2>
          286         <div class="box">
          287                 <div class="inbox">
          288                         <div class="postbody">
          289                                 <div class="postleft">
          290                                         <dl>
          291                                                 <dt><strong>rasmuoy</strong></dt>
          292                                                 <dd class="usertitle"><strong>Member</strong></dd>
          293                                                 <dd><span>Registered: 2023-07-19</span></dd>
          294                                                 <dd><span>Posts: 13</span></dd>
          295                                         </dl>
          296                                 </div>
          297                                 <div class="postright">
          298                                         <h3>Re: GPU passthrough</h3>
          299                                         <div class="postmsg">
          300                                                 <p>tail /sys/bus/pci/devices/*/boot_vga</p><div class="codebox"><pre><code>==&gt; /sys/bus/pci/devices/0000:01:00.0/boot_vga &lt;==
          301 1
          302 
          303 ==&gt; /sys/bus/pci/devices/0000:08:00.0/boot_vga &lt;==
          304 0</code></pre></div>
          305                                         </div>
          306                                 </div>
          307                         </div>
          308                 </div>
          309                 <div class="inbox">
          310                         <div class="postfoot clearb">
          311                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          312                         </div>
          313                 </div>
          314         </div>
          315 </div>
          316 
          317 <div id="p2116373" class="blockpost roweven">
          318         <h2><span><span class="conr">#8</span> <a href="viewtopic.php?pid=2116373#p2116373">2023-08-20 12:41:44</a></span></h2>
          319         <div class="box">
          320                 <div class="inbox">
          321                         <div class="postbody">
          322                                 <div class="postleft">
          323                                         <dl>
          324                                                 <dt><strong>seth</strong></dt>
          325                                                 <dd class="usertitle"><strong>Member</strong></dd>
          326                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          327                                                 <dd><span>Registered: 2012-09-03</span></dd>
          328                                                 <dd><span>Posts: 41,420</span></dd>
          329                                         </dl>
          330                                 </div>
          331                                 <div class="postright">
          332                                         <h3>Re: GPU passthrough</h3>
          333                                         <div class="postmsg">
          334                                                 <p>0000:01:00.0 is the boot device, 0000:08:00.0 should™ be available for vfio.</p><p>Try a slightly adjusted script</p><div class="codebox"><pre><code>#!/bin/bash
          335 set +x
          336 DEVS=&quot;0000:08:00.0 0000:08:00.1&quot;
          337 
          338 if [ ! -z &quot;$(ls -A /sys/class/iommu)&quot; ]; then
          339     for DEV in $DEVS; do
          340         echo &quot;vfio-pci&quot; &gt; /sys/bus/pci/devices/$DEV/driver_override
          341         tail -v /sys/bus/pci/devices/$DEV/driver_override
          342     done
          343 fi
          344 
          345 modprobe -v -i vfio-pci</code></pre></div><p>Post the output and compare the outputs of </p><div class="codebox"><pre><code>lspci -knns 0000:01:00.0
          346 lspci -knns 0000:08:00.0</code></pre></div><p> before and after running it.</p>
          347                                         </div>
          348                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          349                                 </div>
          350                         </div>
          351                 </div>
          352                 <div class="inbox">
          353                         <div class="postfoot clearb">
          354                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          355                         </div>
          356                 </div>
          357         </div>
          358 </div>
          359 
          360 <div id="p2116432" class="blockpost rowodd">
          361         <h2><span><span class="conr">#9</span> <a href="viewtopic.php?pid=2116432#p2116432">2023-08-20 18:07:47</a></span></h2>
          362         <div class="box">
          363                 <div class="inbox">
          364                         <div class="postbody">
          365                                 <div class="postleft">
          366                                         <dl>
          367                                                 <dt><strong>rasmuoy</strong></dt>
          368                                                 <dd class="usertitle"><strong>Member</strong></dd>
          369                                                 <dd><span>Registered: 2023-07-19</span></dd>
          370                                                 <dd><span>Posts: 13</span></dd>
          371                                         </dl>
          372                                 </div>
          373                                 <div class="postright">
          374                                         <h3>Re: GPU passthrough</h3>
          375                                         <div class="postmsg">
          376                                                 <div class="quotebox"><cite>seth wrote:</cite><blockquote><div><p>0000:01:00.0 is the boot device, 0000:08:00.0 should™ be available for vfio.</p><p>Try a slightly adjusted script</p><div class="codebox"><pre><code>#!/bin/bash
          377 set +x
          378 DEVS=&quot;0000:08:00.0 0000:08:00.1&quot;
          379 
          380 if [ ! -z &quot;$(ls -A /sys/class/iommu)&quot; ]; then
          381     for DEV in $DEVS; do
          382         echo &quot;vfio-pci&quot; &gt; /sys/bus/pci/devices/$DEV/driver_override
          383         tail -v /sys/bus/pci/devices/$DEV/driver_override
          384     done
          385 fi
          386 
          387 modprobe -v -i vfio-pci</code></pre></div><p>Post the output and compare the outputs of </p><div class="codebox"><pre><code>lspci -knns 0000:01:00.0
          388 lspci -knns 0000:08:00.0</code></pre></div><p> before and after running it.</p></div></blockquote></div><br /><br /><p>Before (with Nvidia After VFIO in Modules)</p><div class="codebox"><pre><code>01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          389         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          390         Kernel driver in use: nvidia
          391         Kernel modules: nouveau, nvidia_drm, nvidia
          392 08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          393         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          394         Kernel driver in use: vfio-pci
          395         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div><p>After (With Nvidia After VFIO in Modules)</p><div class="codebox"><pre><code>01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          396         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          397         Kernel driver in use: nvidia
          398         Kernel modules: nouveau, nvidia_drm, nvidia
          399 08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          400         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          401         Kernel driver in use: vfio-pci
          402         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div><p>New script and NVIDIA before VFIO in modules</p><div class="codebox"><pre><code>01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          403         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          404         Kernel driver in use: nvidia
          405         Kernel modules: nouveau, nvidia_drm, nvidia
          406 08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          407         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          408         Kernel driver in use: nvidia
          409         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div>
          410                                                 <p class="postedit"><em>Last edited by rasmuoy (2023-08-20 18:37:10)</em></p>
          411                                         </div>
          412                                 </div>
          413                         </div>
          414                 </div>
          415                 <div class="inbox">
          416                         <div class="postfoot clearb">
          417                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          418                         </div>
          419                 </div>
          420         </div>
          421 </div>
          422 
          423 <div id="p2116440" class="blockpost roweven">
          424         <h2><span><span class="conr">#10</span> <a href="viewtopic.php?pid=2116440#p2116440">2023-08-20 18:41:26</a></span></h2>
          425         <div class="box">
          426                 <div class="inbox">
          427                         <div class="postbody">
          428                                 <div class="postleft">
          429                                         <dl>
          430                                                 <dt><strong>seth</strong></dt>
          431                                                 <dd class="usertitle"><strong>Member</strong></dd>
          432                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          433                                                 <dd><span>Registered: 2012-09-03</span></dd>
          434                                                 <dd><span>Posts: 41,420</span></dd>
          435                                         </dl>
          436                                 </div>
          437                                 <div class="postright">
          438                                         <h3>Re: GPU passthrough</h3>
          439                                         <div class="postmsg">
          440                                                 <p>&quot;With Nvidia After VIFO in Modules&quot; both have 08:00.0 on vfio-pci (what&#039;s not much of a surprise), &quot;NVIDIA before VIFO in modules&quot; have both GPUs on nvidia - is the (single) output for that condition before or after running the script and most importantly: what&#039;s actually the output of the script?</p>
          441                                         </div>
          442                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          443                                 </div>
          444                         </div>
          445                 </div>
          446                 <div class="inbox">
          447                         <div class="postfoot clearb">
          448                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          449                         </div>
          450                 </div>
          451         </div>
          452 </div>
          453 
          454 <div id="p2116444" class="blockpost rowodd">
          455         <h2><span><span class="conr">#11</span> <a href="viewtopic.php?pid=2116444#p2116444">2023-08-20 18:48:30</a></span></h2>
          456         <div class="box">
          457                 <div class="inbox">
          458                         <div class="postbody">
          459                                 <div class="postleft">
          460                                         <dl>
          461                                                 <dt><strong>rasmuoy</strong></dt>
          462                                                 <dd class="usertitle"><strong>Member</strong></dd>
          463                                                 <dd><span>Registered: 2023-07-19</span></dd>
          464                                                 <dd><span>Posts: 13</span></dd>
          465                                         </dl>
          466                                 </div>
          467                                 <div class="postright">
          468                                         <h3>Re: GPU passthrough</h3>
          469                                         <div class="postmsg">
          470                                                 <div class="quotebox"><cite>seth wrote:</cite><blockquote><div><p>&quot;With Nvidia After VIFO in Modules&quot; both have 08:00.0 on vfio-pci (what&#039;s not much of a surprise), &quot;NVIDIA before VIFO in modules&quot; have both GPUs on nvidia - is the (single) output for that condition before or after running the script and most importantly: what&#039;s actually the output of the script?</p></div></blockquote></div><p>It&#039;s the same both before and after running the script (and rebooting with the script)</p><p>Output from the script:</p><div class="codebox"><pre><code>==&gt; /sys/bus/pci/devices/0000:08:00.0/driver_override &lt;==
          471 vfio-pci
          472 ==&gt; /sys/bus/pci/devices/0000:08:00.1/driver_override &lt;==
          473 vfio-pci
          474 insmod /lib/modules/6.1.46-1-lts/kernel/drivers/vfio/pci/vfio-pci.ko.zst </code></pre></div><p>But it leaves &quot;Kernel driver in use&quot; as nvidia.</p>
          475                                         </div>
          476                                 </div>
          477                         </div>
          478                 </div>
          479                 <div class="inbox">
          480                         <div class="postfoot clearb">
          481                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          482                         </div>
          483                 </div>
          484         </div>
          485 </div>
          486 
          487 <div id="p2116445" class="blockpost roweven">
          488         <h2><span><span class="conr">#12</span> <a href="viewtopic.php?pid=2116445#p2116445">2023-08-20 18:57:40</a></span></h2>
          489         <div class="box">
          490                 <div class="inbox">
          491                         <div class="postbody">
          492                                 <div class="postleft">
          493                                         <dl>
          494                                                 <dt><strong>seth</strong></dt>
          495                                                 <dd class="usertitle"><strong>Member</strong></dd>
          496                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          497                                                 <dd><span>Registered: 2012-09-03</span></dd>
          498                                                 <dd><span>Posts: 41,420</span></dd>
          499                                         </dl>
          500                                 </div>
          501                                 <div class="postright">
          502                                         <h3>Re: GPU passthrough</h3>
          503                                         <div class="postmsg">
          504                                                 <p>Unload vfio-pci first, then re-run the script.<br />It also should have printed more because of the &quot;set -x&quot; … except i typo&#039;d &quot;set +x&quot; - doesn&#039;t matter: the relevant overrides get applied so the script principally works.</p>
          505                                         </div>
          506                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          507                                 </div>
          508                         </div>
          509                 </div>
          510                 <div class="inbox">
          511                         <div class="postfoot clearb">
          512                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          513                         </div>
          514                 </div>
          515         </div>
          516 </div>
          517 
          518 <div id="p2116453" class="blockpost rowodd">
          519         <h2><span><span class="conr">#13</span> <a href="viewtopic.php?pid=2116453#p2116453">2023-08-20 19:56:07</a></span></h2>
          520         <div class="box">
          521                 <div class="inbox">
          522                         <div class="postbody">
          523                                 <div class="postleft">
          524                                         <dl>
          525                                                 <dt><strong>rasmuoy</strong></dt>
          526                                                 <dd class="usertitle"><strong>Member</strong></dd>
          527                                                 <dd><span>Registered: 2023-07-19</span></dd>
          528                                                 <dd><span>Posts: 13</span></dd>
          529                                         </dl>
          530                                 </div>
          531                                 <div class="postright">
          532                                         <h3>Re: GPU passthrough</h3>
          533                                         <div class="postmsg">
          534                                                 <p>with set -x and unloading vfio-pci:</p><div class="codebox"><pre><code>+ DEVS=&#039;0000:08:00.0 0000:08:00.1&#039;
          535 ++ ls -A /sys/class/iommu
          536 + &#039;[&#039; &#039;!&#039; -z &#039;dmar0
          537 dmar1&#039; &#039;]&#039;
          538 + for DEV in $DEVS
          539 + echo vfio-pci
          540 + tail -v /sys/bus/pci/devices/0000:08:00.0/driver_override
          541 ==&gt; /sys/bus/pci/devices/0000:08:00.0/driver_override &lt;==
          542 vfio-pci
          543 + for DEV in $DEVS
          544 + echo vfio-pci
          545 + tail -v /sys/bus/pci/devices/0000:08:00.1/driver_override
          546 ==&gt; /sys/bus/pci/devices/0000:08:00.1/driver_override &lt;==
          547 vfio-pci
          548 + modprobe -v -i vfio-pci
          549 insmod /lib/modules/6.1.46-1-lts/kernel/drivers/vfio/pci/vfio-pci-core.ko.zst 
          550 insmod /lib/modules/6.1.46-1-lts/kernel/drivers/vfio/pci/vfio-pci.ko.zst </code></pre></div><p>rerunning lspci still shows nvidia driver</p>
          551                                         </div>
          552                                 </div>
          553                         </div>
          554                 </div>
          555                 <div class="inbox">
          556                         <div class="postfoot clearb">
          557                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          558                         </div>
          559                 </div>
          560         </div>
          561 </div>
          562 
          563 <div id="p2116455" class="blockpost roweven">
          564         <h2><span><span class="conr">#14</span> <a href="viewtopic.php?pid=2116455#p2116455">2023-08-20 20:10:33</a></span></h2>
          565         <div class="box">
          566                 <div class="inbox">
          567                         <div class="postbody">
          568                                 <div class="postleft">
          569                                         <dl>
          570                                                 <dt><strong>seth</strong></dt>
          571                                                 <dd class="usertitle"><strong>Member</strong></dd>
          572                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          573                                                 <dd><span>Registered: 2012-09-03</span></dd>
          574                                                 <dd><span>Posts: 41,420</span></dd>
          575                                         </dl>
          576                                 </div>
          577                                 <div class="postright">
          578                                         <h3>Re: GPU passthrough</h3>
          579                                         <div class="postmsg">
          580                                                 <p>grumpf.<br />Does it help to re-bind the device?</p><div class="codebox"><pre><code>echo 0000:08:00.0 | sudo tee /sys/bus/pci/devices/0000:08:00.0/driver/unbind
          581 echo 0000:08:00.1 | sudo tee /sys/bus/pci/devices/0000:08:00.0/driver/unbind
          582 echo 0000:08:00.0 | sudo tee /sys/bus/pci/drivers_probe
          583 echo 0000:08:00.1 | sudo tee /sys/bus/pci/drivers_probe</code></pre></div><p>Edit: both devices…</p>
          584                                                 <p class="postedit"><em>Last edited by seth (2023-08-20 20:12:43)</em></p>
          585                                         </div>
          586                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          587                                 </div>
          588                         </div>
          589                 </div>
          590                 <div class="inbox">
          591                         <div class="postfoot clearb">
          592                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          593                         </div>
          594                 </div>
          595         </div>
          596 </div>
          597 
          598 <div id="p2116464" class="blockpost rowodd">
          599         <h2><span><span class="conr">#15</span> <a href="viewtopic.php?pid=2116464#p2116464">2023-08-20 20:59:40</a></span></h2>
          600         <div class="box">
          601                 <div class="inbox">
          602                         <div class="postbody">
          603                                 <div class="postleft">
          604                                         <dl>
          605                                                 <dt><strong>rasmuoy</strong></dt>
          606                                                 <dd class="usertitle"><strong>Member</strong></dd>
          607                                                 <dd><span>Registered: 2023-07-19</span></dd>
          608                                                 <dd><span>Posts: 13</span></dd>
          609                                         </dl>
          610                                 </div>
          611                                 <div class="postright">
          612                                         <h3>Re: GPU passthrough</h3>
          613                                         <div class="postmsg">
          614                                                 <div class="quotebox"><cite>seth wrote:</cite><blockquote><div><p>grumpf.<br />Does it help to re-bind the device?</p><div class="codebox"><pre><code>echo 0000:08:00.0 | sudo tee /sys/bus/pci/devices/0000:08:00.0/driver/unbind
          615 echo 0000:08:00.1 | sudo tee /sys/bus/pci/devices/0000:08:00.0/driver/unbind
          616 echo 0000:08:00.0 | sudo tee /sys/bus/pci/drivers_probe
          617 echo 0000:08:00.1 | sudo tee /sys/bus/pci/drivers_probe</code></pre></div><p>Edit: both devices…</p></div></blockquote></div><br /><p>I&#039;m probably doing something wrong, but when I try to run the commands, it just says:<br />bash: /sys/bus/pci/devices/0000:08:00.0/driver/unbind: No such file or directory</p><p>Is this a case of just make the drives and run the command again, or is something missing?</p>
          618                                         </div>
          619                                 </div>
          620                         </div>
          621                 </div>
          622                 <div class="inbox">
          623                         <div class="postfoot clearb">
          624                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          625                         </div>
          626                 </div>
          627         </div>
          628 </div>
          629 
          630 <div id="p2116467" class="blockpost roweven">
          631         <h2><span><span class="conr">#16</span> <a href="viewtopic.php?pid=2116467#p2116467">2023-08-20 21:15:13</a></span></h2>
          632         <div class="box">
          633                 <div class="inbox">
          634                         <div class="postbody">
          635                                 <div class="postleft">
          636                                         <dl>
          637                                                 <dt><strong>seth</strong></dt>
          638                                                 <dd class="usertitle"><strong>Member</strong></dd>
          639                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          640                                                 <dd><span>Registered: 2012-09-03</span></dd>
          641                                                 <dd><span>Posts: 41,420</span></dd>
          642                                         </dl>
          643                                 </div>
          644                                 <div class="postright">
          645                                         <h3>Re: GPU passthrough</h3>
          646                                         <div class="postmsg">
          647                                                 <div class="codebox"><pre><code>cat /sys/bus/pci/devices/0000:08:00.0/vendor
          648 ls /sys/bus/pci/devices/0000:08:00.0/driver</code></pre></div>
          649                                         </div>
          650                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          651                                 </div>
          652                         </div>
          653                 </div>
          654                 <div class="inbox">
          655                         <div class="postfoot clearb">
          656                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          657                         </div>
          658                 </div>
          659         </div>
          660 </div>
          661 
          662 <div id="p2116469" class="blockpost rowodd">
          663         <h2><span><span class="conr">#17</span> <a href="viewtopic.php?pid=2116469#p2116469">2023-08-20 21:22:25</a></span></h2>
          664         <div class="box">
          665                 <div class="inbox">
          666                         <div class="postbody">
          667                                 <div class="postleft">
          668                                         <dl>
          669                                                 <dt><strong>rasmuoy</strong></dt>
          670                                                 <dd class="usertitle"><strong>Member</strong></dd>
          671                                                 <dd><span>Registered: 2023-07-19</span></dd>
          672                                                 <dd><span>Posts: 13</span></dd>
          673                                         </dl>
          674                                 </div>
          675                                 <div class="postright">
          676                                         <h3>Re: GPU passthrough</h3>
          677                                         <div class="postmsg">
          678                                                 <div class="codebox"><pre><code>cat /sys/bus/pci/devices/0000:08:00.0/vendor
          679 0x10de
          680 
          681 ls /sys/bus/pci/devices/0000:08:00.0/driver
          682 ls: cannot access &#039;/sys/bus/pci/devices/0000:08:00.0/driver&#039;: No such file or directory</code></pre></div>
          683                                         </div>
          684                                 </div>
          685                         </div>
          686                 </div>
          687                 <div class="inbox">
          688                         <div class="postfoot clearb">
          689                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          690                         </div>
          691                 </div>
          692         </div>
          693 </div>
          694 
          695 <div id="p2116482" class="blockpost roweven">
          696         <h2><span><span class="conr">#18</span> <a href="viewtopic.php?pid=2116482#p2116482">2023-08-20 22:09:28</a></span></h2>
          697         <div class="box">
          698                 <div class="inbox">
          699                         <div class="postbody">
          700                                 <div class="postleft">
          701                                         <dl>
          702                                                 <dt><strong>seth</strong></dt>
          703                                                 <dd class="usertitle"><strong>Member</strong></dd>
          704                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          705                                                 <dd><span>Registered: 2012-09-03</span></dd>
          706                                                 <dd><span>Posts: 41,420</span></dd>
          707                                         </dl>
          708                                 </div>
          709                                 <div class="postright">
          710                                         <h3>Re: GPU passthrough</h3>
          711                                         <div class="postmsg">
          712                                                 <p>What is the condition of &quot;lspci -knns 0000:08:00.0&quot; at this point?<br />Did you try whether the device is actually available for pass-through now?</p><p>Sanity check:</p><div class="codebox"><pre><code>ls /sys/bus/pci/devices/0000:01:00.0/driver</code></pre></div>
          713                                         </div>
          714                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          715                                 </div>
          716                         </div>
          717                 </div>
          718                 <div class="inbox">
          719                         <div class="postfoot clearb">
          720                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          721                         </div>
          722                 </div>
          723         </div>
          724 </div>
          725 
          726 <div id="p2116485" class="blockpost rowodd">
          727         <h2><span><span class="conr">#19</span> <a href="viewtopic.php?pid=2116485#p2116485">2023-08-20 22:25:05</a></span></h2>
          728         <div class="box">
          729                 <div class="inbox">
          730                         <div class="postbody">
          731                                 <div class="postleft">
          732                                         <dl>
          733                                                 <dt><strong>rasmuoy</strong></dt>
          734                                                 <dd class="usertitle"><strong>Member</strong></dd>
          735                                                 <dd><span>Registered: 2023-07-19</span></dd>
          736                                                 <dd><span>Posts: 13</span></dd>
          737                                         </dl>
          738                                 </div>
          739                                 <div class="postright">
          740                                         <h3>Re: GPU passthrough</h3>
          741                                         <div class="postmsg">
          742                                                 <div class="codebox"><pre><code>ls /sys/bus/pci/devices/0000:01:00.0/driver
          743 0000:01:00.0  bind  module  new_id  remove_id  uevent  unbind
          744 
          745 lspci -knns 0000:08:00.0
          746 08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          747         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          748         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div><p>That is interesting! It is not persistent, so resets if I reboot, but I can run the &#039;tee /sys/bus/pci/devices/0000:08:00.0/driver/unbind&#039; commands again to get it back to this state.</p><p>Trying to run unload vfio-pci and running the script does nothing new though.</p>
          749                                         </div>
          750                                 </div>
          751                         </div>
          752                 </div>
          753                 <div class="inbox">
          754                         <div class="postfoot clearb">
          755                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          756                         </div>
          757                 </div>
          758         </div>
          759 </div>
          760 
          761 <div id="p2116540" class="blockpost roweven">
          762         <h2><span><span class="conr">#20</span> <a href="viewtopic.php?pid=2116540#p2116540">Yesterday 07:17:52</a></span></h2>
          763         <div class="box">
          764                 <div class="inbox">
          765                         <div class="postbody">
          766                                 <div class="postleft">
          767                                         <dl>
          768                                                 <dt><strong>seth</strong></dt>
          769                                                 <dd class="usertitle"><strong>Member</strong></dd>
          770                                                 <dd class="postavatar"><img src="https://bbs.archlinux.org/img/avatars/63451.png?m=1572193435" width="80" height="80" alt="" /></dd>
          771                                                 <dd><span>Registered: 2012-09-03</span></dd>
          772                                                 <dd><span>Posts: 41,420</span></dd>
          773                                         </dl>
          774                                 </div>
          775                                 <div class="postright">
          776                                         <h3>Re: GPU passthrough</h3>
          777                                         <div class="postmsg">
          778                                                 <div class="quotebox"><blockquote><div><p>Trying to run unload vfio-pci and running the script does nothing new though.</p></div></blockquote></div><div class="codebox"><pre><code>lspci -knns 0000:08:00.0
          779 echo 0000:08:00.0 | sudo tee /sys/bus/pci/devices/0000:08:00.0/driver/unbind
          780 sudo modprobe -r vfio-pci
          781 sudo /usr/local/bin/vfio-pci-override.sh
          782 lspci -knns 0000:08:00.0
          783 echo 0000:08:00.0 | sudo tee /sys/bus/pci/drivers_probe
          784 lspci -knns 0000:08:00.0</code></pre></div>
          785                                         </div>
          786                                         <div class="postsignature postmsg"><hr /><p><a href="http://wiki.archlinux.org/title/List_of_applications#Pastebin_services" rel="nofollow">How to upload text</a> · <a href="http://wiki.archlinux.org/index.php/Systemd#Change_default_target_to_boot_into" rel="nofollow">How to boot w/o GUI</a> · <a href="http://wiki.archlinux.org/index.php/Dual_boot_with_Windows#Fast_Startup_and_hibernation" rel="nofollow">Disable Windows Fast-Start!</a> · <a href="http://wiki.archlinux.org/index.php/Xinit#xinitrc" rel="nofollow">Your xinitrc is broken</a></p></div>
          787                                 </div>
          788                         </div>
          789                 </div>
          790                 <div class="inbox">
          791                         <div class="postfoot clearb">
          792                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          793                         </div>
          794                 </div>
          795         </div>
          796 </div>
          797 
          798 <div id="p2116582" class="blockpost rowodd">
          799         <h2><span><span class="conr">#21</span> <a href="viewtopic.php?pid=2116582#p2116582">Yesterday 13:18:03</a></span></h2>
          800         <div class="box">
          801                 <div class="inbox">
          802                         <div class="postbody">
          803                                 <div class="postleft">
          804                                         <dl>
          805                                                 <dt><strong>rasmuoy</strong></dt>
          806                                                 <dd class="usertitle"><strong>Member</strong></dd>
          807                                                 <dd><span>Registered: 2023-07-19</span></dd>
          808                                                 <dd><span>Posts: 13</span></dd>
          809                                         </dl>
          810                                 </div>
          811                                 <div class="postright">
          812                                         <h3>Re: GPU passthrough</h3>
          813                                         <div class="postmsg">
          814                                                 <p>&#039;lspci -knns 0000:08:00.0&#039;</p><div class="codebox"><pre><code>08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          815         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          816         Kernel driver in use: nvidia
          817         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div><p>&#039;echo 0000:08:00.0 | sudo tee /sys/bus/pci/devices/0000:08:00.0/driver/unbind&#039;<br />Outputs &#039;0000:08:00.0&#039; but seems to crash the terminal, I cannot ctrl+c or anything to get out of it, and can only close the terminal.</p><p>&#039;journalctl -k&#039; says:</p><div class="codebox"><pre><code>kernel: NVRM: Attempting to remove device 0000:08:00.0 with non-zero usage count!</code></pre></div><p>&#039;lspci -knns 0000:08:00.0&#039; at this time says:</p><div class="codebox"><pre><code>08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          818         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          819         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div><p>&#039;ls /sys/bus/pci/devices/0000:08:00.0/driver&#039;</p><div class="codebox"><pre><code>ls: cannot access &#039;/sys/bus/pci/devices/0000:08:00.0/driver&#039;: No such file or directory</code></pre></div><p>the driver folder is gone from the device (was there before).</p><p>&#039;sudo modprobe -r vfio-pci&#039; works just fine.</p><p>&#039;sudo /usr/local/bin/vfio-pci-override.sh&#039;</p><div class="codebox"><pre><code>+ DEVS=&#039;0000:08:00.0 0000:08:00.1&#039;
          820 ++ ls -A /sys/class/iommu
          821 + &#039;[&#039; &#039;!&#039; -z &#039;dmar0
          822 dmar1&#039; &#039;]&#039;
          823 + for DEV in $DEVS
          824 + echo vfio-pci</code></pre></div><p>The script stops here, again freezing the terminal, and not allowing my to do anything but close down the terminal window.</p><div class="codebox"><pre><code>cat  /usr/local/bin/vfio-pci-override.sh
          825 #!/bin/bash
          826 set -x
          827 DEVS=&quot;0000:08:00.0 0000:08:00.1&quot;
          828 
          829 if [ ! -z &quot;$(ls -A /sys/class/iommu)&quot; ]; then
          830     for DEV in $DEVS; do
          831         echo &quot;vfio-pci&quot; &gt; /sys/bus/pci/devices/$DEV/driver_override
          832         tail -v /sys/bus/pci/devices/$DEV/driver_override
          833     done
          834 fi</code></pre></div><div class="codebox"><pre><code>sudo modprobe -v -i vfio-pci
          835 insmod /lib/modules/6.1.46-1-lts/kernel/drivers/vfio/pci/vfio-pci.ko.zst </code></pre></div><br /><p>&#039;lspci -knns 0000:08:00.0&#039;</p><div class="codebox"><pre><code>08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          836         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          837         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div><p>&#039;echo 0000:08:00.0 | sudo tee /sys/bus/pci/drivers_probe&#039;<br />Outputs &#039;0000:08:00.0&#039; with no error.</p><p>lspci -knns 0000:08:00.0</p><div class="codebox"><pre><code>08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Quadro M4000] [10de:13f1] (rev a1)
          838         Subsystem: NVIDIA Corporation GM204GL [Quadro M4000] [10de:1153]
          839         Kernel modules: nouveau, nvidia_drm, nvidia</code></pre></div><p>Finally, &#039;journalctl -k&#039; outputs after a little while after finishing all the steps:</p><div class="codebox"><pre class="vscroll"><code>kernel: INFO: task vfio-pci-overri:3109 blocked for more than 122 seconds.
          840 kernel:       Tainted: P           OE      6.1.46-1-lts #1
          841 kernel: &quot;echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs&quot; disables this message.
          842 kernel: task:vfio-pci-overri state:D stack:0     pid:3109  ppid:3108   flags:0x00000002
          843 kernel: Call Trace:
          844 kernel:  &lt;TASK&gt;
          845 kernel:  __schedule+0x370/0x12c0
          846 kernel:  ? path_init+0x386/0x3c0
          847 kernel:  ? terminate_walk+0x61/0x100
          848 kernel:  schedule+0x5e/0xd0
          849 kernel:  schedule_preempt_disabled+0x15/0x30
          850 kernel:  __mutex_lock.constprop.0+0x39a/0x6a0
          851 kernel:  ? driver_set_override+0x7c/0x140
          852 kernel:  driver_set_override+0x94/0x140
          853 kernel:  driver_override_store+0x19/0x30
          854 kernel:  kernfs_fop_write_iter+0x133/0x1d0
          855 kernel:  vfs_write+0x236/0x3f0
          856 kernel:  ksys_write+0x6f/0xf0
          857 kernel:  do_syscall_64+0x5d/0x90
          858 kernel:  ? do_user_addr_fault+0x237/0x580
          859 kernel:  ? exc_page_fault+0x7c/0x180
          860 kernel:  entry_SYSCALL_64_after_hwframe+0x69/0xd3
          861 kernel: RIP: 0033:0x7fca09b04664
          862 kernel: RSP: 002b:00007ffeda99e3f8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
          863 kernel: RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007fca09b04664
          864 kernel: RDX: 0000000000000009 RSI: 00005620669ac360 RDI: 0000000000000001
          865 kernel: RBP: 00005620669ac360 R08: 0000000000000000 R09: 0000000000000001
          866 kernel: R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000009
          867 kernel: R13: 00007fca09c3f5c0 R14: 00007fca09bdd0e0 R15: 0000000000000000
          868 kernel:  &lt;/TASK&gt;</code></pre></div>
          869                                         </div>
          870                                 </div>
          871                         </div>
          872                 </div>
          873                 <div class="inbox">
          874                         <div class="postfoot clearb">
          875                                 <div class="postfootleft"><p><span>Offline</span></p></div>
          876                         </div>
          877                 </div>
          878         </div>
          879 </div>
          880 
          881 <div class="postlinksb">
          882         <div class="inbox crumbsplus">
          883                 <div class="pagepost">
          884                         <p class="pagelink conl"><span class="pages-label">Pages: </span><strong class="item1">1</strong></p>
          885                 </div>
          886                 <ul class="crumbs">
          887                         <li><a href="index.php">Index</a></li>
          888                         <li><span>»&#160;</span><a href="viewforum.php?id=22">Kernel &amp; Hardware</a></li>
          889                         <li><span>»&#160;</span><strong><a href="viewtopic.php?id=288163">GPU passthrough</a></strong></li>
          890                 </ul>
          891                 <div class="clearer"></div>
          892         </div>
          893 </div>
          894 </div>
          895 
          896 <div id="brdfooter" class="block">
          897         <h2><span>Board footer</span></h2>
          898         <div class="box">
          899                 <div id="brdfooternav" class="inbox">
          900                         <div class="conl">
          901                                 <form id="qjump" method="get" action="viewforum.php">
          902                                         <div><label><span>Jump to<br /></span>
          903                                         <select name="id" onchange="window.location=('viewforum.php?id='+this.options[this.selectedIndex].value)">
          904                                                 <optgroup label="Technical Issues and Assistance">
          905                                                         <option value="23">Newbie Corner</option>
          906                                                         <option value="17">Installation</option>
          907                                                         <option value="22" selected="selected">Kernel &amp; Hardware</option>
          908                                                         <option value="18">Applications &amp; Desktop Environments</option>
          909                                                         <option value="31">Laptop Issues</option>
          910                                                         <option value="8">Networking, Server, and Protection</option>
          911                                                         <option value="32">Multimedia and Games</option>
          912                                                         <option value="51">Arch Linux Guided Installer</option>
          913                                                         <option value="50">System Administration</option>
          914                                                         <option value="35">Other Architectures</option>
          915                                                 </optgroup>
          916                                                 <optgroup label="Arch-centric">
          917                                                         <option value="24">Announcements, Package &amp; Security Advisories</option>
          918                                                         <option value="1">Arch Discussion</option>
          919                                                         <option value="13">Forum &amp; Wiki discussion</option>
          920                                                 </optgroup>
          921                                                 <optgroup label="Pacman Upgrades, Packaging &amp; AUR">
          922                                                         <option value="44">Pacman &amp; Package Upgrade Issues</option>
          923                                                         <option value="49">[testing] Repo Forum</option>
          924                                                         <option value="4">Creating &amp; Modifying Packages</option>
          925                                                         <option value="38">AUR Issues, Discussion &amp; PKGBUILD Requests</option>
          926                                                 </optgroup>
          927                                                 <optgroup label="Contributions &amp; Discussion">
          928                                                         <option value="20">GNU/Linux Discussion</option>
          929                                                         <option value="27">Community Contributions</option>
          930                                                         <option value="33">Programming &amp; Scripting</option>
          931                                                         <option value="30">Other Languages</option>
          932                                                         <option value="47">Artwork and Screenshots</option>
          933                                                 </optgroup>
          934                                         </select></label>
          935                                         <input type="submit" value=" Go " accesskey="g" />
          936                                         </div>
          937                                 </form>
          938                         </div>
          939                         <div class="conr">
          940                                 <p id="feedlinks"><span class="atom"><a href="extern.php?action=feed&amp;tid=288163&amp;type=atom">Atom topic feed</a></span></p>
          941                                 <p id="poweredby">Powered by <a href="http://fluxbb.org/">FluxBB</a></p>
          942                         </div>
          943                         <div class="clearer"></div>
          944                 </div>
          945         </div>
          946 </div>
          947 
          948 
          949 
          950 </div>
          951 <div class="end-box"></div>
          952 </div>
          953 
          954 </body>
          955 </html>