# Displayport on FreeBSD/amd64



## jacekkowalczyk82 (Aug 17, 2018)

Hi, 
I am new in FreeBSD world. I am learning. 

I am trying to connect to laptop (thinkpad X240) and make work external display using a miniDisplayPort to HDMI  cable. With Debian it works out of the box, but with Freebsd 11.2 not.
I do not have any idea what I did wrong or what I  am missing. 

This is what I got from xrandr: 


```
jacek@thinkpad-x240:~ % xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1366 x 768, current 1368 x 768, maximum 1368 x 768
default connected 1368x768+0+0 0mm x 0mm
   1366x768       0.00
   1368x768       0.00*
jacek@thinkpad-x240:~ %
```

Thanks in advance for any helpful reply. 
Greetings
Jacek


----------



## SirDice (Aug 17, 2018)

Post your /var/log/Xorg.0.log to Pastebin (or a similar service).


----------



## aragats (Aug 17, 2018)

jacekkowalczyk82 , I think you don't have correct video card driver loaded. What's your graphic card?


----------



## jacekkowalczyk82 (Aug 19, 2018)

SirDice aragats 

I added logs and graphics info in pastebin

https://pastebin.com/8Dd6VYYn


----------



## balanga (Aug 24, 2018)

jacekkowalczyk82 said:


> Hi,
> I am new in FreeBSD world. I am learning.
> 
> I am trying to connect to laptop (thinkpad X240) and make work external display using a miniDisplayPort to HDMI  cable. With Debian it works out of the box, but with Freebsd 11.2 not.
> ...



I have a ThinkPad X220 and have just connected it up to a 32" Samsung TV. It seemed to display output on the TV whilst booting, but when starting up X I got the LXDE desktop but nothing else.

You don't say what you see on the external display.


----------



## balanga (Aug 25, 2018)

jacekkowalczyk82 said:


> Hi,
> I am new in FreeBSD world. I am learning.
> 
> This is what I got from xrandr:
> ...



Don't know anything about xrandr, but this is what I got, if it helps:- 


```
Screen 0: minimum 320 x 200, current 2732 x 768, maximum 8192 x 8192
LVDS-1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
   1366x768      60.00*+
   1024x768      60.04    60.00..
   960x720       60.00..
   928x696       60.05..
   896x672       60.01..
   800x600       60.00    60.32    56.25..
   700x525       59.98..
   640x512       60.02..
   640x480       60.00    59.94..
   512x384       60.00..
   400x300       60.32    56.34..
   320x240       60.05..
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1366x768+1366+0 (normal left inverted right x axis y axis) 698mm x 393mm
   1366x768      59.79*+
   1920x1080     60.00    50.00    30.00    25.00    24.00..
   1920x1080i    60.00    50.00..
   1280x720      60.00    50.00..
   1440x576i     50.00..
   1024x768      75.08    70.07    60.00..
   1440x480i     59.94..
   832x624       74.55..
   800x600       72.19    75.00    60.32..
   720x576       50.00..
   720x480       59.94..
   640x480       75.00    72.81    66.67    60.00..
   720x400       70.08..
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
```


----------



## jacekkowalczyk82 (Aug 28, 2018)

Hi balanga  my external display says No signal.


----------



## jacekkowalczyk82 (Aug 31, 2018)

Shall I manually reconfigure Xorg?

I tried to run `Xorg -configure` in single user mode but it failed with message:

```
Fatal server error:
(EE) Could not create lock file in  /tmp/.tx0-lock
```


----------



## jacekkowalczyk82 (Aug 31, 2018)

All, I installed drm-next-kmod drivers and it looks it is better as xrandr is not failing, but the external monitor is still saying "no signal". 
I pasted pciconf and '/var/log/Xorg.0.log' and xrandr output here:  
https://pastebin.com/dfDcd2E3


----------



## developer_amauter (Aug 31, 2018)

I didn't yet try  checking details again  for my similar case with x220, but maybe this is a matter of setting sysctls?


----------



## jacekkowalczyk82 (Sep 18, 2018)

Hi developer_amauter 
Do you have any suggestions on what kind of entries to add /set in sysctls ?


----------



## jrm@ (Sep 18, 2018)

jacekkowalczyk82, the latest xrandr output you posted seems to indicate the HDMI connection is established.  Once only the HDMI cable is plugged in, could you try something like `xrandr --output HDMI-1 --mode 1600x900 --above eDP-1` or `xrandr --output HDMI-1 --mode 1600x900 --same-as eDP-1`?


----------



## jacekkowalczyk82 (Sep 18, 2018)

Hi jrm@   I will try this. Thanks


----------



## jacekkowalczyk82 (Sep 19, 2018)

Thanks, it works. Moreover, default xrandr without any parameters started working (but not every time, sometimes I need to connect disconnect cable few times). I think, by installing the correct intel display drivers from "drm-next-kmod", I solved the issue.


----------



## jacekkowalczyk82 (Sep 19, 2018)

I added my setup manual to git repo https://gitlab.com/jacekkowalczyk82/freebsd.


----------



## puretone (Sep 25, 2018)

jacekkowalczyk82 said:


> Thanks, it works. Moreover, default xrandr without any parameters started working (but not every time, sometimes I need to connect disconnect cable few times). I think, by installing the correct intel display drivers from "drm-next-kmod", I solved the issue.



Indeed, drm-next-kmod would be the "requirement" to make the Intel GPU chip work properly.
Hint: you can tell xorg and/or xinerama what to do when you attach a second display, to either "stretch" to the 2nd HDMI display or simply mirror onto the HDMI display.


----------

