# DisplayPort not detected by xrandr

## ElektroVirus

Hello guys,

I have Gentoo 4.19.86 installed on HP ZBook 15 G2, but xrandr does not detect the DisplayPort adapter on my laptop. It never has, and I started with  with kernel version  4.19.66. This model has two graphics cards: the one integrated in processor, and an NVidia Quadro. 

My desire is first to get the DisplayPort working with only Intel's drivers,and leave the NVidia video card disabled for most of the time, since I don't need the power of the external card anyways, and it just consumes unnecessary power. But when everything is working, I want to be able to choose, which graphics driver I'm using (probably with the project nvidia-xrun). And I probably also want to install the proprietary nvidia-drivers to be able to use CUDA.

I know, the port(s) must be found by xrandr. I booted Kubuntu from an usb-drive and it found eDP-1, VGA-1, DP-1-1, DP-1-2 and DP-1-3, whereas this Gentoo installation only finds the first two (eDP-1 and VGA-1). I suppose 1 of the the 3 DisplayPort's is the physical adapter, and the other 2 are virtual ports from the Thunderbolt-adapter? 

I have tried a lot of by installing and removing video card drivers. First I had the Nouveau drivers installed and now I have the external GPU completely disabled (by the project nvidia-xrun) and only the Intel's drivers are installed. 

lsmod shows that my graphics drivers in use are i915, although this model should have i965 (and I set 'VIDEO_CARDS="intel i965"' in /etc/portage/make.conf. 

I did not find anything useful from these forums, the Gentoo wiki or another places on the Internet regarding the DisplayPort, seems like I'm alone with this problem. 

I really don't even know what information I should share with you. For being frustrated, I even compiled the kernel with genkernel so It would compile almost all drivers (according to Gentoo's installation manual), but it still can't find the DisplayPorts.

Some other info:

I use X11, lightdm and i3, but the Gentoo profile which I'm using, is actually for KDE Plasma. I never did install KDE Plasma.

Hopefully you can help me with this info, if not, I will be happy to tell you more.

Have a nice day!

----------

## NeddySeagoon

ElektroVirus,

Welcome to Gentoo.

Please put /var/log/Xorg.0.log onto a pastebin site both from Kubuntu and Gentoo.

That's two pastes.

Gentoo has wgetpaste.

Tell us what settings you have in the firmware fro your Graphics system.

----------

## ElektroVirus

 *NeddySeagoon wrote:*   

> ElektroVirus,
> 
> Welcome to Gentoo.
> 
> Please put /var/log/Xorg.0.log onto a pastebin site both from Kubuntu and Gentoo.
> ...

 

Thanks NeddySeagoon for your quick reply!

Here are the log files.

Gentoo:  http://dpaste.com/00Q4848

Kubuntu: http://dpaste.com/2A79R5T

In BIOS, or HP computer setup, I have these settings regarding graphics:

Video memory size: 

  32MB, 

  64MB, 

  128MB, 

* 256MB

Hybrid graphics: 

  Enable, 

  Disable, 

* Auto

Hybrid graphics enhanced display feature: yes

Thunderbolt port:

  PCIe and DisplayPort

* PCIe and DisplayPort - require user approval for Thunderbolt legacy devices

  PCIe and DisplayPort - Secure connect 

  DisplayPort only

ElektroVirus

----------

## NeddySeagoon

ElektroVirus,

Gentoo only sees your Intel GPU.

```
[417928.659] (II) xfree86: Adding drm device (/dev/dri/card0)

[417928.674] (--) PCI:*(0@0:2:0) 8086:0416:103c:2253 rev 6, Mem @ 0xce400000/4194304, 0xa0000000/268435456, I/O @ 0x00006000/64, BIOS @ 0x????????/131072
```

That's confirmed by the 

```
[417928.674] (==) Matched intel as autoconfigured driver 0

[417928.674] (==) Matched modesetting as autoconfigured driver 1

[417928.674] (==) Matched fbdev as autoconfigured driver 2

[417928.674] (==) Matched vesa as autoconfigured driver 3
```

Which is the Xorg auto config doing its thing.

Kubuntu sees both your GPUs

```
[    61.874] (II) xfree86: Adding drm device (/dev/dri/card1)

[    61.875] (II) xfree86: Adding drm device (/dev/dri/card0)

[    61.882] (--) PCI:*(0@0:2:0) 8086:0416:103c:2253 rev 6, Mem @ 0xce400000/4194304, 0xa0000000/268435456, I/O @ 0x00006000/64, BIOS @ 0x????????/131072

[    61.882] (--) PCI: (1@0:0:0) 10de:0ff6:103c:2253 rev 161, Mem @ 0xcd000000/16777216, 0x50000000/268435456, 0x60000000/33554432, I/O @ 0x00005000/128, BIOS @ 0x????????/524288
```

and sees

```
[    61.964] (==) Matched modesetting as autoconfigured driver 0

[    61.964] (==) Matched fbdev as autoconfigured driver 1

[    61.964] (==) Matched vesa as autoconfigured driver 2
```

as auto detected drivers.

```
[    62.004] (II) modeset(0): glamor X acceleration enabled on Mesa DRI Intel(R) Haswell Mobile 

[    62.004] (II) modeset(0): glamor initialized

...

[    62.052] (II) modeset(G0): glamor X acceleration enabled on NVE7

[    62.052] (II) modeset(G0): glamor initialized

[    62.115] (II) modeset(G0): Output DP-1-1 has no monitor section

[    62.179] (II) modeset(G0): Output DP-1-2 has no monitor section

[    62.243] (II) modeset(G0): Output DP-1-3 has no monitor section
```

Looking back

```
[    62.011] (II) modeset(0): Output eDP-1 connected

[    62.011] (II) modeset(0): Output VGA-1 disconnected

[    62.011] (II) modeset(0): Using exact sizes for initial modes

[    62.011] (II) modeset(0): Output eDP-1 using initial mode 1920x1080 +0+0
```

the Intel GPU only sees the VGA port anh the internel screen, which is in use. 

so it appears that your DP outputs are attached to the Quattro video card.

So there are two questions.

Why does Gentoo not see the Quattro card?

Can the Intel GPU see the external Display port at all?

It the BIOS, we have no idea what Hybrid graphics Auto actually does. It might even do different things for Gentoo and Kubuntu.

The next test is to pastebin the logs again for each manual setting of Hybrid graphics.

Hybrid graphics Enable is Optimus mode. That may lead to blank screens when Xorg starts.

----------

## ElektroVirus

Thanks NeddySeagoon,

Gentoo didn't detect the Quattro video card, because I had disabled it with nvidia-xrun https://github.com/Witko/nvidia-xrun. Sorry for that. But it does not affect the result. For these log files I disabled the script, and the Quattro video card is visible from lspci.

So, I pasted the Xorg.0.log file for both Gentoo and Kubuntu, with both settings for "Hybrid graphics": enabled and disabled.

Notes for hybrid graphics disabled:

Gentoo does not boot. Stops at "Loading initramfs...". So no log file available.

Kubuntu does not detect VGA in xrandr. 

Hybrid graphics enabled:

Gentoo: http://dpaste.com/37F869Z

Kubuntu: http://dpaste.com/1VA4J9P

Hybrid graphics disabled:

http://dpaste.com/0Z90VC3

I also tested disabling nouveau and nvidia drivers in /etc/modprobe.d/ for kubuntu, and the DisplayPorts were working. I tested both the DisplayPort adapter and the Thunderbolt adapter, they worked with a video projector. 

/etc/modprobe.d/blacklist_video.conf:

```

blacklist nouveau

blacklist nvidia

blacklist nvidia_uvm

blacklist nvidia_drm

blacklist nvidia_modeset

blacklist nvidiafb

blacklist i2c_core

```

I used this configuration only to test that these missing nvidia or nouveau drivers are not the issue. This configuration is not present in the log files presented in this post.  

ElektroVirus

----------

## NeddySeagoon

ElektroVirus,

In Gentoo, only the Intel GPU was detected

```

[    16.519] (==) Matched intel as autoconfigured driver 0

[    16.519] (==) Matched modesetting as autoconfigured driver 1

[    16.519] (==) Matched fbdev as autoconfigured driver 2

[    16.519] (==) Matched vesa as autoconfigured driver 3

...

[    16.604] (II) modeset(0): Output eDP-1 connected

[    16.604] (II) modeset(0): Output VGA-1 disconnected

[    16.604] (II) modeset(0): Using exact sizes for initial modes

[    16.604] (II) modeset(0): Output eDP-1 using initial mode 1920x1080 +0+0
```

If nouveau supports your nVidia GPU (didn't check), it would be listed there too.

The Intel GPU only sees The internal display and the VGA connector. 

Kubuntu shows

```
[    10.323] (==) Matched nvidia as autoconfigured driver 0

[    10.323] (==) Matched nouveau as autoconfigured driver 1

[    10.323] (==) Matched modesetting as autoconfigured driver 2

[    10.323] (==) Matched fbdev as autoconfigured driver 3

[    10.323] (==) Matched vesa as autoconfigured driver 4

...

[    10.554] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0

[    10.554] (--) NVIDIA(0):     DFP-0

[    10.554] (--) NVIDIA(0):     DFP-1

[    10.554] (--) NVIDIA(0):     DFP-2

[    10.554] (--) NVIDIA(0):     DFP-3

[    10.554] (--) NVIDIA(0):     DFP-4

[    10.554] (--) NVIDIA(0):     DFP-5

[    10.572] (II) NVIDIA(0): NVIDIA GPU Quadro K1100M (GK107GL) at PCI:1:0:0 (GPU-0)

[    10.572] (--) NVIDIA(0): Memory: 2097152 kBytes

[    10.572] (--) NVIDIA(0): VideoBIOS: 80.07.ef.00.03

[    10.572] (II) NVIDIA(0): Detected PCI Express Link width: 16X

[    10.573] (--) NVIDIA(GPU-0): DFP-0: disconnected

[    10.573] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS

[    10.573] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock

[    10.573] (--) NVIDIA(GPU-0): 

[    10.574] (--) NVIDIA(GPU-0): DFP-1: disconnected

[    10.574] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS

[    10.574] (--) NVIDIA(GPU-0): DFP-1: 165.0 MHz maximum pixel clock

[    10.574] (--) NVIDIA(GPU-0): 

[    10.575] (--) NVIDIA(GPU-0): DFP-2: disconnected

[    10.575] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS

[    10.575] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock

[    10.575] (--) NVIDIA(GPU-0): 

[    10.575] (--) NVIDIA(GPU-0): DFP-3: disconnected

[    10.575] (--) NVIDIA(GPU-0): DFP-3: Internal DisplayPort

[    10.575] (--) NVIDIA(GPU-0): DFP-3: 960.0 MHz maximum pixel clock

[    10.575] (--) NVIDIA(GPU-0): 

[    10.575] (--) NVIDIA(GPU-0): DFP-4: disconnected

[    10.575] (--) NVIDIA(GPU-0): DFP-4: Internal DisplayPort

[    10.575] (--) NVIDIA(GPU-0): DFP-4: 960.0 MHz maximum pixel clock

[    10.575] (--) NVIDIA(GPU-0): 

[    10.575] (--) NVIDIA(GPU-0): DFP-5: disconnected

[    10.575] (--) NVIDIA(GPU-0): DFP-5: Internal DisplayPort

[    10.575] (--) NVIDIA(GPU-0): DFP-5: 960.0 MHz maximum pixel clock

[    10.575] (--) NVIDIA(GPU-0): 

[    10.575] (==) NVIDIA(0): 

[    10.575] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"

[    10.575] (==) NVIDIA(0):     will be used as the requested mode.

[    10.575] (==) NVIDIA(0): 

[    10.575] (--) NVIDIA(0): No enabled display devices found; starting anyway because

[    10.575] (--) NVIDIA(0):     AllowEmptyInitialConfiguration is enabled

[    10.575] (II) NVIDIA(0): Validated MetaModes:

[    10.575] (II) NVIDIA(0):     "NULL"

[    10.575] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
```

Lots of display ports but no VGA.

The Virtual screen size determined to be 640 x 480 is a hint that the system is operating in Optimus mode.

It continues with

```
[    10.640] (II) modeset(G0): Output eDP-1-1 has no monitor section

[    10.642] (II) modeset(G0): Output VGA-1-1 has no monitor section

[    10.643] (II) modeset(G0): EDID for output eDP-1-1

[    10.643] (II) modeset(G0): Manufacturer: LGD  Model: 46f  Serial#: 0

[    10.643] (II) modeset(G0): Year: 2014  Week: 0
```

Which is the Intel GPU detecting the display.

The last line of interest is

```
[    11.849] randr: falling back to unsynchronized pixmap sharing
```

which is a pointer to the nVidia GPU being used to draw images for the Intel GPU to transfer to the display.

That's Optimus at work.

With Hybrid Graphics disabled. 

```
[     9.572] (--) PCI:*(1@0:0:0) 10de:0ff6
```

 only the nVidia GPU appears and it shows only digital outputs.

```
[    10.305] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0

[    10.305] (--) NVIDIA(0):     DFP-0

[    10.305] (--) NVIDIA(0):     DFP-1

[    10.305] (--) NVIDIA(0):     DFP-2

[    10.305] (--) NVIDIA(0):     DFP-3 (boot)

[    10.305] (--) NVIDIA(0):     DFP-4

[    10.305] (--) NVIDIA(0):     DFP-5

[    10.305] (--) NVIDIA(0):     DFP-6
```

Thu internal display is 

```
[    10.310] (--) NVIDIA(GPU-0): LGD (DFP-3): connected

[    10.310] (--) NVIDIA(GPU-0): LGD (DFP-3): Internal DisplayPort

```

The conclusion is that the Intel GPU is not wired to any digital external outputs.

I suspect that Gentoo booted properly in this mode but you had no console driver, so you there was no text on the display after Grub passed control to the kernel.

Its possible to make Gentoo work with the nVidia GPU only.

----------

## ElektroVirus

Hello again, NeddySeagoon,

now that I know that my computer uses nvidia optimus technology, I followed the article on Gentoo Wiki (https://wiki.gentoo.org/wiki/NVIDIA/Optimus) and now everything seems to work! Gentoo succesfully finds all external displays, and I have hybrid graphics enabled (both nvidia binary drivers and i915 drivers are loaded).

But Xorg.0.log shows two errors which make me feel suspicious. 

```

[    19.432] (EE) modeset(G0): eglGetDisplay() failed

[    19.433] (EE) modeset(G0): glamor initialization failed

```

How bad are these errors? 

And can you explain, why lsmod shows that i915 drivers are loaded instead of i965 altough I have in /etc/portage/make.conf

```

VIDEO_CARDS="intel i965 nvidia"

```

configured i965 to be the the drivers?

Thanks,

ElektroVirus

----------

## dmpogo

 *ElektroVirus wrote:*   

> Hello again, NeddySeagoon,
> 
> now that I know that my computer uses nvidia optimus technology, I followed the article on Gentoo Wiki (https://wiki.gentoo.org/wiki/NVIDIA/Optimus) and now everything seems to work! Gentoo succesfully finds all external displays, and I have hybrid graphics enabled (both nvidia binary drivers and i915 drivers are loaded).
> 
> But Xorg.0.log shows two errors which make me feel suspicious. 
> ...

 

i965 and i915 refer to different things.   Kernel model is called i915  (I guess for historical reasons the name was never changed).  i965 in make.conf is a user space flag to pull necessary user-space drivers

So it is all fine here

Now you have two userspace driver flags   intel and i965, which are actually two alternatives to the same thing.   My note (I wonder if it is still true) says the following

```

# VIDEO_CARDS="intel"  - uses chip specific 2D acceleration driver, not installed if i965 is also set.

# VIDEO_CARDS="i965"   - uses Glamor 2D acceleration driver in xorg-server, overwrites intel for xorg-drivers.

# However, for 3D 'intel' can be needed, since this is the only flag recognized by libdrm,

# and is required to be set to use, for example, vaapi.  Thus we set both !

```

'chip specific'  is intel developed driver,    Glamor is a general framework used with modesetting kernel drivers, which is I remember what was used from your Xorg.0.log

Now that Glamor initialization has failed is not good - you will probably not be getting 2D acceleration on Intel GPU  (proprietary nvidia driver does everything itself for nvidia GPU)

You should check that USE='glamor' is enabled for xorg-server and mesa packages (and all the rest that uses it)

----------

## ElektroVirus

 *dmpogo wrote:*   

>  *ElektroVirus wrote:*   Hello again, NeddySeagoon,
> 
> now that I know that my computer uses nvidia optimus technology, I followed the article on Gentoo Wiki (https://wiki.gentoo.org/wiki/NVIDIA/Optimus) and now everything seems to work! Gentoo succesfully finds all external displays, and I have hybrid graphics enabled (both nvidia binary drivers and i915 drivers are loaded).
> 
> But Xorg.0.log shows two errors which make me feel suspicious. 
> ...

 

Thanks for reply.

Am I missing something now, but neither xorg-server (https://packages.gentoo.org/packages/x11-base/xorg-server) nor mesa (https://packages.gentoo.org/packages/media-libs/mesa) seem to have USE-flag "glamor".

Anyway, I added 'glamor' to the global USE-flag and ran 'emerge --newuse --ask @world' but neither xorg-server nor  mesa was recompiled. 

ElektroVirus

----------

## NeddySeagoon

ElektroVirus,

The answer to your question about Xorg Errors is it all depends on which chipset you are using to draw in the pixel buffer.

Optimus is a bit of a mess, even on Windows.

First, the Intel GPU is always used to move the content of the video card pixel buffer to the display.

Thats also called the display refresh. In Optimus mode, the nVidia GPU has no connections to the display.

Hold those thoughts. They will help you understand what follows.

When the Intel GPU does everything, the Xorg intel driver will give the best performance but its not compatible with Optimus, where the Intel chipset only does the screen refresh.

When the Intel GPU does everything, the second best performance is obtained with the modesetting driver and Glamour acceleration.

The modesetting driver is compatible with Optimus and must be used in Optimus mode.

The third case is with Optimus in use. The Intel GPU, driven by the modesetting driver, is only used for display refresh.

The nVidia GPU, driven with nvidia-drivers or nouveau draws the image in the pixel buffer. 

To return to your log fragment

```
[    19.432] (EE) modeset(G0): eglGetDisplay() failed

[    19.433] (EE) modeset(G0): glamor initialization failed 
```

In Optimus mode, they don't matter. The modeset driver does not do any drawing, so no acceleration is required.

In Intel only mode, with the modeset driver in use, they matter a great deal.

----------

## dmpogo

 *ElektroVirus wrote:*   

> 
> 
> Thanks for reply.
> 
> Am I missing something now, but neither xorg-server (https://packages.gentoo.org/packages/x11-base/xorg-server) nor mesa (https://packages.gentoo.org/packages/media-libs/mesa) seem to have USE-flag "glamor".
> ...

 

Indeed, as I see 'glamor' USE flag is not there anymore (was I just dreaming ? I could swear it existed).    For mesa the relevant  USE flags are 'egl' and 'gbm'

----------

## dmpogo

 *NeddySeagoon wrote:*   

> ElektroVirus,
> 
> The answer to your question about Xorg Errors is it all depends on which chipset you are using to draw in the pixel buffer.
> 
> Optimus is a bit of a mess, even on Windows.
> ...

 

Hi Neddy, I begin to be uncertain what intel driver now does.    Based on ebuild  of xf86-video-intel-2.99.917_p20190301.ebuild,  it requires kernel KMS support to be enabled and "modesetting on intel by default" kernel flag to be set.

Also glamor page says that glamor is compatible with intel driver.  It refers to setting AccelMethod tp 'glamor' but I wonder if modern rendition of intel driver actually defaults to it, since there is no USE flag to enable/disable glamor during the build time.

----------

