DisplayPorts in ThinkPad USB-C dock are not detected

My computer is a ThinkPad T480s and I'm using Ubuntu 18.04 running lightdm on Unity. I can use my mouse and keyboard when it is plugged in to the dock but the DisplayPort is not detected. When I plug it in nothing happens and xrandr says:

DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)

I tried different DisplayPort cables and ports in the dock. I also tried different displays. I also tried to switch back to the default GNOME display manager, but that didn't work either.

This is the dock I'm using: https://www.lenovo.com/us/en/accessories-and-monitors/docking/universal-cable-docks-usb/Thinkpad-USB-C-Dock/p/40A90090US

This is my computer: https://www.lenovo.com/us/en/laptops/thinkpad/thinkpad-t-series/ThinkPad-T480s/p/22TP2TT480S

EDIT: It suddenly started working. I restarted a few times and tried VGA instead of DisplayPort, which worked. When I switched back to DisplayPort everything worked fine.


I find this solution for with Lenovo T480s, Ubuntu 19.04 and dockstation Thinkpad 135 W.

As a root user create a file 20-displaylink.conf under:

/usr/share/X11/xorg.conf.d/

with the following content:

Section "Device"
  Identifier "DisplayLink"
  Driver "modesetting"
  Option "PageFlip" "false"
EndSection

Steps to do it:

To create the file:

cd /usr/share/X11/xorg.conf.d/

touch 20-displaylink.conf

sudo nano 20-displaylink.conf

paste the content

Section "Device"
Identifier "DisplayLink"
Driver "modesetting"
Option "PageFlip" "false"
EndSection

then

control + O

to save

then

control + x

to exit nano.

Then reboot to be effective.

Keep using "modesetting" driver, and disabling page flipping is necessary.

Source: https://support.displaylink.com/knowledgebase/articles/1181623-displaylink-ubuntu-driver-after-recent-x-upgrades

Displayport ubuntu troubleshooting page https://support.displaylink.com/knowledgebase/topics/103927-troubleshooting-ubuntu

P.S.: I am using IO adapters from DVI (monitor) to dport (dock).