Laptop Nvidia : Only HDMI Screen...

I have a strange situation (for me).
I install freeBSD 12.1, xorg, xfce, nvidia-driver (build the 440.31 from ports) ...

When I launch startx, the screen of my laptop become black with a little blanc square on top left.
I lost 3-4 hour to discover that if I connect a HDMI monitor, I can see XFCE on it !

xrandr does not know my laptop screen, nvidia-xconfig create a config that didn't work.

Here technicals info :

Code:
#uname -u
FreeBSD msi 12.1-RELEASE-p1 FreeBSD 12.1-RELEASE-p1 GENERIC  amd64

Code:
#xrandr
Screen 0: minimum 8 x 8, current 3440 x 1440, maximum 32767 x 32767
HDMI-0 connected primary 3440x1440+0+0 (normal left inverted right x axis y axis) 800mm x 335mm
   3440x1440     29.97*+
   1920x1080     60.00    59.94    50.00    29.97    23.98    60.00    50.04
   1680x1050     59.95
   1440x900      59.89
   1280x1024     75.02    60.02
   1280x960      60.00
   1280x800      59.81
   1280x720      60.00    59.94    50.00
   1152x864      75.00
   1024x768      75.03    70.07    60.00
   800x600       75.00    72.19    60.32    56.25
   720x576       50.00
   720x480       59.94
   640x480       75.00    72.81    59.94    59.93
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)

No files in /etc/X11
file in /usr/local/etc/X11/xorg.conf.d/nvidia-driver.conf attached

let me know if other info can be relevant.
 

Attachments

From your nvidia-driver.conf:
Option "ConnectedMonitor" "DFP"

its "IgnoreEDIDChecksum", not
Option "IgnoreEDIDChacksum" "DFP"

Comment them both out, try again. From /usr/local/share/doc/NVIDIA_GLX-1.0/html/xconfigoptions.html, assuming the port was build with DOCS option on,
Code:
Option "ConnectedMonitor" "string"

        .....  "DFP" should only be used to refer to
           digital flat panels connected via DVI, HDMI, or DisplayPort.

In fact it should be enough to configure xorg in /usr/local/etc/X11/xorg.conf.d/nvidia-driver.conf with:
Code:
Section "Device"
    Identifier  "Card0"
    Driver      "nvidia"
EndSection
If something else needs to be configured, it can be appended.
 
Thanks, I corrected IgnoreEDIDChecksum.

Without the option "ConnectedMonitor", I have a "no device found" error.
I will read the doc (I didn't found it, thanks for the link).
 
Which laptop is this?
It is a MSI P65 8RE with a NVidia 1060 MaxQ and Intel core i7-8750H

I try to add DFP-1 and/or DFP-2 in ConnectedMonitor option without success.

I run startx with logverbose 5 :

Code:
...
[  4648.120] (II) NVIDIA GLX Module  440.31  Sun Oct 27 02:11:10 UTC 2019
[  4648.120] (II) NVIDIA: The X server does not support PRIME Render Offload.
[  4648.521] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[  4648.521] (--) NVIDIA(0):     DFP-0 (boot)
[  4648.521] (--) NVIDIA(0):     DFP-1
[  4648.521] (--) NVIDIA(0):     DFP-2
...
[  4648.552] (--) NVIDIA(GPU-0): Acer BX340CK (DFP-0): connected
[  4648.552] (--) NVIDIA(GPU-0): Acer BX340CK (DFP-0): Internal TMDS
[  4648.552] (--) NVIDIA(GPU-0): Acer BX340CK (DFP-0): DFP is not internal to notebook
...
A lot of techs characteristics and possibles resolutions
...
[  4648.556] (--) NVIDIA(GPU-0): DFP-1: disconnected
[  4648.556] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[  4648.556] (--) NVIDIA(GPU-0): DFP-1: DFP is not internal to notebook
...
[  4648.556] (--) NVIDIA(GPU-0): DFP-2: connected
[  4648.556] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[  4648.556] (--) NVIDIA(GPU-0): DFP-2: DFP is not internal to notebook
...

Neither DFP-0 / DFP-1 / DFP-2 is internal to notebook.
But only this 3 screen exist for the NVidia card...

Is there a way to know why the internal display works before startx is launched ? (maybe it is connected only with the intel card ?)
 
How can we know where a screen is connected ?
Is that means we can not have accelerated graphics on the laptop screen (even with Windows) ?
Without «Optimus», I can not have hdmi+laptop screen ?
 
How can we know where a screen is connected ?

We can't, but wiring a laptop screen to a dedicated GPU doesn't make any sense without a multiplexer. In such configuration it wouldn't be possible to turn off the dedicated GPU to save power, which is the main justification for Optimus given by laptop manufacturers.

Is that means we can not have accelerated graphics on the laptop screen (even with Windows) ?

Oh, Optimus works just fine with Windows.

Without «Optimus», I can not have hdmi+laptop screen ?

You can start two separate Xorg servers, configured to use Intel and Nvidia GPUs respectively.
 
I just installed the intel driver (i915kms) and now I have a laptop with integrated screen, but without HDMI.
I explore the two Xorg server way, but I am not sure that is what I want (may I move windows between screen ?)

First tests with two XOrg :
When I start a second X server, the first screen switch to black...
I have to logout from the second XFCE session to recover the first one (can not switch between session).

So I am not able to have two working screen at the same time now.
 
More information here :
Bash:
#xrandr -d :0 --listproviders
Providers: number : 1
Provider 0: id: 0x43 cap: 0xa, Sink Output, Sink Offload crtcs: 3 outputs: 1 associated providers: 0 name:modesetting

#xrandr -d :8 --listproviders
Providers: number : 1
Provider 0: id: 0x1b8 cap: 0x0 crtcs: 4 outputs: 3 associated providers: 0 name:NVIDIA-0

I try xrandr --setprovideroutputsource NVIDIA-0 modesetting

Bash:
#xrandr -d :8 --setprovideroutputsource NVIDIA-0 modesetting
Could not find provider with name modesetting
#xrandr -d :0 --setprovideroutputsource NVIDIA-0 modesetting
Could not find provider with name NVIDIA-0

The main issue is that I have two "X Screen". How can I merge them ?
 
[...] The main issue is that I have two "X Screen". How can I merge them ?
??? IMHO you do not have two "X Screens". What XRANDR does is merging all monitors into one screen -- unlike XINERAMA, but you don't want that (it has nasty limitations).
You combine the monitors in a server-layout.conf in /usr/local/etc/X11/xorg.conf.d
 

Attachments

In the xrandr man, DISPLAY (option -d) is for select «X Screen».
I need to have display :0.0 and :0.1instead of :0.0 and :8.0.

-d, --display name
This option selects the X display to use. Note this refers to
the X screen abstraction, not the monitor (or output).

I have a strange :0.1 sometimes with the name «default» and the max res x720.
But I did not find where is display this output.

I have two Xorg server here :
Code:
# ps aux | grep X
root       1333    0,0  0,1 25269372   44304 v0- S    03:10      1:10,35 /usr/local/bin/Xorg -sharevts -novtswitch -noreset -config /var/cache/nvidia-headless/xorg.conf -configdir xorg-nvidia-headless.conf.d :8
root       1813    0,0  0,4   212236  120028 v0  S    03:47      2:10,32 /usr/local/bin/Xorg :0 -auth /home/hakaba/.serverauth.1799
 
[...]
I have a strange :0.1 sometimes with the name «default» and the max res x720.
But I did not find where is display this output.
I have two Xorg server here :
Code:
[...] /usr/local/bin/Xorg [...] -config /var/cache/nvidia-headless/xorg.conf -configdir xorg-nvidia-headless.conf.d :8
OK, you have two Xservers. So you do have two screens because obviously each Xserver has it's own and 8 is the default shift. The headless Xserver on ":8" obviously is not connected to any monitor, that's what headless is...
What you want is
  • One Xserver
  • Two drivers -- one for each GPU you have: intel(4) from x11-drivers/xf86-video-intel and nvidia (you seem to already have the last one)
    this depends on which heads you want to use, and to which GPU they connect. I assume your internal monitor is connected to the Intel HD onchip-GPU, and not all external heads are connected to the extra nvidia card.
  • Three (? as many as you have heads, i.e. graphics card output plugs) monitors
  • make shure you have the right KMS drivers (from ports, not base): pkg info drm-kmod
To get where you want, it's advantageous to have at least these three config files in /usr/local/etc/X11/xorg.conf.d:
  1. server-layout.conf
  2. intel.conf and
  3. nvidia.conf
  4. and I strongly suggest also monitors.conf
Download from my previous post for an example. They are not large, you can read through them in <5 minutes.
Unfortunately, the server-layout.conf suggests you have more than one screen. But XRANDR (which is enabled by default) merges all into one.
Thus :0.1 refers to the 2nd monitor. Look into your Xorg.0.log and/or ourput of xrandr --listmonitors or just plain xrandr
 
You must connect
  1. monitor0<->driver0 = screen0 in intel.conf and monitor.conf
  2. monitor1<->driver1 = screen1 in nvidia.conf and monitor.conf
    if you want to use a head that is connected to the nvidia card, else like 1.
  3. connect these screens in server-layout.conf
Then RandR puts that together automagically. Like I mentioned before, unfortunately RandR let's us assume we have two screens, but it merges them. Eventually that's exactly what you want... and not a headless Xserver...
 
[...] You can start two separate Xorg servers, configured to use Intel and Nvidia GPUs respectively.
Why do you send him this way??? :-/ That's the XINERAMA way, and probably not what he wants.
Hakaba, you have to get rid of the headless Xserver.
 
Thanks a lot.
I will try all this things tomorrow.

I have the good drm-kmod driver (I already test that). I stop the headless part and comment #nvidia_xorg_enable="YES" in rc.conf.
 
I just dropped a ServerLayout section in my config and, of course, Xorg completely ignored it. In any case, even if you manage to make it work, without libglvnd you will not be able to use OpenGL on both screens.
 
I try a lot of things since the end of 2019. I have installed the nvidia-headless driver to have a working optirun.

Now I test the solution with monitors.
But I only have one provider with xrandr --listproviders command.

I can have the Intel or the NVidia one (depending of my config) but never both appear.
I have a "leftOf" screen as my mouse can go out of my laptop screen. But the HDMI screen stay black.
I will spend more time in this concern this WE
 
I have a dual-monitor setup with intel. So that should be no problem if you adjust my config examples to fit your needs (the monitors.conf) -- this works only if some head is connected or routed to the intel card. Maybe that is possible in the BIOS? If the intel card only connects to the internal laptop screen, this wil not work. But then you do not use the nvidia card, which is ok for office use, even some games will run run fast enough. For the specials concerning your nvidia card, shkhin is the better one to listen to. I have no nvidia card.
 
My laptop can not use the Intel card to display external monitor, neither the Nvidia card to display internal.
I ask in MSI forums and if I did not have physical switch, it is not possible.
I also search in advanced BIOS, but as I do not know how this config can be named, I found nothing relevant.

Back to the solution with two Xorg server (maybe in a jail and x2x to display both in the same time ?)

about Blumblebee, is that working in FreeBSD ?
 
  • IMHO two Xservers is going to be a XINERAMA solution, which was superseeded by XRANDR. XINERAMA has odd flaws, e.g. it hides physical entities of the monitor (phys. dimension & resolution, DPI) from the apps. XRANDR is more modern and was written with what was learned from XINERAMA.
  • I am shure I have read somewhere that one Xserver can handle two (or more) GPU drivers; that would mean you can go a XRANDR solution.
 
I am sure I have read somewhere that one Xserver can handle two (or more) GPU drivers; that would mean you can go a XRANDR solution.

Ahem,
Code:
% cat /var/log/Xorg.0.log | grep VGA
[   301.567] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support

I don't know if there is any kind of alternative multi-(card|driver|GPU) support. Nothing is certain with Xorg.
 
Back
Top