How to use two screens at the same time while I'm using FreeBSD.

How about cables and power saving settings of the monitor? I used to have a surface pro 2 with a dock and often the signal to the monitor got lost and had to restart (both on windows and linux).

nope because I'd found a configuration with which it seemed to work partially,since my mouse was able to go across the black screen. So,the monitor was working.
 
ok,let's make a recap. I've created these files :

Code:
# /usr/local/etc/X11/xorg.conf.d/40-card0-intel.conf

# Intel gpu
Section "Device"
Identifier "Card0"
Option "DPMS"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection

# /usr/local/etc/X11/xorg.conf.d/40-card1-nvidia.conf

# Nvidia gpu
Section "Device"
Identifier "Card1"
Option "DPMS"
Driver "nvidia-modesetting"
BusID "PCI:2:0:0"
EndSection

I would like to know what to put inside /etc/rc.conf and inside /boot/loader.conf,thanks.

Code:
pciconf -vl

vgapci2@pci0:0:2:0:     class=0x030000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x3e98 subvendor=0x1458 subdevice=0xd000
    vendor     = 'Intel Corporation'
    device     = 'CoffeeLake-S GT2 [UHD Graphics 630]'
    class      = display
    subclass   = VGA

vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1e04 subvendor=0x19da subdevice=0x2503
vendor     = 'NVIDIA Corporation'
device     = 'TU102 [GeForce RTX 2080 Ti]'
class      = display
subclass   = VGA

vgapci1@pci0:2:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1c02 subvendor=0x19da subdevice=0x2438
    vendor     = 'NVIDIA Corporation'
    device     = 'GP106 [GeForce GTX 1060 3GB]'
    class      = display
    subclass   = VGA

the HDMI cables are attached to the HDMI port of the Intel gpu (0:2:0) and on the HDMI port of the Geforce 1060 (2:0:0).

Don't know if it is correct,but I have :

Code:
/etc/rc.conf

kld_list="nvidia-modeset i915kms"

/boot/loader.conf :

nvidia_load="YES"

that's all.
 
Looks all good so far at a first glance. please post the output of
Code:
kldstat
and the contents of /var/log/Xorg.0.log with that config.
I am off for today now.
 
Is this correct ?

Code:
/etc/rc.conf

kld_list="nvidia-modeset i915kms"

Just one is needed either rc.conf or loader.conf. I actually prefer using loader.conf for loading kernel modules to keep that stuff separate. Also the Xorg driver is named nvidia-modesetting but the kernel module is just named nvidia.

Code:
 # adds nvidia kernel modul to the list of modules when booting up
 sysrc kld_list+="nvidia"

OR:

Code:
# /boot/loader.conf

nvidia_load="YES"

Please check after booting up your system if the module has been loaded by:

Code:
kldstat | grep nvidia
dmesg | grep -B 2 -A 3 nvidia

Please post the content of /var/log/Xorg.0.log .
 
Code:
# kldstat | grep nvidia
21    1 0xffffffff83400000  2354ab8 nvidia.ko

# dmesg | grep -B 2 -A 3 nvidia

VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
TSC: P-state invariant, performance statistics
nvidia0: <NVIDIA GeForce RTX 2080 Ti> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia1: <NVIDIA GeForce GTX 1060 3GB> on vgapci1
vgapci1: child nvidia1 requested pci_enable_io
vgapci1: child nvidia1 requested pci_enable_io
pchtherm0: <CannonLake-H Thermal Subsystem> mem 0x4001119000-0x4001119fff irq 16 at device 18.0 on pci0
ichsmb0: <Intel Cannon Lake SMBus controller> port 0xefa0-0xefbf mem 0x4001116000-0x40011160ff irq 16 at device 31.4 on pci0
smbus0: <System Management Bus> on ichsmb0
 

nope because I'd found a configuration with which it seemed to work partially,since my mouse was able to go across the black screen. So,the monitor was working.
Thx.

Can you please change the file 40-card1-nvidia.conf to:

Code:
# /usr/local/etc/X11/xorg.conf.d/40-card1-nvidia.conf
# Nvidia gpu
Section "Device"
        Identifier "Card1"
        Option "DPMS"
        Driver "nvidia"
        BusID "PCI:2:0:0"
EndSection

Please restart the Xorg or reboot whatever suits you, and please post the content of /var/log/Xorg.0.log again.
 
ok,let's make a recap. I've created these files :

Code:
# /usr/local/etc/X11/xorg.conf.d/40-card0-intel.conf

# Intel gpu
Section "Device"
Identifier "Card0"
Option "DPMS"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection

# /usr/local/etc/X11/xorg.conf.d/40-card1-nvidia.conf

# Nvidia gpu
Section "Device"
Identifier "Card1"
Option "DPMS"
Driver "nvidia-modesetting"
BusID "PCI:2:0:0"
EndSection

I would like to know what to put inside /etc/rc.conf and inside /boot/loader.conf,thanks.

Code:
pciconf -vl

vgapci2@pci0:0:2:0:     class=0x030000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x3e98 subvendor=0x1458 subdevice=0xd000
    vendor     = 'Intel Corporation'
    device     = 'CoffeeLake-S GT2 [UHD Graphics 630]'
    class      = display
    subclass   = VGA

vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1e04 subvendor=0x19da subdevice=0x2503
vendor     = 'NVIDIA Corporation'
device     = 'TU102 [GeForce RTX 2080 Ti]'
class      = display
subclass   = VGA

vgapci1@pci0:2:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1c02 subvendor=0x19da subdevice=0x2438
    vendor     = 'NVIDIA Corporation'
    device     = 'GP106 [GeForce GTX 1060 3GB]'
    class      = display
    subclass   = VGA

the HDMI cables are attached to the HDMI port of the Intel gpu (0:2:0) and on the HDMI port of the Geforce 1060 (2:0:0).

Don't know if it is correct,but I have :

Code:
/etc/rc.conf

kld_list="nvidia-modeset i915kms"

/boot/loader.conf :

nvidia_load="YES"

that's all.
This guy...
Now you telling us its more than one nvidia gpu.
Anything stopping you from using only 1060 for X, or this is also going to be passthrough to bhyve ?
 
This guy...
Now you telling us its more than one nvidia gpu.
Anything stopping you from using only 1060 for X, or this is also going to be passthrough to bhyve ?

This guy added another nvidia gpu later to make some experiments,thinking that it made no difference. If it makes some difference,I will pay you a coffee. The gpu to pass thru is for sure the 2080 ti. I've added the 1060 to make the lastest test when the previous tests will fail. The idea is to attach both the monitors to the 1060 and to leave the 2080 ti for the passthru. But not now.
 
Can you please also run the following command:

Code:
pkg info | grep drm
ls /usr/local/lib/xorg/modules/drivers/

It looks like there is an issue with the intel-drm package (perhaps the module has been renamed, I'm still on 12.3)? :-/
 
This guy added another nvidia gpu later to make some experiments,thinking that it made no difference. If it makes some difference,I will pay you a coffee. The gpu to pass thru is for sure the 2080 ti. I've added the 1060 to make the lastest test when the previous tests will fail. The idea is to attach both the monitors to the 1060 and to leave the 2080 ti for the passthru. But not now.
remove any X configs, and just use whatever tanis posted in #110
For ideal setup you could maybe do some magic with nvidia-xconfig, but 1060 it should work with any monitors you connect instantly.
 
Is this a bug ????

Code:
[    84.768] (EE) open /dev/dri/card0: No such file or directory
[    84.768] (WW) Falling back to old probe method for modesetting
[    84.768] (EE) open /dev/dri/card0: No such file or directory
 
Can you please also run the following command:

Code:
pkg info | grep drm
ls /usr/local/lib/xorg/modules/drivers/

It looks like there is an issue with the intel-drm package (perhaps the module has been renamed, I'm still on 12.3)? :-/

Code:
@marietto:/home/marietto # pkg info | grep drm


drm-fbsd13-kmod-5.4.191.g20220604_1 DRM modules for the linuxkpi-based KMS components
drm-kmod-20220501              Metaport of DRM modules for the linuxkpi-based KMS components
gpu-firmware-kmod-20220511,1   Firmware modules for the drm-kmod drivers
libdrm-2.4.111,1               Userspace interface to kernel Direct Rendering Module services


@marietto:/home/marietto # ls /usr/local/lib/xorg/modules/drivers/


intel_drv.so            nvidia_drv.so           vesa_drv.so             xrdpdev_drv.a
modesetting_drv.so scfb_drv.so vmware_drv.so xrdpdev_drv.so
 
Is this a bug ????

Code:
[    84.768] (EE) open /dev/dri/card0: No such file or directory
[    84.768] (WW) Falling back to old probe method for modesetting
[    84.768] (EE) open /dev/dri/card0: No such file or directory
Nope, that just means that /dev/dri/card0 is not existing, the reason we don't know at this stage.

Can you please post the output of the following commands:
Code:
# prints, if your intel gpu has been proper detected by the kernel module
dmesg | grep drm
# prints gpu device handler have been created
ls -l /dev/dri
# prints the packages the fils belong to
pkg which /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
pkg which /usr/local/lib/xorg/modules/drivers/intel_drv.so
# prints all installed packages which contain the word video
pkg info | grep video
# prints who is part of the video group
getent group video

Please change the file /usr/local/etc/X11/xorg.conf.d/40-card0-intel.conf to:
Code:
# /usr/local/etc/X11/xorg.conf.d/40-card0-intel.conf
# Intel gpu
Section "Device"
        Identifier "Card0"
        Option "DPMS"
        Driver "intel"
        BusID "PCI:0:2:0"
EndSection
Please restart Xorg or reboot your system, and can you please post the /var/log/Xorg.0.log afterwards again.

Whats happning so far according to the Xorg.0.log is:
- Xorg detects multiple gpu cards for primary and goes with the first one on the PCI bus which is your intel card
- Xorg loads the module modesetting tries to access the intel gpu /dev/dri/card0 and fails, because there is no such
file

What we did so far:
- it seems there is no nvidia-modesetting module anymore, we switch to the nvidia module:
Code:
/usr/local/lib/xorg/modules/drivers/nvidia_drv.so

As I already mentioned I'm still on 12.3-p5, so I don't know about the changes which have been made to 13, but if you provide all the requested information from that post, we should get a pretty good picture what the actual issue is and go further from there.
 
So one of the main issues is definitely the missing module nvidia-modeset.
It still exists and you definitely need it in the latest nvidia driver releases.

Can you please post the output of the following commands:
Code:
pkg info | grep nvidia
and
Code:
kldload nvidia-modeset
 
Just one is needed either rc.conf or loader.conf. I actually prefer using loader.conf for loading kernel modules to keep that stuff separate. Also the Xorg driver is named nvidia-modesetting but the kernel module is just named nvidia.

Code:
 # adds nvidia kernel modul to the list of modules when booting up
 sysrc kld_list+="nvidia"

So,to add nvidia is partially wrong ? maybe it should be :

Code:
sysrc kld_list+="nvidia nvidia-modeset"

?
 
my 2 cents, I dont need to load any module at boot or parameter in rc.conf
Install the driver for nvidia from ports, and then the port of intel driver graphics/drm-fbsd13-kmod
and for the last the x11 driver
Code:
xf86-video-intel

but more important is the option in the bios (without this wont work,at least for me)

IMG_20220722_091034198.jpg


The IGD Multi-Monitor option

one question, for what do you want use the nvidia and intel together? when you can use 2 independent Nvidia monitors?
you can do it more dificult or simple and functional just like FBSD do
 
What is the point to use two separate cards for each monitor when the Nvidia one can handle up to four monitors (if not more)?

🤔
 
my 2 cents, I dont need to load any module at boot or parameter in rc.conf
Install the driver for nvidia from ports, and then the port of intel driver graphics/drm-fbsd13-kmod
and for the last the x11 driver
Code:
xf86-video-intel

but more important is the option in the bios (without this wont work,at least for me)

View attachment 14451

The IGD Multi-Monitor option

one question, for what do you want use the nvidia and intel together? when you can use 2 independent Nvidia monitors?
you can do it more dificult or simple and functional just like FBSD do

I don't have the IGD Multi-monitor option. I can only choose with which gpu start the PC. And for the moment I choose the intel gpu,because I want to keep the intel as primary and I want the second monitor attached to the HDMI cable of the nvidia GPU.
 
my 2 cents, I dont need to load any module at boot or parameter in rc.conf
Install the driver for nvidia from ports, and then the port of intel driver graphics/drm-fbsd13-kmod
and for the last the x11 driver
Code:
xf86-video-intel

but more important is the option in the bios (without this wont work,at least for me)

View attachment 14451

The IGD Multi-Monitor option

one question, for what do you want use the nvidia and intel together? when you can use 2 independent Nvidia monitors?
you can do it more dificult or simple and functional just like FBSD do

I've explained the reason in any of the latest messages. You can read it. That old message is not too far from here.
 
Let's recap ? :

Code:
/etc/rc.conf :


kld_list="nvidia nvidia-modeset"


/boot/loader.conf


nothing related to the gpu


/etc/X11/


no conf files.


/usr/local/etc/X11/xorg.conf.d/gedit 40-card0-intel.conf


# Intel gpu

Section "Device"

        Identifier "Card0"

        Option "DPMS"

        Driver "intel"

        BusID "PCI:0:2:0"

EndSection


/usr/local/etc/X11/xorg.conf.d/gedit 40-card1-nvidia.conf


# Nvidia gpu

Section "Device"

        Identifier "Card1"

        Option "DPMS"

        Driver "nvidia"

        BusID "PCI:2:0:0"

EndSection

/var/log/Xorg.0.log :


result : the monitor attached to the nvidia gpu is turned off and the mouse can't across over it.
 
Back
Top