Software projects/OS/Slackware/Advanced usage/USB graphic - Pandora Wiki

DisplayLink in SL4P 14.0

Release 14.0 of SL4P is prepared for DisplayLink usage. Only a few steps are necessary to enable DisplayLink compatibility:

Step 1: Activate DisplayLink-enabled kernel and modules

Open a terminal and activate the DisplayLink-enabled kernel and modules:

su -

cd /boot
cp uImage-3.2.30-dirty-displaylink uImage

cd /lib/modules
cp -r 3.2.30-dirty-displaylink/* 3.2.30-dirty

reboot

Step 2: First Test

Plug in the DisplayLink adapter, connect the display. Make sure that USB Host is enabled on the Pandora. Then reboot the Pandora. After the reboot, the external display should turn green, as the sign that the DisplayLink driver is active and talking to the DisplayLink adapter. If it does, the first test was successful.


Step 3: Adjust /etc/X11/xorg.conf

Add this block to /etc/X11/xorg.conf

(you should make sure that /dev/fb3 is the correct framebuffer device to use, by reading the dmesg output directly after plugging in the DisplayLink adapter)

################ DisplayLink Stuff ###################
Section "Device"
Identifier "DisplayLinkDevice"
Driver "fbdev"
BusID "USB" # needed to use multiple DisplayLink devices
Option "fbdev" "/dev/fb3" # 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 find the Section "ServerLayout" and add a reference to the new screen, e.g. like this:

Screen 0 "DisplayLinkScreen"
Screen 1 "Screen0" LeftOf "DisplayLinkScreen"
Option "Xinerama" "on"


Hints:

  • "Screen0" is the reference to the Pandora screen. I think that's the default identified in SL4P and SuperZaxxon. You may check to make sure it's correct.
  • You may replace "LeftOf" by "RightOf", "Above" or "Below".
  • For cloning, you may experiment with
    Option "Clone" "on"
    . However, this will need adjustment of the DisplayLink display's resolution and probably more, in order to produce a satisfying result. Please document it here, if you find a good solution for cloning.


Optional: Further tweaking of the setup

If you want to change xorg.conf and test the changes without waiting for X with XFCE to start up each time, you may do as a user:

xwmconfig

choose fvwm2

Then as root, edit /etc/inittab, and change:

id:4:initdefault:

into

id:3:initdefault:

Then SL4P boots into text mode, and you can log in and type startx to start X with the much quicker loading fwwm2 window manager. Once you have found a setup you want to use, you may revert the last steps to boot directly into XFCE again.

To Do: Hotplug

We still need to find a satisfactory hotplug solution. Currently, the X server needs to be restarted or a second instance of the X server needs to be launched, in order to make a newly plugged in DisplayLink adapter work.

It seems that real hotplug is not possible with the versions of X and udlfb (kernel): [1]

What would in theory be possible using the hotplug mechanism of Linux, as I understand it, would be, to kill and restart X automatically on every plug / unplug of a DisplayLink device. Of course, this is a really bad hack. Open applications would lose any unsaved data. But I could think of a semi-automatic solution: Whenever hot(un)plug of a DisplayLink adapter is detected, prompt the user to save any unsaved data, and to then hit the "Restart X" button of the prompting dialog.

Work in progress...


Usage hint: Use two instances of the X server

If you modified your xorg.conf as mentioned here in Step 6, it is possible to either start the X server with or without the DisplayLink adapter connected. Either method will work and give a good displaying result.

If you want to plug or unplug the DisplayLink adapter and then adapt the display (e.g.: You worked at home with DisplayLink, then unplug DisplayLink and want to continue our work on the way using just the Pandora screen), there is currently no way around closing the application(s) you worked with, saving your files, restarting the X server and reopening your applications and files.

However, there is at least a method, that makes it a bit easier by avoiding the need to leave X entirely:

Use two instances of the X server:

  • Let the Pandora boot, without DisplayLink connected, into the X environment (i.e. the /etc/inittab modification is not necessary for that method)
  • (work on the Pandora as usual)
  • (then close all applications, that you plan to use with DisplayLink later)
  • Plug in the DisplayLink adapter with the connected display. The display will be green
  • Open a console and type "startx"

--> Another instance of the X server will be started, that uses the DisplayLink-enabled setup and is shown on the external screen. The first X instance won't be visible and usable during the second instance runs.

  • (open your applications again and continue your work on the large screen)
  • (close your applications on the large screen)
  • Click the "exit" icon in the lower right corner and choose "Log out"

--> The 2nd instance of the X server will quit and you are back on the Pandora screen in the first instance of the X server

  • Now you can disconnect the DisplayLink adapter

However, please take care to really quit and restart your applications. Otherwise you may start a second instance of your application on the other screen, maybe load the same file and end up in a big mess with your data files.

SiS USB2VGA adapters

They should work in general, using the sisusbvga / sisusb kernel module and X driver. However, I have not succeeded to make one work in SL4P.

See the proof that it works in theory: http://forum.gp2x.de/viewtopic.php?p=177636#p177636

Top