kwin on the road to wayland martin gr aˇlin mgraesslin@kde ... · wayland as mobile technology...

35
Compositing after X KWin on the Road to Wayland Martin Gr¨ aßlin [email protected] Desktop Summit 2011 06.08.2011

Upload: others

Post on 08-May-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Compositing after X

KWin on the Road to Wayland

Martin Graß[email protected]

Desktop Summit 201106.08.2011

Page 2: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Project Plasma Active

A new activity based mobile user interface with Plasma and Nepomuk

Marco Martin, Fania JöckMon, 10:20 - 10:50Audimax

Activities - the helpful Big BrotherIvan Čukić Mon, 14:00 - 14:30Audimax

Plasma Active - Conquering the Device SpectrumSebastian Kügler Sun, 09:40 - 10:10Kinosaal

Compositing after X - KWin on the Road to Wayland

Martin Gräßlin Sat, 14:00 - 14:30Rm2002

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 2/25

Page 3: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Agenda

1 Architecture of X and Wayland

2 State of Wayland and X

3 Wayland in KDE Plasma

4 Timeline

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 3/25

Page 4: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Agenda

1 Architecture of X and Wayland

2 State of Wayland and X

3 Wayland in KDE Plasma

4 Timeline

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 4/25

Page 5: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Modern Composited X Architecture

X is just a Proxy

No direct communication

WM needs to fix X

No Input Redirection

Designed for non-Compositing

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 5/25

Page 6: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Modern Composited X Architecture

X is just a Proxy

No direct communication

WM needs to fix X

No Input Redirection

Designed for non-Compositing

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 5/25

Page 7: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Let’s Remove the Proxy

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 6/25

Page 8: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Wayland Architecture at a Glance

Wayland Server

Compositor and WindowManager

Runs on top of KMS

Handles all Input events

Renders usingOpenGL ES 2/EGL

Nested Compositors arepossible

Wayland Client

Uses Wayland EGL platform

Renders into a (GEM) buffer

Buffers are shared withServer

Damage events for changesbetween two buffers

Protocol to communicatewith Server

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 7/25

Page 9: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Agenda

1 Architecture of X and Wayland

2 State of Wayland and X

3 Wayland in KDE Plasma

4 Timeline

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 8/25

Page 10: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

The Current State of X

X is what we know

Most successful software in history

Extremely flexible through extensions

Major transitions are possible

Legacy functionality get’s removed

Non X related functionality moved toKernel

X has problems

Slow development

Missing Input Redirection

API is like time traveling

Strong limitations with Compositing

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 9/25

Page 11: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

The Current State of X

X is what we know

Most successful software in history

Extremely flexible through extensions

Major transitions are possible

Legacy functionality get’s removed

Non X related functionality moved toKernel

X has problems

Slow development

Missing Input Redirection

API is like time traveling

Strong limitations with Compositing

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 9/25

Page 12: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Current State of Wayland

Proof Of Concept

Mesa Code is there

Qt Lighthouse Port

GTK+ 3.0 (build disabled)

Clutter (out of date)

Demo Compositor

Demo Clients

Strong Support

MeeGo, Qt and Intel are heavily investing in Wayland!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 10/25

Page 13: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Current State of Wayland

Proof Of Concept

Mesa Code is there

Qt Lighthouse Port

GTK+ 3.0 (build disabled)

Clutter (out of date)

Demo Compositor

Demo Clients

Strong Support

MeeGo, Qt and Intel are heavily investing in Wayland!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 10/25

Page 14: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Will Wayland Succeed?

Where are the Obstacles?

Nobody used it

Possible Problems still unknown

Protocol not yet fully defined

No existing Window Manager

No real world Application

Many still not discussed issues

EWMH for Wayland?

Driver Support?

Missing “WaylandGL”

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 11/25

Page 15: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

X will Stay

We Need X

Wayland not yet ready to replace X

Wayland not supported on all hardware (cf. NVIDIA)

X11 Network Transparency is a valid use case

Legacy Software (e.g. Java) requires X11

Dropping X Support is not (yet) possible!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 12/25

Page 16: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Wayland as Mobile Technology

Conclusion so far

Makes sense on mobile

GLES hardware has better drivers

Regressions on feature side areacceptable

Getting rid of X very important

Saving resources high priority

Plasma Active is our primary Target for Wayland!

Don’t break the Desktop!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 13/25

Page 17: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Wayland as Mobile Technology

Conclusion so far

Makes sense on mobile

GLES hardware has better drivers

Regressions on feature side areacceptable

Getting rid of X very important

Saving resources high priority

Plasma Active is our primary Target for Wayland!

Don’t break the Desktop!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 13/25

Page 18: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Wayland as Mobile Technology

Conclusion so far

Makes sense on mobile

GLES hardware has better drivers

Regressions on feature side areacceptable

Getting rid of X very important

Saving resources high priority

Plasma Active is our primary Target for Wayland!

Don’t break the Desktop!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 13/25

Page 19: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Agenda

1 Architecture of X and Wayland

2 State of Wayland and X

3 Wayland in KDE Plasma

4 Timeline

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 14/25

Page 20: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Options on the Road to Wayland

Options to Evaluate

1 Ignore Wayland

2 Drop X support and concentrate on Wayland

3 Write new Wayland Compositor alongside KWin (X11)

4 Incrementally port KWin from X11 to Wayland

No manpower to support/develop two Window Managers!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 15/25

Page 21: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Options on the Road to Wayland

Options to Evaluate

1 Ignore Wayland

2 Drop X support and concentrate on Wayland

3 Write new Wayland Compositor alongside KWin (X11)

4 Incrementally port KWin from X11 to Wayland

No manpower to support/develop two Window Managers!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 15/25

Page 22: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Window Manager Backends

“KWin Lighthouse”

Identify Window Managmentindependent areas

Get Workspace and Toplevel X free

Add Window Manager Abstraction

Useable not only for Wayland

Android

WebOS

Microsoft Windows

. . .Image from http://commons.wikimedia.org/wiki/File:Leuchtturm Falshoft 1.jpg (CC BY-SA 3.0)

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 16/25

Page 23: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Window Manager Backends

“KWin Lighthouse”

Identify Window Managmentindependent areas

Get Workspace and Toplevel X free

Add Window Manager Abstraction

Useable not only for Wayland

Android

WebOS

Microsoft Windows

. . .Image from http://commons.wikimedia.org/wiki/File:Leuchtturm Falshoft 1.jpg (CC BY-SA 3.0)

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 16/25

Page 24: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Multiple Phases to Port to Wayland

Road to Wayland

1 Wayland under X

2 Wayland only

3 X under Wayland

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 17/25

Page 25: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Phase 1: Add Wayland Support

Developer Preview

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 18/25

Page 26: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Phase 2: Plasma Active

For our Mobile Offerings

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 19/25

Page 27: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Phase 3: Rootless X under Wayland

For Productive Usage

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 20/25

Page 28: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Agenda

1 Architecture of X and Wayland

2 State of Wayland and X

3 Wayland in KDE Plasma

4 Timeline

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 21/25

Page 29: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

We need Help

Timeline depends on You

KWin Team too small to succeed without help

Plasma needs adjustments

KDM needs adjustments

Software needs to be ported

Start now To Be Ready in Years

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 22/25

Page 30: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

We need Help

Timeline depends on You

KWin Team too small to succeed without help

Plasma needs adjustments

KDM needs adjustments

Software needs to be ported

Start now To Be Ready in Years

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 22/25

Page 31: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Timeline

Phase 1: Currently being developed

Branch kwin-wayland in kde-workspace

First Release expected in Winter 2012 Release

Phase 2: Development could start right now

Only for Plasma Active and Early Adopters

First Release expected for Summer 2012 Release

Phase 3: Can be started after Phase 1 & 2

Needs work in other areas first (e.g. rootless X-Server)

DON’T BREAK THE DESKTOP

It’s done when it’s done!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 23/25

Page 32: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Timeline

Phase 1: Currently being developed

Branch kwin-wayland in kde-workspace

First Release expected in Winter 2012 Release

Phase 2: Development could start right now

Only for Plasma Active and Early Adopters

First Release expected for Summer 2012 Release

Phase 3: Can be started after Phase 1 & 2

Needs work in other areas first (e.g. rootless X-Server)

DON’T BREAK THE DESKTOP

It’s done when it’s done!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 23/25

Page 33: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Timeline

Phase 1: Currently being developed

Branch kwin-wayland in kde-workspace

First Release expected in Winter 2012 Release

Phase 2: Development could start right now

Only for Plasma Active and Early Adopters

First Release expected for Summer 2012 Release

Phase 3: Can be started after Phase 1 & 2

Needs work in other areas first (e.g. rootless X-Server)

DON’T BREAK THE DESKTOP

It’s done when it’s done!

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 23/25

Page 34: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Plasma and Wayland BOF

Wednesday at 11:00 in 1.204

http://wiki.desktopsummit.org/Workshops & BoFs/2011/Plasma and Wayland

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 24/25

Page 35: KWin on the Road to Wayland Martin Gr aˇlin mgraesslin@kde ... · Wayland as Mobile Technology Conclusion so far Makes sense on mobile GLES hardware has better drivers Regressions

Questions?

http://community.kde.org/KWin/Wayland

Martin Graßlin — Compositing after X — Desktop Summit — Berlin — www.kde.org — 25/25