View unanswered posts | View active topics It is currently Tue Sep 25, 2018 9:07 pm



Reply to topic  [ 6 posts ] 
 Using Displaylink screens on Utilite 
Author Message

Joined: Thu Sep 25, 2014 9:43 am
Posts: 37
Post Using Displaylink screens on Utilite
Hello,
I recently bought a Lilliput usb touchscreen monitor for my Utilite computer.
It's a very convenient little device, as it allows me to be completely mobile with the Utilite: it's a display with an input device and it's powered through the USB port.
However setting it up wasn't easy, so I decided to share my progress on the forum.
I hope that Ubuntu 14.04 will be released soon, as it has a much better driver and support for these screens.

The displaylink driver is already in the 3.0 kernel sources, but it's not enabled*. The display setup is also a bit difficult, you have to fiddle with xorg.conf to get the correct settings.
So you'll find below the step-by-step guide to set up a Displaylink adapter:

* Note to Compulab: please include the udlfb driver in the next kernel release!


Last edited by kbarni on Wed Feb 11, 2015 9:36 am, edited 1 time in total.



Mon Feb 09, 2015 11:15 am
Profile

Joined: Thu Sep 25, 2014 9:43 am
Posts: 37
Post Re: Using Displaylink screens on Utilite [in progress]
Step 1. Recompile the kernel
The Utilite driver in the 3.0 kernel version is called udlfb. It's present in the sources, but it isn't enabled; you have to enable it yourself and recompile the kernel.
To compile the kernel, please follow the guide in the wiki: http://www.compulab.co.il/utilite-compu ... nux_Kernel
To simplify the things, I didn't set up a cross-compilation chain, instead I compiled the kernel directly on the Utilite.
When running
Code:
make menuconfig
enable the udlfb driver in Device drivers->Graphics support->Support for framebuffer devices->Displaylink USB framebuffer support.
Install the new kernel and restart the system. The screen should turn green and the udlfb driver should recognize the screen. Check dmesg | grep udlfb:
Code:
udlfb: DisplayLink USB device /dev/fb4 attached. 1024x600 resolution. Using 2400K framebuffer memory
usbcore: registered new interface driver udlfb


Step 1.b: Use the compiled kernel object
Note: I didn't test this method, and maybe you have to do something to enable the driver. However this could simplify your work, as you can skip the recompilation of the whole kernel. Remove the PDF extension from the attached file and copy it to:
Code:
/lib/modules/3.0.35-cm-fx6-6.3/kernel/drivers/video/udlfb.ko

Maybe someone can explain how to enable this kernel module.


Attachments:
udlfb.ko.pdf [27.25 KiB]
Downloaded 145 times
Mon Feb 09, 2015 11:30 am
Profile

Joined: Thu Sep 25, 2014 9:43 am
Posts: 37
Post Re: Using Displaylink screens on Utilite [in progress]
Step 2: Activate the new screen
First you have to create a file in /etc/modprobe.d/displaylink.conf containing the following line:
Code:
options udlfb fb_defio=1


Then check the framebuffer allocated for the Displaylink screen: sudo cat /proc/fb
Code:
0 DISP4 BG - DI1
1 DISP4 FG
2 DISP3 BG
3 DISP3 FG
4 udlfb

So the displaylink screen is connected to framebuffer 4 (/dev/fb4).

Create a file called /usr/share/X11/xorg.conf.d/52-displaylink.conf containing:
Code:
Section "Device"
   Identifier   "DisplayLink"
#   Driver      "displaylink"
   Driver      "fbdev"
   Option      "fbdev"      "/dev/fb4"
#   Option      "HWcursor"   "false"
EndSection

Section "Monitor"
   Identifier   "MonitorDL"
EndSection

Section "Screen"
   Identifier   "ScreenDL"
   Monitor      "MonitorDL"
   Device      "DisplayLink"
   DefaultDepth   16
EndSection

Make sure to use the framebuffer device detected in the previous step (/dev/fbX)

The last step is to activate the screen. Edit the /etc/X11/xorg.conf file:
Code:
Section "ServerLayout"
   Identifier   "Default Layout"
   Screen      "ScreenDL"
EndSection

If you have a problem, you can change back the screen to "Default screen".

This guide can help you to set up a dual-head display using Xinerama: http://how-to.cc/get-a-displaylink-vide ... untu-12-04 I tried this solution, I got both displays working, but the framebuffers were messed up, so it was mostly unusable.


Last edited by kbarni on Wed Feb 11, 2015 9:42 am, edited 1 time in total.



Mon Feb 09, 2015 11:52 am
Profile

Joined: Thu Sep 25, 2014 9:43 am
Posts: 37
Post Re: Using Displaylink screens on Utilite [in progress]
Step 3 (optional): Calibrate the touchscreen
To calibrate the touchscreen, install the xinput-calibrate package.
Run from the terminal xinput --list
Note the id of the touchscreen. For me it's something like:
Code:
eGalax Inc. USB TouchController            id=7   [slave  pointer  (2)]

Run
Code:
xinput_calibrator --device X
where X is the id from the previous step. After the calibration procedure, the program should display the instructions to make the calibration permanent: Create a file /usr/share/X11/xorg.conf.d/60-touchscreen.conf and copy the calibration data.

If you are using a multi-head display, map the touchscreen to the Displaylink monitor:
Code:
xinput map-to-crtc X HEAD-0

(X is stil the id of the touchscreen device)


Last edited by kbarni on Mon Feb 09, 2015 12:27 pm, edited 1 time in total.



Mon Feb 09, 2015 11:59 am
Profile

Joined: Thu Sep 25, 2014 9:43 am
Posts: 37
Post Re: Using Displaylink screens on Utilite
Step 4. Auto-detecting the Displaylink monitor

This part is trickier, but but has to be done. Otherwise, if the Displaylink monitor is not connected, the X server startup will fail with a graphics error.

First, make two versions of xorg.conf: the original (with Screen "Default screen" in ServerLayout) and one for Displaylink (containing Screen "ScreenDL", as presented above). Call them xorg.conf.displaylink and xorg.conf.vivante. Now delete the xorg.conf file.

Then create a script (/etc/X11/monitors.sh) to detect if the DisplayLink screen is connected (checks if there is a framebuffer device with the udlfb driver) and links xorg.conf to the correct configuration file:
Code:
cat /proc/fb | grep udlfb && ln -sf /etc/X11/xorg.conf.displaylink /etc/X11/xorg.conf || ln -sf /etc/X11/xorg.conf.vivante /etc/X11/xorg.conf

Don't forget to make it executable (sudo chmod a+x monitors.sh).

Add this script to upstart, right before lightdm starts. Create a file /etc/init/monitors.conf
Code:
description   "Monitor detection at startup"

start on starting lightdm
exec /etc/X11/monitors.sh


Mon Feb 09, 2015 12:13 pm
Profile

Joined: Thu Sep 25, 2014 9:43 am
Posts: 37
Post DisplayLink on Utilite2
I just tried to setup the DisplayLink screen with the new Utilite2.
As it uses the kernel version 3.4, it still uses the old udlfb driver; so most of the instructions above apply to the Utilite2.

The driver isn't included in the official kernel, you have to recompile it for yourself. If everything went well, you'll get a green screen at startup and the DisplayLink screen will be on /dev/fb1.

ATM I'm struck with setting the xorg.conf. I tried to add a config file like above with the fbdev driver, but I get a black screen. Here is the dmesg:
Code:
[    7.452484] udlfb: DisplayLink USB device /dev/fb1 attached. 1024x600 resolution. Using 2400K framebuffer memory
[   17.205627] udlfb: open /dev/fb1 user=1 fb_info=eea35400 count=1
[   17.205657] udlfb: released /dev/fb1 user=1 count=0
[   17.206024] udlfb: open /dev/fb1 user=1 fb_info=eea35400 count=1
[   17.214874] udlfb: /dev/fb1 FB_BLANK mode 0 --> 1
[   17.468658] udlfb: /dev/fb1 FB_BLANK mode 1 --> 0

Any idea how to solve this?


Fri May 29, 2015 12:52 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.