# Laptop dual monitor/gpu intel/nvidia - LVDS black screen with mouse



## dahikino (Sep 16, 2021)

Hello All,

I passed like one week searching to solve my problem of black screen on internal monitor on my laptop, under xfce 4.16/lightdm.
the external monitor on DP work fine connected to the nvidia 1660 Ti card, the internal display no chance. 

I'm on FreeBSD 13 stable, I use the nvidia-driver 460.84 and dkms-mod for the intel gpu with `kld_list="i915kms nvidia-modeset  fusefs fuse coretemp cpuctl"`:

```
hald_enable="YES"
dbus_enable="YES"
linux_enable="YES"
slim_enable="YES"
lightdm_enable="YES"
powerd_enable="YES"
powerd_flags="-b adp -a max"
fusefs_enable="YES"
fuse_enable="YES"
devfs_system_ruleset="operator_usb"
nvidia_xorg_enable="YES"
```

Xrandr detect only one provider that is the nvidia.

I don't know what to do anymore. I have been trying so much with xorg.conf, so many tries.
I'm able to have one or the other screen used and working with Xorg depending of the xorg.conf setting but never the both screens at same time.

I have seen that in the xorg.0.log file, at the beginning of the start of xorg, the both gpu are detected and both display too but intel+internal display seems to be disabled after in the process starting.
I don't know if it is related with my problem but there is a warning  : *(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support*

How it is possible that the internal monitor is black but the mouse is shown and the mouse can pass from one to the other screen but no action possible on the internal screen?

If someone has a idea.

I have been searching in the forum a lot but it seems that not a lot of people use FreeBSD with the dual head/gpu on laptop configuration.


I would like to pass to FreeBSD for daily use but i need both displays for work.

Best Regards.


----------



## monwarez (Sep 16, 2021)

What is the reason for not having the NVidia driver to control eDP-1-1 ?

```
Option "UseDisplayDevice" "DP-0, eDP-1-1"
```

Also does a minimal xorg configuration which only specify the BUS id of the NVidia card does not work ?

```
Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	BusID       "PCI:1:0:0"
	Option "PrimaryGPU" "yes"    
EndSection
```


----------



## SirDice (Sep 16, 2021)

dahikino said:


> `kld_list="i915kms nvidia-modeset fusefs fuse coretemp cpuctl"`


Remove `fuse`, it doesn't exist, it's fusefs(5). 



dahikino said:


> ```
> lightdm_enable="YES"
> fusefs_enable="YES"
> fuse_enable="YES"
> ...


Those don't do anything at all, remove them. They'll only add confusion.


----------



## Geezer (Sep 16, 2021)

SirDice said:


> lightdm_enable="YES"
> fusefs_enable="YES"
> fuse_enable="YES"
> nvidia_xorg_enable="YES"
> ...



OP says he is using lightdm, so maybe leave `lightdm_enable="YES"` in and remove `slim_enable="YES"`


----------



## SirDice (Sep 16, 2021)

Geezer said:


> OP says he is using lightdm, so maybe leave `lightdm_enable="YES"` in and remove `slim_enable="YES"`


Good point. Enable one or the other, not both.


----------



## dahikino (Sep 16, 2021)

it seems that the setup with two monitors and two gpu is not working on FreeBSD when it is nvidia+intel  drivers : https://forums.FreeBSD.org/threads/...nd-intel-drivers-freebsd-12.76409/post-471630
I can have the intel gpu and internal display working or the nvidia gpu and external display working but not both at same time or cooperation between gpu to compose the global screen.

On Arch/Fedora, the GPU intel make the gateway to the nvidia gpu in same setup situation, but not here on FreeBSD


----------



## dahikino (Sep 16, 2021)

SirDice said:


> Good point. Enable one or the other, not both.


I use Slim for manage the login and Lightdm is a window manager, both are not incompatible, they are use for different purpose so no problem with lightdm_enable="YES" and slim_enable="YES"


----------



## Geezer (Sep 17, 2021)

dahikino said:


> I use Slim for manage the login and Lightdm is a window manager, both are not incompatible, they are use for different purpose so no problem with lightdm_enable="YES" and slim_enable="YES"


Nope.


----------



## Geezer (Sep 17, 2021)

Xfce is a DE.
Both lightdm and slim are DMs.
You cannot use two. 

Nope.


----------



## Minbari (Sep 17, 2021)

dahikino said:


> I use Slim for manage the login and Lightdm is a window manager, both are not incompatible, they are use for different purpose so no problem with lightdm_enable="YES" and slim_enable="YES"


You are confusing a window manager with an Xorg display manager (a.k.a login manager). "*LightDM* is a free and open-source X display manager that aims to be lightweight, fast, extensible and multi-desktop."


----------



## Argentum (Sep 17, 2021)

dahikino said:


> I passed like one week searching to solve my problem of black screen on internal monitor on my laptop, under xfce 4.16/lightdm.
> the external monitor on DP work fine connected to the nvidia 1660 Ti card, the internal display no chance.


What is the  GPU type connetcted to internal monitor? Is it the same Nvidia, or some other?
Also, remove the xorg.conf. Let the Xorg detect the configuration. What happens?

*SLIM* needs a configuration file. Do you have it? Personally I like x11/sddm. This is fully automatic and detects all window managers. Give it a try.


----------



## Geezer (Sep 17, 2021)

x11/sddm looks really nice, is easy to use, but I found it had some unfortunate issues when switching user.

x11/slim is pretty good, but a bit out of date.

x11/lightdm is really good. Also runs without configuration, but does have a configurator x11/lightdm-gtk-greeter and  x11/lightdm-gtk-greeter-settings. It is also the default DM for x11-wm/xfce4 (one of the build options).

x11/gdm give you the _white screen of death_. Worth trying (and forgetting) just to see what that is.


----------



## Argentum (Sep 17, 2021)

Geezer said:


> x11/gdm give you the _white screen of death_. Worth trying (and forgetting) just to see what that is.


Agree. I couldn't get it running also...


----------



## grahamperrin@ (Sep 18, 2021)

dahikino said:


> `hald_enable="YES"`



Remove that.



dahikino said:


> … I can have the intel gpu and internal display working or the nvidia gpu and external display working but not both at same time …



Does your computer not allow the NVIDIA hardware to drive the internal display? 

Compare with <https://forums.FreeBSD.org/threads/81493/post-524667>


----------



## dahikino (Sep 21, 2021)

Hello, i have been testing with some changes as it has been mentioned previously, replacing lightdm by sddm and removing all X.org config file about serverlayout/monitor/device/screen.
But nothing change. I can't have the both monitors working correctly.
Only one provider with xrandr is detected.

In this last configuration, the intel is detected and LVDS monitor used but the nvidia/external monitor couple is not enabled.

I can't use it as this for daily work


----------



## free-and-bsd (Sep 21, 2021)

dahikino said:


> *(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support*


I don't think it IS supported even under Windows. It's either the one GPU or the other AFAIK. Either Intel OR nvidia.


dahikino said:


> How it is possible that the internal monitor is black but the mouse is shown and the mouse can pass from one to the other screen but no action possible on the internal screen?


I'd say this means that both displays work. I don't see how it could be otherwise.
Now. Most things in your xorg.conf is garbage (not needed at all). These days you just keep minimalist $section.conf files in the /usr/local/etc/X11/xorg.conf.d directory. Mine has these:
fonts.conf:

```
Section "Files"
     FontPath "/usr/local/share/fonts/100dpi"
     FontPath "/usr/local/share/fonts/75dpi"
     FontPath "/usr/local/share/fonts/adobe-cmaps"
     FontPath "/usr/local/share/fonts/artwiz-ru"
   .... (the rest of them) ...
EndSection
```
Then driver.conf:

```
Section "Device"
    Option      "Monitor-HDMI1"  "HDMI1"
    Option      "Monitor-HDMI3"  "HDMI3"
    Identifier  "Card0"
    Driver      "nvidia"
EndSection
```
And monitor.conf:

```
Section "Monitor"
    Identifier  "HDMI1"
    Option      "RightOf"  "HDMI3"
EndSection
```
That was (in my case) enough to make it place HDMI3 left of HDMI1. But I took those settings from /var/log/Xorg.0.log. Yours, evidently, only shows ONE monitor connected... You will notice that most NVIDIA settings are configured & decided by the driver itself. So, no need (mostly) to put any of them explicitly into any *conf file. You'll find various "documentation" on nvidia configuration stuff, but none of that needs be used in any *conf files, as per my recent experience.

...So I wonder, when you boot your machine, where does your boot message appear? On your builtin monitor or your outer one?
Your Xorg.0.log shows 3 outputs detected: DFP-0, DFP-1 and DFP-2. Now I wonder if this has anything to do with BIOS display settings that would allow to use 2 outputs at least in one of the possible configurations...


----------



## shkhln (Sep 21, 2021)

The config actually looks fine to me. It could be trimmed a bit, but it needs those 2 Device (nvidia and modesetting) sections: Nvidia is connected to an external display, Intel is connected to the laptop's screen. This a bog-standard wiring and, no, it _can't be changed_. Forget about this stupid advice.

Now, does Xorg actually support displaying a single desktop surface across two different GPUs? I have no idea. Fedora might be using Wayland (well, Gnome, actually) for that.


----------



## grahamperrin@ (Sep 22, 2021)

free-and-bsd said:


> … minimalist $section.conf files in the /usr/local/etc/X11/xorg.conf.d directory. Mine has these:
> 
> fonts.conf: …



Maybe no longer necessary to specify font paths and so on. Various package messages are outdated.

My /usr/local/etc/X11/xorg.conf.d is empty. 

This morning I found and set aside an old /usr/local/etc/xorg.conf.

Five files here, I don't recall creating or editing them, I'm inclined to leave them:


```
% ls -hl /usr/local/share/X11/xorg.conf.d
total 1
-rw-r--r--  1 root  wheel   1.1K 21 Feb  2021 10-evdev.conf
-rw-r--r--  1 root  wheel   1.3K  3 Jul 02:32 10-quirks.conf
-rw-r--r--  1 root  wheel    92B 11 Aug 01:54 10-radeon.conf
-rw-r--r--  1 root  wheel   152B  3 Jul 02:32 20-evdev-kbd.conf
-rw-r--r--  1 root  wheel   1.4K 21 Feb  2021 40-libinput.conf
%
```

(radeonkms here.)


----------



## dahikino (Sep 25, 2021)

i have done the test, without any file for X.org or with, same problem, only one screen with fully composition.
With the Nvidia driver, the LDVS (internal) monitor show only the mouse moving normally on black screen, no menu or contextual menu on this screen with the mouse. It seems to be like the composition (forcefullcomposition) is not done.
In nvidia-settings, only one screen is shown.

I'm desesperate !


----------



## grahamperrin@ (Sep 26, 2021)

> … does Xorg actually support displaying a single desktop surface across two different GPUs? …



I don't know about X.org, but here's what _might_ be someone finding comparable difficulty with a dual-GPU extended desktop on Linux: <https://askubuntu.com/q/1301579/25036>



dahikino said:


> In nvidia-settings, only one screen is shown.



What make and model is the computer?

AUO 409d is found in (for example) an ASUSTek ROG Strix G731GW_G731GW.



Hakaba said:


> There is no solution if the screen is an internal laptop one, wired on Intel GPU without switch possibility.


----------



## dahikino (Sep 26, 2021)

grahamperrin said:


> I don't know about X.org, but here's what _might_ be someone finding comparable difficulty with a dual-GPU extended desktop on Linux: <https://askubuntu.com/q/1301579/25036>
> 
> 
> 
> ...


Hello, i use actually a MSI  GP75 Leopard 9SD :https://www.msi.com/Laptop/GP75-Leopard-9SD/Specification

I use EndeavourOS (Arch Linux based) without any problem with X.org and Xfce with dual monitor using the joined config file.
I have been using before Arch Linux and it was the same config for X.org server.

i used the exact config purpose (nvidia only section ) in : https://wiki.archlinux.org/title/NVIDIA_Optimus#Use_Intel_graphics_only

I don't understand why it is not possible with BSD


----------



## Geezer (Sep 26, 2021)

I like the multi-coloured keyboard.


----------



## grahamperrin@ (Sep 26, 2021)

dahikino said:


> … I use EndeavourOS (Arch Linux based) without any problem with X.org and Xfce with dual monitor using the joined config file.
> 
> I have been using before Arch Linux and it was the same config for X.org server. …



Do you still have the configuration file? (Is that what's attached, above?)


----------



## dahikino (Sep 26, 2021)

grahamperrin said:


> Do you still have the configuration file? (Is that what's attached, above?)


it is exactly what i used on Arch : https://wiki.archlinux.org/title/NVIDIA_Optimus#Use_Intel_graphics_only

Three files : one in /usr/share/X11/xorg.d/, one in the other in /etc/X11/  and finally a script launched by lightdm concerning xrandr init configuration.


----------

