Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 1 | These instructions assume some familiarity with git and building and |
| 2 | running experimental software. And be prepared that this project |
| 3 | isn't at all useful right now, it's still very much a prototype. When |
| 4 | the instructions suggest to clone a git repo, you can of course just |
| 5 | add a remote and fetch instead, if you have a clone of that repo |
| 6 | around already. I usually install all software I'm working on into |
| 7 | $HOME/install, so that's what I'll use in the instructions below, but |
| 8 | you can use your favorite directory of course or install over your |
| 9 | system copy (pass --prefix=/usr --sysconfdir=/etc, generally). |
Kristian Høgsberg | 61ba898 | 2008-11-05 10:37:20 -0500 | [diff] [blame] | 10 | |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 11 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 12 | Modesetting |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 13 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 14 | At this point, kernel modesetting is upstream for Intel, AMD and |
| 15 | nVidia chipsets. Most distributions ship with kernel modesetting |
| 16 | enabled by default and will work with Wayland out of the box. The |
| 17 | modesetting driver must also support the page flip ioctl, which only |
| 18 | the intel driver does at this point. |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 19 | |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 20 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 21 | Building mesa |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 22 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 23 | Wayland uses the mesa EGL stack, and all extensions required to run |
| 24 | EGL on KMS are now upstream on the master branch. The 7.9 release of |
| 25 | mesa will have all these extensions, but for now you'll need to build |
| 26 | mesa master: |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 27 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 28 | $ git clone git://anongit.freedesktop.org/mesa/mesa |
| 29 | $ cd mesa |
| 30 | $ ./configure --prefix=$HOME/install --enable-egl --enable-gles2 |
| 31 | $ make && make install |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 32 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 33 | If you're using an intel chipset, it's best to also pass |
| 34 | --disable-gallium to ./configure, since otherwise libEGL will try to |
| 35 | load the gallium sw rasterizer before loading the Intel DRI driver. |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 36 | |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 37 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 38 | libxkbcommon |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 39 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 40 | Wayland needs libxkbcommon for translating evdev keycodes to keysyms. |
| 41 | There's a couple of repos around, and we're trying to consolidate the |
| 42 | development, but for wayland you'll need the repo from my get |
| 43 | repository. For this you'll need development packages for xproto, |
| 44 | kbproto and libX11. |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 45 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 46 | $ git clone git://people.freedesktop.org/~krh/libxkbcommon.git |
| 47 | $ cd libxkbcommon/ |
| 48 | $ ./autogen.sh --prefix=$HOME/install |
| 49 | $ make && make install |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 50 | |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 51 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 52 | cairo-gl |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 53 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 54 | The Waland clients render using cairo-gl, which is an experimental |
| 55 | cairo backend. It has been available since cairo 1.10. Unless your |
| 56 | distribution ships cairo with the gl backend enabled, you'll need to |
| 57 | compile your own version of cairo: |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 58 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 59 | $ git clone git://anongit.freedesktop.org/cairo |
| 60 | $ cd cairo |
| 61 | $ ./autogen.sh --prefix=$HOME/install --enable-gl |
| 62 | $ make && make install |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 63 | |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 64 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 65 | Wayland |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 66 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 67 | With mesa and libxkbcommon in place, we can checkout and build |
| 68 | Wayland. Aside from mesa, Wayland needs development packages for |
| 69 | gdk-pixbuf-2.0, libudev, libdrm, xcb-dri2, xcb-fixes (for X |
| 70 | compositor) cairo-gl, glib-2.0, gdk-2.0 (for poppler) and |
| 71 | poppler-glib: |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 72 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 73 | $ git clone git://people.freedesktop.org/~krh/wayland |
| 74 | $ aclocal; autoconf; ./configure --prefix=$HOME/install |
| 75 | $ make && make install |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 76 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 77 | Installing into a non-/usr prefix is fine, but the 70-wayland.rules |
| 78 | udev rule file has to be installed in /etc/udev/rules.d. Once |
| 79 | installed, either reboot or run |
Kristian Høgsberg | 33a52bd | 2008-11-03 15:31:30 -0500 | [diff] [blame] | 80 | |
Kristian Høgsberg | a46dc06 | 2010-09-14 11:25:55 -0400 | [diff] [blame^] | 81 | $ sudo udevadm trigger --subsystem-match=drm --subsystem-match=input |
| 82 | |
| 83 | to make udev label the devices wayland will use. |
| 84 | |
| 85 | If DISPLAY is set, the wayland compositor will run under X in a window |
| 86 | and take input from X. Otherwise it will run on the KMS framebuffer |
| 87 | and take input from evdev devices. Pick a background image that you |
| 88 | like and copy it to the Wayland source directory as background.jpg or |
| 89 | use the -b command line option: |
| 90 | |
| 91 | $ ./wayland-system-compositor -b my-image.jpg |
| 92 | |
| 93 | To run clients, switch to a different VT and run the client from |
| 94 | there. Or run it under X and start up the clients from a terminal |
| 95 | window. There are a few demo clients available, but they are all |
| 96 | pretty simple and mostly for testing specific features in the wayland |
| 97 | protocol: 'terminal' is a simple terminal emulator, not very compliant |
| 98 | at all, but works well enough for bash |
| 99 | |
| 100 | 'flower' moves a flower around the screen, testing the frame protocol |
| 101 | 'gears' glxgears, but for wayland, currently broken |
| 102 | 'image' loads the image files passed on the command line and shows them |
| 103 | |
| 104 | 'view' does the same for pdf files, but needs file URIs |
| 105 | (file:///path/to/pdf) |