Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2023 20:07:53 +0100
From:      Mario Marietto <marietto2008@gmail.com>
To:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>, freebsd-hackers@freebsd.org,  =?UTF-8?Q?Corvin_K=C3=B6hne?= <c.koehne@beckhoff.com>,  Dustin Marquess <dmarquess@gmail.com>, Alexander Eichner <freebsd@aeichner.de>, theraven@freebsd.org
Subject:   devctl: Failed to detach pci0:1:0:0: Device busy / devctl: Failed to set pci0:1:0:0 driver to ppt: Device busy
Message-ID:  <CA%2B1FSigT376-VQoKM-D96fpUZi5MWDbdNjjeAgdhnWs0vVzN-A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hello to everyone.

In some FreeBSD 13.1 machines I have the problem below,in some others I
don't have it. I would like to know what the causes could be and how to fix
it.

root@marietto:/usr/home/marietto # devctl detach pci0:1:0:0

devctl: Failed to detach pci0:1:0:0: Device busy

root@marietto:/usr/home/marietto # devctl detach pci0:2:0:0

devctl: Failed to detach pci0:2:0:0: Device busy

Not even it works if instead of detach them, I try to attach them directly
to the ppt driver :

root@marietto:/usr/home/marietto/bhyve/Files # devctl set driver pci0:2:0:0
ppt
devctl: Failed to set pci0:2:0:0 driver to ppt: Device busy

root@marietto:/usr/home/marietto/bhyve/Files # devctl detach pci0:2:0:0
devctl: Failed to detach pci0:2:0:0: Device busy

Pci addresses 1:0:0 and 2:0:0 belong to the two GPUs that I have on my PC :

vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1c02 subvendor=0x19da subdevice=0x2438
vgapci1@pci0:2:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1e04 subvendor=0x19da subdevice=0x2503

Actually I have commented this line on /boot/loader.conf,because it makes
no difference if I keep it uncommented or not. It is totally ignored.

#pptdevs="1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3"

In every FreeBSD machine I load the nvidia kernel modules adding the line
below to /etc/rc.conf :

kld_list="nvidia nvidia-modeset"

and I have installed the nvidia-driver package on every machine. But as I
said,in some of them I see the error above,in some others I don't see it.
I'm not able to isolate the dysfunctional pattern. The xorg.conf file is
the same for each machine. Can someone help me to troubleshoot the error ?
thanks.

-- 
Mario.

[-- Attachment #2 --]
<div dir="ltr"><div><div><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">Hello to everyone. <br></span></span></div><div><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></div><div><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">In some FreeBSD 13.1 machines I have the problem below,in some others I don&#39;t have it. I would like to know what the causes could be and how to fix it. <br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></div><div><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">root@marietto:/usr/home/marietto # devctl detach pci0:1:0:0 <br></span></span></div><div><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">devctl: Failed to detach pci0:1:0:0: Device busy</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">root@marietto:/usr/home/marietto # devctl detach pci0:2:0:0
<br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">devctl: Failed to detach pci0:2:0:0: Device busy <br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Not even it works if instead of detach them, I try to attach them directly to the ppt driver :</span></span></div><div><div><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></span></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">root@marietto:/usr/home/marietto/bhyve/Files # devctl set driver pci0:2:0:0 ppt
</span><br>devctl: Failed to set pci0:2:0:0 driver to ppt: Device busy</span></span></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:arial,sans-serif"> <br>root@marietto:/usr/home/marietto/bhyve/Files # devctl detach pci0:2:0:0
<br>devctl: Failed to detach pci0:2:0:0: Device busy</span></span></span></span></span></div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Pci addresses 1:0:0 and 2:0:0 belong to the two GPUs that I have on my PC :<br></span></span></div><div><span style="font-family:monospace"></span></div><span style="font-family:monospace">
<br></span><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1c02 subvendor=0x19da subdevice=0x2438
</span><br></span></span><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span></div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">vgapci1@pci0:2:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1e04 subvendor=0x19da subdevice=0x2503</span><br></span><br clear="all"></div><div>Actually I have commented this line on /boot/loader.conf,because it makes no difference if I keep it uncommented or not. It is totally ignored.<br></div><div><br></div><div><span style="font-family:arial,sans-serif"></span><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">#pptdevs=&quot;1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3&quot; <br></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">In every FreeBSD machine I load the nvidia kernel modules adding the line below to /etc/rc.conf :<br></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">kld_list=&quot;nvidia nvidia-modeset&quot;</span></span><br></span></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">and I have installed the nvidia-driver package on every machine. But as I said,in some of them I see the error above,in some others I don&#39;t see it. I&#39;m not able to isolate the</span></span></span><span class="gmail-Y2IQFc" lang="en"> dysfunctional pattern. The xorg.conf file is the same for each machine. Can someone help me to troubleshoot the error ? thanks.</span><span style="font-family:monospace"> </span></div><div><span style="font-family:monospace"><br></span></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Mario.<br></div></div></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSigT376-VQoKM-D96fpUZi5MWDbdNjjeAgdhnWs0vVzN-A>