Discussion:
pci bus rescan from userland
Yuri Pankov
2018-08-25 15:21:14 UTC
Permalink
Hi,

Trying to enable the HDMI/DP sound output on NVIDIA Quadro M2200, I have
found the following workaround on NVIDIA Linux forums
(https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5211273/#5211273):

setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
rmmod nvidia-drm nvidia-modeset nvidia
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan
modprobe nvidia-drm

So far rmmod and modprobe steps are obvious, setpci works as well (I
guess I could use pciconf? doesn't really matter). Is there a FreeBSD
equivalent of doing the remove/rescan steps from userland?
Ian Lepore
2018-08-25 15:26:01 UTC
Permalink
Hi,
Trying to enable the HDMI/DP sound output on NVIDIA Quadro M2200, I have 
found the following workaround on NVIDIA Linux forums 
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
rmmod nvidia-drm nvidia-modeset nvidia
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan
modprobe nvidia-drm
So far rmmod and modprobe steps are obvious, setpci works as well (I 
guess I could use pciconf? doesn't really matter).  Is there a FreeBSD 
equivalent of doing the remove/rescan steps from userland?
devctl(8) has a rescan function.  devinfo(8) might be useful for
figuring out which device(s) to use the rescan command on.

I don't know much about either of these tools beyond the fact that they
exist.

-- Ian
Yuri Pankov
2018-08-25 15:29:31 UTC
Permalink
Post by Ian Lepore
Post by Yuri Pankov
Hi,
Trying to enable the HDMI/DP sound output on NVIDIA Quadro M2200, I have
found the following workaround on NVIDIA Linux forums
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
rmmod nvidia-drm nvidia-modeset nvidia
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan
modprobe nvidia-drm
So far rmmod and modprobe steps are obvious, setpci works as well (I
guess I could use pciconf? doesn't really matter).  Is there a FreeBSD
equivalent of doing the remove/rescan steps from userland?
devctl(8) has a rescan function.  devinfo(8) might be useful for
figuring out which device(s) to use the rescan command on.
I don't know much about either of these tools beyond the fact that they
exist.
Thanks, that did it (`devctl rescan pci1`), NVIDIA HDA controller now
successfully attached.

Loading...