DisplayLink is a technology that enables monitors to work via USB.
You need to activate the following kernel options::
Device Drivers --->
Graphics support --->
<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
<*> Support for frame buffer devices --->
<*> Displaylink USB Framebuffer support
After booting into the new kernel the external monitor should show a green background image. That means the kernel module is loaded and the device works, it also creates the device in /dev/fb0.
If you have already other framebuffer
devices with your AMD driver, it will be /dev/fb1
For X11 drivers, you can use x11-drivers/xf86-video-fbdev or x11-drivers/xf86-video-displaylink from the x11 overlay.
- Portage uses the variable VIDEO_CARDS for enabling support for various graphics cards in packages. Setting VIDEO_CARDS to fbdev will pull in the correct driver:
After setting this you want to update your system so the changes take effect:
One X server
Two X server
This method is failsafe and should work with any graphics card installed. We start two instances of X server for each device and then use a software called x2x to move the input devices between them.
- two independent instances and desktops
- Input devices follow the mouse pointer
For this method, we need another input device driver called x11-drivers/xf86-input-void:
INPUT_DEVICES="... void ..."
Also install x11-misc/x2x:
We configure two independent xorg.confs for each device and initialize the desktop using ~/.xinitrc scripts.
You may need to check other xorg.conf files (including files in /etc/X11/xorg.conf.d/) for any overlap in various names used. See the Discussion page for details.
Create the file /etc/X11/xorg.conf.DL:
driver "displaylink" # Or fbdev depending on what you installed
Option "fbdev" "/dev/fb0" # You have to use the correct framebuffer device here
Identifier "Default Screen"
Depth 16 # 24bit works fine but for USB 2.0 a lot of data
Identifier "Server Layout"
Screen 0 "Default Screen" 0 0
Option "AllowMouseOpenFail" "True"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "AllowEmptyInput" "false"
Option "AutoAddDevices" "false"
Option "AutoEnableDevices" "false"
Next we create the ~/.xinitrc2 for your external display. Create and customize the file to your needs, here is an example:
DPMS is turned off, because I once had trouble to wake up the monitor again.
# DPMS stuff
## turn on monitor
xset dpms force on
## disable sleep modes etc.
## disable screensaver
xset s off
# turn off beep
# activate zapping (ctrl+alt+Bksp killall X)
setxkbmap -option terminate:ctrl_alt_bksp
# Set the background using feh
feh --bg-scale /usr/share/slim/themes/capernoited/background.jpg
xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &
# start programs
# start the actual window manager
This is the actual script that starts the second instance of X server. Make it executable and save it somewhere in your home folder, in this example we save it to ~/.displaylink.sh:
xinit ~/.xinitrc2 -- /usr/bin/X :1 -xf86config xorg.conf.DL -novtswitch -sharevts -audit 0 -layout "Screen Layout" vt12 &
x2x -west -from :0 -to :1 &
If you call this script to your actual ~/.xinitrc
(which is executed on every start of X) or add it to GNOME
, etc. autostart, it will automatically initialize the second desktop for you. If the second screen is not attached, it just fails to do so.
If your system has a /etc/X11/xorg.conf.d/, most likely you will need to start with the above -layout option so the X11 server being started will start properly. See the discussion.