DisplayLink Linux Rotation
Posted on 02. Jan, 2010 by Bernie Thompson in udlfb
With a kernel framebuffer driver that supports defio (like the version of udlfb in testing at git.plugable.com), it’s possible to use the standard xf86-video-fbdev X driver, rather than a custom DisplayLink one.
One interesting gain is xf86-video-fbdev supports rotation with a custom option (note it disables DGA and xrandr when it rotated mode).
To enable, in the xorg.conf “Device” section, add a Rotate option, setting it to CW, CCW, or UD.
Section "Device" Identifier "dl" Driver "fbdev" Option "rotate" "CCW" Option "fbdev" "/dev/fb1" EndSection
One downside is rendering is significantly slower, as the extra work of rotation is done at the X level and the page-fault behavior of defio means even small updates refresh much of the screen. Here’s some numbers that can be compared to earlier posts (in non-rotate mode):
bernie@bernie-aspireone:~/git/misc-udlfb$ ./udlfb-perf.sh fb0 gtkperf -a Xlib: extension "RANDR" missing on display ":3.0". GtkPerf 0.40 - Starting testing: Fri Jan 1 09:47:20 2010 GtkEntry - time: 0.00 GtkComboBox - time: 3.73 GtkComboBoxEntry - time: 2.08 GtkSpinButton - time: 0.49 GtkProgressBar - time: 0.69 GtkToggleButton - time: 0.47 GtkCheckButton - time: 0.44 GtkRadioButton - time: 0.79 GtkTextView - Add text - time: 2.30 GtkTextView - Scroll - time: 1.24 GtkDrawingArea - Lines - time: 4.14 GtkDrawingArea - Circles - time: 4.56 GtkDrawingArea - Text - time: 4.11 GtkDrawingArea - Pixbufs - time: 0.90 --- Total time: 25.96 Quitting.. model name : Intel(R) Atom(TM) CPU N270 @ 1.60GHz model name : Intel(R) Atom(TM) CPU N270 @ 1.60GHz cpu MHz : 800.000 cpu MHz : 800.000 MemTotal: 2052144 kB Framebuffer Mode: 1920,1080 Rendered bytes: 1238913024 (total pixels * Bpp) Identical bytes: 1070725304 (skipped via shadow buffer check) sent bytes: 125732225 (compressed usb data, including overhead) K CPU cycles: 7478653 (transpired, may include context switches) % pixels found to be unchanged: 86.00 % Compression of changed pixels : 25.00 % Total CPU cycles spent per input pixel: 6 Total CPU cycles spent per output pixel: 59 USB Mbps: 35.52 (theoretical USB 2.0 peak 480)


Plugable USB 2.0 Universal Docking Station
USB 2.0 to VGA/DVI/HDMI Adapter
Works like a charm,
got a display link device to work in portrait mode.
With the display not rotated there are no errors, if I use the rotate option there are random vertical lines that appear to be frozen and do not update any more. These lines only disappear on a restart of X.
I tried disabling ShadowFB (is it even used???) with no difference.
Any idea on how to fix this or is it due to the beta character of udlfb?
Thanks for your work, Regards
Jens Seekamp
Hi Jens,
Yep, those lines are a problem with the defio mechanism (and/or how udlfb is using it). See http://lists.freedesktop.org/archives/libdlo/2010-January/000533.html for more background. I’ve been exchanging emails with the author of the defio mechanism, and hopefully the root cause and solution will be found soon.
Best wishes,
bernie
Hi Bernie,
Thanks for this great posting! It really helped to find the exact problem I’m having on a Google search.
Any update on the defio/udlfb vertical line issue?
Chris
Hi Bernie !
Please allow one more question about a strange effect:
I am trying to use a touchscreen display via a dislaylink adapter, using the evtouch-driver (http://www.conan.de/touchscreen/evtouch.html) for the touch-feature. Without any rotation everything works fine, but as soon as I rotate the display – which works fine – the X-server dies as soon as the touchscreen is actually touched. The log says ‘EVTouch TouchScreen: Unable to grab device (Device or resource busy).’, and the server dies with signal 11.
The only thing I changed is to include the rotate-option in the device-section of the screen.
Do you have any idea or workaround ?
Thank you very much, best regards !
Jens
Hi Jens,
Unfortunately, I don’t have an answer on this one, as none of my devices has touchscreen going. It may be a xf86-video-fbdev limitation, you might want to ask around ..
Best wishes,
Bernie