The following steps are the most recent ones that the DisplayLink support guy was suggesting. I packaged the revisions in AUR, that compiled and worked great so far.

+

[[ja:DisplayLink]]

−

According to the Plugable information they should work with almost every DisplayLink (DL-1**) device although they do not suggest using their devices with Linux for production use for now.

+

DisplayLink devices on Linux still only have experimental support. While some people have had success in using them, it is generally not an easy process and not guaranteed to work. The steps on this page describe the generally most successful methods of using external monitors with DisplayLink.

+

+

Also be warned that even over USB 3.0, a DisplayLink monitor may exhibit noticeably more lag than e.g. a DisplayPort monitor, especially when large portions of the screen are being redrawn.

==Installation==

==Installation==

−

Install the {{Pkg|xf86-video-fbdev}} package, which provides framebuffer video for X.org.

+

=== USB 2.0 DL-1x5, DL-1x0 Devices ===

+

+

The kernel [[Wikipedia: Direct_Rendering_Manager|DRM]] driver for DisplayLink is {{ic|udl}}, a rewrite of the original [https://www.kernel.org/doc/Documentation/fb/udlfb.txt udlfb] driver. It allows configuring DisplayLink monitors using [[Xrandr]].

+

+

This should work without any configuration changes on {{pkg|linux}} 4.14.9-1 and later. If you're using an earlier version of that package or have {{ic|1=CONFIG_FB_UDL=m}} set in your kernel config, you need to [[blacklist]] the old kernel module, {{ic|udlfb}}, which may attempt to load itself first.

+

+

=== USB 3.0 DL-6xxx, DL-5xxx, DL-41xx, DL-3xxx Devices ===

+

+

# Install the {{AUR|displaylink}} driver. It allows configuring DisplayLink monitors using [[Xrandr]] in the same manner as the {{ic|udl}} driver.

+

# Enable {{ic|displaylink.service}}.

+

+

=== Setting up X Displays ===

−

Hardware-level support is provided by the [[Kernel modules|kernel module]] {{ic|udlfb}}, which should be loadable by default in Arch.

+

After that, run:

−

{{Note| Support for the features in {{AUR|xf86-video-fbdev-for-displaylink}} and {{AUR|udlfb}} from the AUR have been included upstream and are no longer needed. Use the official packages instead.}}

In the above output, we can see that provider 0 is the system's regular graphics provider (Intel), and provider 1 (modesetting) is the DisplayLink provider. To use the DisplayLink device, connect provider 1 to provider 0:

+

+

$ xrandr --setprovideroutputsource 1 0

+

+

and xrandr will add a DVI output you can [[Xrandr#Configuration|use as normal with xrandr]]. This is still experimental but supports hotplugging and when works, it is by far the simplest setup. If it works then everything below is unnecessary.

==Configuration==

==Configuration==

Line 17:

Line 40:

===Load the framebuffer device===

===Load the framebuffer device===

−

Before your system will recognize your DisplayLink device, the {{ic|udlfb}} kernel module must be loaded. To do this, run

+

Before your system will recognize your DisplayLink device, the {{ic|udl}} kernel module must be loaded. To do this, run

−

# modprobe udlfb

+

# modprobe udl

If your DisplayLink device is connected, it should show some visual indication of this. Although a green screen is the standard indicator of this, other variations have been spotted and are perfectly normal. Most importantly, the output of {{ic|dmesg}} should show something like the following, indicating a new DisplayLink device was found:

If your DisplayLink device is connected, it should show some visual indication of this. Although a green screen is the standard indicator of this, other variations have been spotted and are perfectly normal. Most importantly, the output of {{ic|dmesg}} should show something like the following, indicating a new DisplayLink device was found:

−

{{bc|<nowiki>usb 2-1.2: new high-speed USB device number 5 using ehci-pci

+

{{bc|<nowiki>usb 2-1.1: new high-speed USB device number 7 using ehci-pci

If the above does not list the DisplayLink screen, then you will need to offload DisplayLink to the main GPU:

+

+

{{bc|xrandr --setprovideroutputsource 1 0}}

+

+

Once the screen is available, refer to [[Xrandr]] for info on setting it up. For automating the configuration process, see [https://github.com/nathantypanski/displaylink.sh displaylink.sh].

+

+

====Enabling DVI output on startup====

+

The DisplayLink provider will not be automatically connected to the main provider in most cases, therefore the DVI output device will not be available. It can be helpful to automatically do this when X starts to facilitate automatic display configuration by the window manager.

For example, the appropriate startup configuration file for [[SDDM]] is {{ic|/usr/share/sddm/scripts/Xsetup}}.

−

Then, rebuild the kernel image:

+

Avoid placing these commands in {{ic|~/.xprofile}} as this breaks the display configuration of some window managers. Instead these commands should be run prior to any display output or setup.

−

# mkinitcpio -p linux

+

{{Note|If you have additional providers, specify the name of the provider instead of using indexes. The name of the DisplayLink device will be {{ic|modesetting}}}}

−

For more information on this, see [[Mkinitcpio]].

+

==== Switching between displaylink and nvidia/nouveau driver ====

−

===Update Xorg.conf===

+

Currently (displaylink version 1.3.54-1) it is not possible to use displaylink device and nvidia/nouveau driver simultaniously on optimus based laptops.

−

You must update or create an [[xorg.conf]] with a properly configured {{ic|ServerLayout}} to use a DisplayLink monitor, as Xorg will prefer internal monitors by default. The DisplayLink device is normally only usable if it is set as {{ic|screen0}} and the internal display as {{ic|screen1}}.

+

Currently to be able to use displaylink device on intel GPU, you should create config file (see troubleshooting section below). However, with that config file it is not possible to use primusrun. Bumblebee service is running, but it cannot work. Also, laptop's fans are becoming very noisy and laptop's temperature becomes very high. When you want to switch back to activate nvidia driver, comment everything in that file and reboot.

−

Add this to the bottom of xorg.conf:

+

To simplify process of switching, you can install {{aur|dl-switch}} package and add additional menu entry to your bootloader with kernel parameter activating displaylink workaround. For rEFInd bootloader it will look like this:

−

################ DisplayLink Stuff ###################

−

Section "Device"

−

Identifier "DisplayLinkDevice"

−

Driver "fbdev"

−

BusID "USB" # needed to use multiple DisplayLink devices

−

Option "fbdev" "/dev/fb0" # change to whatever device you want to use

−

# Option "rotate" "CCW" # uncomment for rotation

−

EndSection

−

−

Section "Monitor"

−

Identifier "DisplayLinkMonitor"

−

EndSection

−

−

Section "Screen"

−

Identifier "DisplayLinkScreen"

−

Device "DisplayLinkDevice"

−

Monitor "DisplayLinkMonitor"

−

DefaultDepth 16

−

EndSection

−

Then edit your server layout to look something like this

+

{{hc|/boot/EFI/refind/refind.conf|<nowiki>

+

...

+

submenuentry "Boot with DisplayLink workaround" {

+

add_options "systemd.unit=displaylink.target"

+

}

+

...

+

</nowiki>}}

+

When booting, your are able to choose: boot using default options or boot with displaylink working.

These are tested on [[Xfce]] using Display settings (included in XFCE4 package) and external tool - {{pkg|arandr}}. XFCE4 Display settings are likely to crash, so ARandR might help.

−

If X crashes, or nothing is shown at load, try to start X only using the external display by updating {{ic|xorg.conf}} as follows:

+

When you connect display link device via USB to your computer, the computer should show monitors in Display settings. There are few troubleshooting steps that you should try:

+

+

* Check [[#Setting up X Displays]]. If you can find any external monitors recognized, you should try to make them visible by the following commands:

+

{{bc|<nowiki>xrandr --setprovideroutputsource 1 0

+

xrandr --setprovideroutputsource 2 0

+

xrandr --setprovideroutputsource 3 0

+

...

+

</nowiki>}}

+

This will make them visible and recognized in Display settings.

+

* Restart {{ic|displaylink.service}}.

+

* Re-connecte USB cable.

+

* Check if {{ic|udl}} driver is loaded and monitors are connected.

+

+

=== Screen redraw is broken ===

+

If you are using {{ic|udl}} as your kernel driver and the monitor appears to work, but is only updating where you move the mouse or when windows change in certain places, then you probably have the wrong modeline for your screen. Getting a proper modeline for your screen with a command like

{{bc|

{{bc|

−

Screen 0 "DisplayLinkScreen"

+

gtf 1366 768 59.9

−

#Screen 1 "Internal" RightOf "DisplayLinkScreen"

−

#Option "Xinerama" "on"

}}

}}

−

There are reported instances in which Xinerama requires all its {{ic|Screen}} color depths to be the same. In both {{ic|Screen}} sections, try changing the {{ic|DefaultDepth}} to 16.

+

where {{ic|1366}} and {{ic|768}} are the horizontal and vertical resolutions for your monitor, and {{ic|59.9}} is the refresh rate from its specs. To use this, create a new mode with {{ic|xrandr}} like follows:

{{Note| With fbdev this is not true anymore, because fbdev provides virtual 24 bit support. Everything may be used with {{ic|DefaultDepth 24}}. However, USB 2.0 has less bandwidth than a standard monitor, so a performance update may be seen from setting it to 16 bit mode.}}

+

Then tell the monitor to use that mode for the DisplayLink monitor, and this should fix the redraw issues. Check the [[Xrandr]] page for information on using a different mode.

+

+

If this does not solve the problem (or if the correct modeline was already in place because of correct DDC data), it can help to run a compositor. E.g. when using plain i3, running {{Pkg|xcompmgr}} or {{Pkg|compton}} can mitigate the problem.

+

+

=== DisplayLink refresh rate is extremely slow with gnome 3 ===

+

If once you set up your DisplayLink your entire desktop becomes slow, try setting a "simpler" background image, such as complete black.

This is to be associated with bugs in hardware acceleration, which can be tested by running glxgears in the displaylink screen resulting in 1fps. There is currently no complete fix available, but turning off Hardware-Acceleration in affected applications can work as a temporary fix.

+

+

This can be done in applications without a hardware-acceleration option by prepending the {{ic|1=LIBGL_ALWAYS_SOFTWARE=1}} environment variable.

+

+

=== Impossible to activate displaylink's screen ===

+

In case you are able to see attached monitor via DisplayLink device in your screen settings, but after you turn it on and apply settings, it becomes deactivated, then try blacklist nouveau module and reboot:

+

{{hc|/etc/modprobe.d/nouveau.conf|<nowiki>

+

blacklist nouveau

+

options nouveau modeset=0

+

</nowiki>}}

+

+

=== Suspend problem ===

+

+

Displaylink is not working after suspend. Unplug and then plug again displaylink's usb cable to your computer. Monitor that is connected via DisplayLink will remain black. If you have lock screen, login to the system and then picture will appear at that monitor and you will be able to use displaylink as normal.

+

+

=== DisplayLink is not working when usb hot plugged ===

+

To be able to use DisplayLink monitors, its usb cable should be attached to laptop during boot time. Otherwise it can behave like they are available and mouse can be moved there, but its picture is frozen, even with correct configuration (see workaround 1). If it was not attached at boot time, attach it and reboot.

+

+

=== DisplayLink driver does not work with Intel GPUs after recent X upgrades ===

+

As [http://support.displaylink.com/knowledgebase/articles/1181623 this support] page says, upgrading the X Window Server to a version newer than 1.18.3 will make the system not compatible with DisplayLink by default. This applies to systems using an integrated Intel GPU, or a combination of integrated Intel GPU and a discrete GPU.

+

Until fixes in X Windows System will be released, there are two workarounds:

With two monitors configured in Xinerama mode, {{ic|/var/log/Xorg.0.log}} will sometimes display the following error:

+

Use the "intel" driver for the integrated GPU instead of "modesetting", which is now the default.

−

{{bc|

+

Create a file with the following content:

−

Fatal server error:

+

{{hc|/usr/share/X11/xorg.conf.d/20-displaylink.conf|

−

Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices

+

Section "Device"

+

Identifier "Intel Graphics"

+

Driver "intel"

+

EndSection

}}

}}

+

A reboot is required for the setting to be effective.

−

As indicated by [http://forums.gentoo.org/viewtopic-t-809655.html this Gentoo Forums thread], KMS might be incompatible with fbdev. They also suggested the possible fix of running {{ic|startx -- -retro}} which will allow X to run even when, to X itself, it doesn't appear to be working.

+

You may need the {{aur|evdi-git}} package.

−

{{Note |1= A [https://bugs.freedesktop.org/show_bug.cgi?id=65384 bug report] has been filed for this issue.}}

+

==== Workaround 2: Temporarily disable PageFlip for modesetting ====

+

+

For users that prefer to keep using "modesetting" driver, disabling page flipping should also help.

+

Create a file with the following content:

+

{{hc|/usr/share/X11/xorg.conf.d/20-displaylink.conf|

+

Section "Device"

+

Driver "modesetting"

+

Option "PageFlip" "false"

+

EndSection

+

}}

−

==See Also==

+

== See Also ==

* [http://displaylink.org/forum/forumdisplay.php?f=29 DisplayLink Open Source]: Official DisplayLink open source support forum

* [http://displaylink.org/forum/forumdisplay.php?f=29 DisplayLink Open Source]: Official DisplayLink open source support forum

Latest revision as of 08:17, 3 February 2018

DisplayLink devices on Linux still only have experimental support. While some people have had success in using them, it is generally not an easy process and not guaranteed to work. The steps on this page describe the generally most successful methods of using external monitors with DisplayLink.

Also be warned that even over USB 3.0, a DisplayLink monitor may exhibit noticeably more lag than e.g. a DisplayPort monitor, especially when large portions of the screen are being redrawn.

Installation

USB 2.0 DL-1x5, DL-1x0 Devices

The kernel DRM driver for DisplayLink is udl, a rewrite of the original udlfb driver. It allows configuring DisplayLink monitors using Xrandr.

This should work without any configuration changes on linux 4.14.9-1 and later. If you're using an earlier version of that package or have CONFIG_FB_UDL=m set in your kernel config, you need to blacklist the old kernel module, udlfb, which may attempt to load itself first.

USB 3.0 DL-6xxx, DL-5xxx, DL-41xx, DL-3xxx Devices

Install the displaylinkAUR driver. It allows configuring DisplayLink monitors using Xrandr in the same manner as the udl driver.

In the above output, we can see that provider 0 is the system's regular graphics provider (Intel), and provider 1 (modesetting) is the DisplayLink provider. To use the DisplayLink device, connect provider 1 to provider 0:

$ xrandr --setprovideroutputsource 1 0

and xrandr will add a DVI output you can use as normal with xrandr. This is still experimental but supports hotplugging and when works, it is by far the simplest setup. If it works then everything below is unnecessary.

Configuration

These instructions assume that you already have an up and running X server and are simply adding a monitor to your existing setup.

Load the framebuffer device

Before your system will recognize your DisplayLink device, the udl kernel module must be loaded. To do this, run

# modprobe udl

If your DisplayLink device is connected, it should show some visual indication of this. Although a green screen is the standard indicator of this, other variations have been spotted and are perfectly normal. Most importantly, the output of dmesg should show something like the following, indicating a new DisplayLink device was found:

If the above does not list the DisplayLink screen, then you will need to offload DisplayLink to the main GPU:

xrandr --setprovideroutputsource 1 0

Once the screen is available, refer to Xrandr for info on setting it up. For automating the configuration process, see displaylink.sh.

Enabling DVI output on startup

The DisplayLink provider will not be automatically connected to the main provider in most cases, therefore the DVI output device will not be available. It can be helpful to automatically do this when X starts to facilitate automatic display configuration by the window manager.

For example, the appropriate startup configuration file for SDDM is /usr/share/sddm/scripts/Xsetup.

Avoid placing these commands in ~/.xprofile as this breaks the display configuration of some window managers. Instead these commands should be run prior to any display output or setup.

Note: If you have additional providers, specify the name of the provider instead of using indexes. The name of the DisplayLink device will be modesetting

Switching between displaylink and nvidia/nouveau driver

Currently (displaylink version 1.3.54-1) it is not possible to use displaylink device and nvidia/nouveau driver simultaniously on optimus based laptops.
Currently to be able to use displaylink device on intel GPU, you should create config file (see troubleshooting section below). However, with that config file it is not possible to use primusrun. Bumblebee service is running, but it cannot work. Also, laptop's fans are becoming very noisy and laptop's temperature becomes very high. When you want to switch back to activate nvidia driver, comment everything in that file and reboot.

To simplify process of switching, you can install dl-switchAUR package and add additional menu entry to your bootloader with kernel parameter activating displaylink workaround. For rEFInd bootloader it will look like this:

Screen redraw is broken

If you are using udl as your kernel driver and the monitor appears to work, but is only updating where you move the mouse or when windows change in certain places, then you probably have the wrong modeline for your screen. Getting a proper modeline for your screen with a command like

gtf 1366 768 59.9

where 1366 and 768 are the horizontal and vertical resolutions for your monitor, and 59.9 is the refresh rate from its specs. To use this, create a new mode with xrandr like follows:

Then tell the monitor to use that mode for the DisplayLink monitor, and this should fix the redraw issues. Check the Xrandr page for information on using a different mode.

If this does not solve the problem (or if the correct modeline was already in place because of correct DDC data), it can help to run a compositor. E.g. when using plain i3, running xcompmgr or compton can mitigate the problem.

DisplayLink refresh rate is extremely slow with gnome 3

If once you set up your DisplayLink your entire desktop becomes slow, try setting a "simpler" background image, such as complete black.

This is to be associated with bugs in hardware acceleration, which can be tested by running glxgears in the displaylink screen resulting in 1fps. There is currently no complete fix available, but turning off Hardware-Acceleration in affected applications can work as a temporary fix.

This can be done in applications without a hardware-acceleration option by prepending the LIBGL_ALWAYS_SOFTWARE=1 environment variable.

Impossible to activate displaylink's screen

In case you are able to see attached monitor via DisplayLink device in your screen settings, but after you turn it on and apply settings, it becomes deactivated, then try blacklist nouveau module and reboot:

/etc/modprobe.d/nouveau.conf

blacklist nouveau
options nouveau modeset=0

Suspend problem

Displaylink is not working after suspend. Unplug and then plug again displaylink's usb cable to your computer. Monitor that is connected via DisplayLink will remain black. If you have lock screen, login to the system and then picture will appear at that monitor and you will be able to use displaylink as normal.

DisplayLink is not working when usb hot plugged

To be able to use DisplayLink monitors, its usb cable should be attached to laptop during boot time. Otherwise it can behave like they are available and mouse can be moved there, but its picture is frozen, even with correct configuration (see workaround 1). If it was not attached at boot time, attach it and reboot.

DisplayLink driver does not work with Intel GPUs after recent X upgrades

As this support page says, upgrading the X Window Server to a version newer than 1.18.3 will make the system not compatible with DisplayLink by default. This applies to systems using an integrated Intel GPU, or a combination of integrated Intel GPU and a discrete GPU.
Until fixes in X Windows System will be released, there are two workarounds:

Workaround 1: Use older intel driver as a fallback

Use the "intel" driver for the integrated GPU instead of "modesetting", which is now the default.