Wayland partially working outside of X with a frame buffer (on nvidia)

Darxus at chaosreigns.com Darxus at chaosreigns.com
Sun Nov 21 20:37:45 PST 2010


"The Linux framebuffer is a graphic hardware-independent abstraction layer
to show graphics on a console without relying on system-specific libraries
such as SVGALib or the heavy overhead of the X Window System." -
https://wiki.ubuntu.com/FrameBuffer

I hope uv doesn't get too mad at me for posting this.  It's not done.  It's
broken.  But I ran the wayland compositor outside of X on my nvidia card
with nouveau, on nouveaufb.  With mouse and keyboard input even working.
He was using it with uvesafb.  No DRI / mesa required.  And, well,
I'm excited about that enough that I feel a need to share.

It sucked up over 8 gigabytes of virtual ram, on my machine with 8 gigs of
ram.  The only client I got to work was terminal.  Backgrounds didn't work.

Apply this patch to wayland:
http://www.iarc.org/~4z5uv/wayland-fb-2.diff

Copy this into the compositor directory:
http://www.iarc.org/~4z5uv/compositor-fb.c

I also needed to comment out three lines in compositor/compositor.c:

        else {
                //ec = drm_compositor_create(display, option_connector);
                //if (ec == NULL) {
                        ec = fb_compositor_create(display);
                //}
        }

Because it was selecting the DRM compositor (which doesn't work on nvidia).

Then build.

The most problematic part by far was figuring out that it only supports 16
bits per pixel.  If you have it at 32bpp, it breaks video output before
printing that error.

What I eventually did to get nouveaufb into 16bpp was:
GRUB_CMDLINE_LINUX_DEFAULT="video=DVI-I-1:1600x1200-16 at 75"
in /etc/default/grub, and then run update-grub

nouveaufb was set up under ubuntu by default after I disabled the
proprietary driver.

Unfortunately DVI-I-1 probably isn't going to be right for a lot of people.

To run wayland and the terminal client at the same time:

(sudo compositor/compositor &);sleep 1;clients/terminal &

Yeah I actually ran the compositor as root instead of figuring out what was
up with the permissions problems.

Using a background is broken too.  Using a jpeg doesn't seem to work.  I
noticed something about pngs in the patch, so I tried that.  It loaded the
background but then crashed.

-- 
"For every complex problem, there is a solution that is simple, neat,
and wrong." - H. L. Mencken
http://www.ChaosReigns.com


More information about the wayland-devel mailing list