Raspberry Pi – DisplayLink USB screen

raspberry pi logo

In the days of 2012-2016 it could be a struggle to get a displayLink scrren working, needed to compile the Linux core again with some “udlfb” libs, well….it seems all integrated out of the box these days!, you  just need to adjust some settings.


Hardware

So, for our example we use a ELO 7″ 5V 1A ET0702L screen with a resolution of 800×480 pixels:

Note: this screen uses 2 USB ports to get the 1A (due to 500MA max rating for USB port)


About

DisplayLink  is a proprietary USB graphics chip with associated drivers and protocol. Windows has DisplayLink support built in, but other operating systems typically need some added software to make it go.

In Linux, the driver that you need is called udlfb, which is provided as a kernel module. This module should already be there on recent Raspbian builds; I didn’t have to do anything to get it.

In Linux, the DisplayLink device appears to the system as a framebuffer, which is a hardware-independent API for accessing video memory, a.k.a. you just need a way for your Raspberry Pi system to output whatever you want to display to a framebuffer.

The udlfb driver talks to the DisplayLink screen via USB and exposes that interface through the Linux framebuffer device at /dev/fb1


Connecting

Note: we used a Raspberry Pi 3 B+ with Buster OS

When you connect the USB cables to the Pi, the screen will be recognized as 2 devices (1) touch (2) screen:

in your device list you find a new framebuffer named fb1:

Note:

framebuffer 0 is the HDMI connection interface (unconnected)

framebuffer 1 is the ELO screen connected on USB (DisplayLink)


Using the screen

All you have to do is inform the X-Windows system that you have a monitor using that device and what driver it should use. To do that, you must edit (or create) the file /etc/X11/xorg.conf  I had to create this file, and this is its entire contents:

You can use sudo nano /etc/X11/xorg.conf to create or edit the file, paste in these contents:

The Identifier values are meaningless, it’s only important that the references in the Screen section are correct. The important part is the Driver and Option keys in the Device section, where we tell X that we have an fbdev device and that it is located at /dev/fb1.

Once you have set all of this up, you should be able to reboot the Pi with only your DisplayLink monitor plugged in and see your GUI desktop environment appear!

Sources: https://blog.aaronbieber.com/2020/01/06/raspberry-pi-on-displaylink.html


Example to use the second screen (framebuffer 1 / fb1) in PyGame on a Raspberry Pi,: