First off, while the state of Linux laptop GPU switching is currently poor for those newer notebooks with dual GPUs, Wayland will have the capability of switching between GPUs for rendering. This is a feature currently lacking by the current xorg-server for notebooks, desktops, and all devices. When it comes to Wayland and GPU hot-swapping, Jerome Glisse mentioned:
Outcome of discussion between Dave, Kristian, Jesse and me while riding a bus is that we should add a way for wayland to ask its client to redraw their surface using a another EGL driver and that wayland server should be able to handle client reporting failure doing so. Maybe i did get this wrong, feel free to correct me :)
I think to cover all use case Dave presented we should have somethings like this:
- wayland provide a list of EGL driver it can texture from (optimus case where we can migrate texture from nvidia to intel)
- wayland can ask to it's client to switch GL driver and report if they can switch or not (i think this should happen in 2 step first ask and gather answer from all client if one client says it can't then forbid the switch, otherwise ask to all client to redraw with new driver)
All this wouldn't need restart from wayland.
So Wayland ultimately will be able to switch between GPUs and drivers without requiring a restart of the display server.
The other feature brought up is concerning full-screen applications on Wayland and how that will be handled in an attempt to make this display server better for handling games than an X.Org Server. As said by Kristian Høgsberg:
Nope, you're spot on and I agree. Carsten Haitzler recently posted a good writeup on the good and bad things games do under X:
and at the end of the email he's proposing something similar to what you describe. I even think we shouldn't expose the full modesetting API to regular applications, just enough that they know the screen sizes and layout. Either the compositor can run a special client with access to the modesetting interface or changing the resolution and/or screen layout could just be part of the compositor.
Either way, a native resolution fullscreen mode is definitely planned. Both scaling (with or without aspect ratio/black bars) and native modes (we can page flip directly to the applications buffer) make sense, but I think that will be policy/configuration options in the compositor. What will be in the protocol will be a way to request to be fullscreen, which the compositor will honor when the application has focus, but it will always be possible to alt-tab away (or press the "home button" or similar). So the compositor is in control, it will change the resolution, scale and draw black bars, or maybe even just center the application window and fade out the rest of the desktop around it.
This also ties in with capturing the mouse pointer and relative events (which Carsten also talks about in his mail). Typically games also want to make sure the pointer stays inside the window and they want relative events. It's no good if you're trying to turn around in quake and the pointer leaves the window or hits the screen edge. X applications solve this by grabbing the mouse, confining it to the window and continuously warping the cursor into the center to simulate relative events. This is obviously a hack, and wayland isn't going to support open-ended pointer or keyboard grabs, nor warping the pointer. Instead, we provide relative events when the device generates them, and in fullscreen mode, all the events go to the fullscreen application, so no need to confine the pointer. Possibly, an application can request "application pointer", where the compositor hides the pointer when the fullscreen application receives focus, doesn't update its location and only sends relative events. This is a pointer mode that may be useful to allow when an application has a button grab as well (that is, grabbing the pointer for the duration of a button click).
Anyway, this is all kinda half-baked, but it is the general direction I see this going.
This is all good news for gamers when hopefully running Wayland within a few years time and also for other applications like Wine.