browntastic
Posts: 10
Joined: Sun Oct 19, 2014 5:23 pm

Xinerama on Raspbian

Wed Feb 14, 2018 2:58 am

I want to splitscreen my monitor, and have both sides show the same thing. So basically cloning the desktop and having it appear next to itself on the same screen. People have recommended Xinerama to do this. It appears there isn't a Raspbian version. http://xpra.org/trac/wiki/Download#Linux Has anybody successfully installed it on Raspbian? What steps did you take?

User avatar
ab1jx
Posts: 885
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Xinerama on Raspbian

Wed Feb 14, 2018 3:36 am

I thought the name was familiar. Search for it in Synaptic. I don't see an Xinerama application, it's more like a library. The entry for ibXinerama1 for example says:

Code: Select all

libXinerama provides an X Window System client interface to the XINERAMA
extension to the X protocol.

The Xinerama (also known as panoramiX) extension allows for multiple screens
attached to a single display to be treated as belonging together, and to give
desktop applications a better idea of the monitor layout.

More information about X.Org can be found at:
<URL:http://www.X.org>

This module can be found at
git://anongit.freedesktop.org/git/xorg/lib/libXinerama
I have a video player called xine installed.

What I would suspect is that if it tries to do video at an X11 level it's going to be slow and a CPU hog. The place to do it would be at a GPU level where there's plenty of spare horsepower. If Xinerama has OpenCL or OpenGL drivers that might work. Xine playing video with "auto" as the driver choice burns about 70% CPU so it isn't very efficient. Something that directly accessed the VideoCore GPU/QPU could probably work if there was such a thing. That's what Omxplayer does, I can play a video and the CPU's about 5% busy because the GPU is doing most of the work.

browntastic
Posts: 10
Joined: Sun Oct 19, 2014 5:23 pm

Re: Xinerama on Raspbian

Mon Feb 19, 2018 6:38 pm

So are you telling me it can't be done?

User avatar
ab1jx
Posts: 885
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Xinerama on Raspbian

Mon Feb 19, 2018 8:05 pm

Well, it's not absolute, I just wouldn't consider it advisable, unless you're going to put the time into getting the GPU to do the work. You'll probably get jerky video from dropped frames because the (non-GPU) hardware isn't fast enough. I get jerky video playing (low resolution) movies with programs like smplayer but they're OK in omxplayer which uses the GPU. The Pi isn't that fast, video is very demanding, putting all those pixels on the screen and having to redo it 25 times a second or more. The GPU is made for doing that.

From the VideoCore PDF in the intro section there's some hornblowing:
- 25M rendered triangles/s.
- 1G pixels/s with single bilinear texturing, simple shading, 4x multisampling.
- Supports 16x coverage mask antialiasing for 2D rendering at full pixel rate.
- 720p standard resolution with 4x multisampling.
- Supports 16-bit HDR rendering.
- Fully supports OpenGL-ES 1.1/2.0 and OpenVG 1.1.

See https://docs.broadcom.com/docs-and-down ... G100-R.pdf

Look at Bitcoin (and similar) mining, it's not at all feasible with CPUs. You really want an ASIC but some people do it on monster PCs with several video cards each because even in the i386/586 world video cards (GPUs) are much faster for the limited things they can do. The reason some diehards use GPUs instead of ASICs is versatility, you can load different software for the different algorithms: bitcoin, litecoin, etc., you just use different software. ASICs are hardwired to a certain algorithm.

The GPU boots the Pi, then hands control to the lesser CPU. They share some memory but communication between them is cumbersome. Yet X runs on the CPU, and then has to send some instructions to the GPU. It's technology from 1985, before there were GPUs, but it's also more universal, runs on more different types of hardware.

The assembly language for the GPU is probably worth learning https://github.com/maazl/vc4asm but it will only work on Broadcom hardware.

Return to “General discussion”