X
    Categories: Guides

Low End Tech – How to Setup Dual Monitor on Raspberry Pi

 

LOCAL BUILDING

On a Raspberry Pi first install the latest version of Raspbian or Ubuntu Mate from the downloads page. Then boot your Pi, plug in Ethernet to give you access to the sources, and log in.

First get the sources, which will take some time:

$ git clone --depth=1 https://github.com/raspberrypi/linux

Add missing dependencies:

$ sudo apt-get install git libncurse5-dev bc

Configure the kernel – as well as the default configuration you may wish to configure your kernel in more detail or apply patches from another source to add or remove required functionality:

Run the following commands depending on your Raspberry Pi version.

RASPBERRY PI 1 (OR COMPUTE MODULE) DEFAULT BUILD CONFIGURATION

$ cd linux
$ KERNEL=kernel
$ make bcmrpi_defconfig

RASPBERRY PI 2 DEFAULT BUILD CONFIGURATION

$ cd linux
$ KERNEL=kernel7
$ make bcm2709_defconfig

MODIFYING DEFAUL KERNEL CONFIGURATIONS

$ make menuconfig

At this time you would want to navigate to

Device Drivers -> Graphic Support -> Direct Rendering Manager

Enable

Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
Display Link (NEW)

BUILD KERNEL COMMANDS

Build and install the kernel, modules and Device Tree blobs; this step takes a lot of time…

$ make zImage modules dtbs
$ sudo make modules_install
$ sudo cp arch/arm/boot/dts/*.dtb /boot/
$ sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
$ sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
$ sudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img

Note: On a Raspberry Pi 2, adding -j4 (make -j4 zImage modules dtbs) splits the work between all four cores, speeding up compilation significantly.

 

XORG CONFIGURATIONS

Using your edit (nano) we will now edit xorg.conf file to resemble something like below

$ sudo nano /etc/X11/xorg.conf

you can copy and paste if you like

Section "Device"
Identifier "displaylink"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"
Option "ShadowFB" "off"
EndSection

Section "Device"
Identifier "Raspberry Pi FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "ShadowFB" "off"
EndSection

Section "Monitor"
Identifier "AOC1"
EndSection

Section "Monitor"
Identifier "AOC2"
EndSection

Section "Screen"
Identifier "screen"
Device "displaylink"
Monitor "AOC2"
EndSection

Section "Screen"
Identifier "screen1"
Device "Raspberry Pi FBDEV"
Monitor "AOC1"
EndSection

Section "ServerLayout"
Identifier "default"
Screen 0 "screen1" 0 0
Screen 1 "screen" LeftOf "screen1"
EndSection

 

now it’s time to reboot and check if everything is working!

novaspirit: Avid Thinker, Computer Programmer, Web evangelist, Hacking / Breaking expert, Problem Solver, Technology Obsessed, Gamer, 3D printing, Coffee lover!

View Comments (108)

  • Hi,

    Thank you very much for the guide i found your information in reference ot the dual screen a great help.

    I was wondering if there was a way to configure so i can use my Rdesktop in dual screen mode. It seems through your instructions that a second screen is possible however it seems to work separate from the main display.

    In simply terms i am working towards getting it like the 'extend screen' option in windows, is this possible?

    Thanks in advance

  • Hi,

    Thanks for the tutorial!

    I found a typo at the beginning for missing dependencies: it should be libncurses5-dev.

    However, I have followed all the steps but my secondary monitor isn't working.

    I can see it's turned on but being blank.

    Do you have any ideas what could go wrong?

    Thanks in advance for your help.

  • I have the Raspberry Pi 3, can you post the correct kernel commands for my pi? Better yet, can you point me in the right direction to read about what you are doing so I can understand what exactly you are changing in the kernel? Thank you!

  • I finally gave up trying. The documentation needs real help as noted before libncurses5.dev and the make had to be added as well as git. Isn't there .img that can be shared?

  • Do you happen to know if there are video delays to the additional screen? I'm considering using my PI3 to do the 3D projector thing noted here.

    http://www.goatandyeti.com/#!diy-3d-theater/c112z

    The short overview of the setup is to use VLC to stream one video to 2 projectors which each have polarized lenses, then you wear standard polarized movie glasses to view 3D content. However video delays to the different video outputs would be a critical issue.

    • this will have a bottleneck effect. being the bandwidth is on a usb 2.0. you are limited on video speeds. performing daily desktop task is fine, if you try to run heavy media on the display you will notice lag

  • Hi I noticed that the Sabrent device is using the displaylink DL-195 chipset...would another brand of adaptor using the same chipset be able to be used in your "how to".

    I am unable to purchase a Sabrent brand adaptor but there is a "Plugable" brand one I can with the same chipset

  • hi I follow your guide but in log file I obtained:
    root@rpitc-fd061ded:/var/log# less Xorg.0.log |grep /dev/fb
    [ 6.075] (II) FBTURBO(0): using /dev/fb0
    [ 6.075] (EE) open /dev/fb1: No such file or directory
    [ 6.075] (**) FBTURBO(0): Option "fbdev" "/dev/fb0"

  • how can I run a Raspberry Pi WITHOUT a login?

    want to run it like an APPLE ][+

    no network, just system.

  • Friend,

    I did exactly as directed in your video (https://www.youtube.com/watch?v=dTcU5YSq-Ww), but there is no xorg.conf eblacklis-framebuffer.conf to edit. I created the files and restarted, but did not climb any of the screens.

    Are there any steps I should take before doing the tutorial commands?

    Thank you!

Related Post