Wayland in Plasma 5.7

Last week we released the beta version of Plasma 5.7 which means we know what this release will have for better Wayland support. First of all I need to mention what didn’t make it: unfortunately I missed the freeze of Frameworks 5.23 to land support for xdg-shell. I have a working implementation, but was not yet satisfied with the API. This is a difficult interface to provide an API for due to the unstable nature of the interface. Due to lack of xdg-shell support GTK applications are still going to use X11 on Wayland (like the Firefox window I’m just typing this blog post in).

In the past I already blogged about a few new features in 5.7 like the improved task manager for Wayland, the virtual keyboard support, sub-surface support and improved input device support. So in this blog post I want to focus on a different topic: quality.

For Plasma 5.7 my aim was to get the Plasma session into a state that I can use it as my primary system. And since last week I have not started into an X11 session any more. This means that we needed to get the whole system stable enough to have neither KWin nor applications crash due to Wayland. Given that our Wayland code is quite a fair amount of new code, changing lots of assumptions there are of course bugs to be expected. We still have code which calls into X11 unconditionally, we have things which are not implemented correctly and of course we do stupid mistakes. So for Plasma 5.7 the task was to find these issues and fix one for one.

For Wayland it’s much easier for us to test. KWayland – our framework for Wayland support – is developed in a test driven approach making it possible to create test cases for every problem. They expose the problems and verify that they are fixed and as regression tests ensure that they won’t hit us again. Over the last release cycle we added several thousand lines of test code in KWayland alone.

Finding those issues is not always easy. If KWin crashes we don’t have DrKonqi like normally, it doesn’t work for Wayland (tries to connect to a display server, but that just crashed). What I saw on my Wayland test device was that KWin sometimes randomly crashed – more often when I interacted with X11 windows. But when attaching gdb to KWin it didn’t crash. But once I caught it: it turned out to be an error in KWin in the handling of Xwayland windows. There are two possible code paths it can take and one was with a mistake. Due to running through a debugger it was more likely to take the correct one. So yeah it’s not always easy.

With that problem gone we were able to find a few more and fix also some bugs which caused windows to quit. Unfortunately some of this fixes had to go into KWayland after the 5.23 release. This means the frameworks version used with Plasma 5.7 is not going to have all fixes. If you want to give Plasma/Wayland a try I recommend to not just wait for Plasma 5.7 but also for frameworks 5.24.

This week I will be at the openSUSE conference in Nuremberg, where I will also give a talk about how Wayland helps us to improve our quality and our workflows. I’ll do another blog post about the content of that presentation – don’t want to spoil 😉 Though if you follow our development you are already aware of it. Thanks to openSUSE to give me the possibility to present at the conference and thanks to KDE e.V. for the support to go there.

I can hear you asking now the question of all questions: “When will it be ready?” I think that I am not objective enough to answer the question or to say that it is ready. I’m too close to the code and might just omit important problems because I don’t see them. Thus I cannot say that it is ready. It depends on your workflow and whether that workflow is already fully implemented. This is something only you can know.

Last week KDE had a very important developer sprint (where I did not participate) and is currently running a fundraising campaign for this sprint. We need the money to send our developers to such meetings or to a conference like openSUSE conf where I will be this week. At the moment just 107 people have participated and donated. This is something which makes me sad. I see the statistics for my blog posts and know that this one will have at least 1000 direct hits. In addition there are people reading planetkde and not directly my blog. We are trying to raise 24000 EUR and please do the math yourself to see how close we would be to it if everybody would donate just 10 EUR.

38 Replies to “Wayland in Plasma 5.7”

  1. >Due to lack of xdg-shell support GTK applications are still going to use X11 on Wayland

    Are they planning to implement it? I’m asking because I am aware of one other XDG standard that GTK does not implement, but instead chooses to roll its own functionally equivalent but incompatible version thereof, namely the standard for bookmarked places in the file open dialogue (which is why you don’t see your KDE-set places in GTK applications)

    1. I think your interpretation is wrong. From my understanding, Martin means that kwin doesn’t support xdg-shell yet, and Gtk app doesn’t use wayland if compositor misses xdg-shell support.

  2. First of all thank you for your great work on Kwin, and yes you are right about the lack of enthusiasm of our community to support fundraising campaigns. You shook me my conscience, so i made my donation!

    1. I’ve donated to KDE e.V. via bank transfer instead, although it took some googling to find out how to do that (i.e. it was not obvious from the fundraiser page how to avoid paypal).

  3. “It depends on your workflow and whether that workflow is already fully implemented.”
    For a lot of people it also depends on how long it will take for NVIDIA developers to cooperate with the Wayland ones…

    1. Maybe it is just easier to buy Intel processor with GPU or AMD graphics card (+open source drivers) if someone wants to use Wayland?
      Nvidia for KWin/X11 session – ok, but if someone wants to use KWin/Wayland why bother with Nvidia properietary drivers?

      1. Nvidia just doesn’t bother about Gnu/Linux desktop. They create properietary drivers only because they must for supercomputers, HPC etc
        Why let them sabotaging Gnu/Linux desktop community?

    1. They should all work as X11 applications. Firefox I’m using right now, the other examples I’m not using, so I cannot give a guarantee.

  4. Thanks for your great job! KDE becomes more stable and functional with every release. You’re doing great! But I wonder what hardware do you use? Wayland session with latest open-source ATI driver still seems completely unusable to me. Triggered desktop grid effect – lockup, changed compositor backend – lockup, maximized window – oh god it’s just glitch.. wait, no, it’s lockup. In most cases it’s not “true” lockup, just Wayland hangs and prevents from switching ttys, but couple of times my system has stucked completely (last one when switching compositor from 3.1 to 2.0). So I given up after 5-6 attempts. I’d like to provide you some debug information if you tell me exactly how to collect it. Thanks anyway!

    1. changed compositor backend

      Well that’s not supported. Yes we still have things in the config ui exposed, which don’t work.

      Overall I suggest to be very careful with the system. Don’t change too much. Don’t expect things to work. Things like the DesktopGrid lockup is something I also hit, last week but just did not get to investigate yet. It’s just like things need to be tested and if a bug is hit, we need to be aware of it. So a bug report with steps to reporduce would be best.

  5. “What I saw on my Wayland test device was that KWin sometimes randomly crashed – more often when I interacted with X11 windows. But when attaching gdb to KWin it didn’t crash.”

    I think you can use coredump for this situation. And thanks for your work.
    PS on Intel Haswell and latest Mesa,libdrm and kernel I can’t run kwayland. He freezes after start. 🙁

    1. That’s what I hoped as well, but coredumpctl never caught my KWin crash. But all the other applications which crashed due to KWin crashing.

      1. I think you need to enlarge your size limit for coredumpctl. On my system it usually only remember 4 of them. If all other applications are crashed, journald might rotate already.

        1. good point, though I had seen also older items in it. But yeah, it’s a good idea and something easy to try. Thank

    1. The expensive part is getting people to the sprint. If you send someone from India or Brazil to Europe it doesn’t really matter whether it’s in Switzerland or Germany.

  6. I didn’t realize about the campaign, just donated 50EUR now. Great job guys! Waiting badly for tearing free video!

  7. I donated a small amount to Randa as well because I love to read your progress on kde plasma wayland stuff (I can’t give more as I now will have to pay off a debt for years because I tried to help a psychiatric friend).

    A bit worried about nvidia proprietary drivers if they’ll keep heading in the wrong direction regarding wayland. Will nvidia steer around or will open source nouveau get the same performance quality as the proprietary drivers? I wonder what will come sooner. I tried to read the wayland mailing list on this subject but I’m not smart enough to understand it.

    1. Thanks for the donation and yeah I’m also worried about the NVIDIA situation and currently just watch what will happen.

  8. Hi Martin,

    Couldnt find your e-mail so I just post it here and hope you read it.
    Running firefox in KDE Neon I got this message when visiting your blog:
    Your connection is not secure

    The owner of blog.martin-graesslin.com has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.

    Learn more…

    Report errors like this to help Mozilla identify misconfigured sites

    blog.martin-graesslin.com uses an invalid security certificate.

    The certificate is not trusted because the issuer certificate is unknown.
    The server might not be sending the appropriate intermediate certificates.
    An additional root certificate may need to be imported.


    1. The blog is using letsencrypt according to its cert details, its possible your browser has not yet been updated with the root cert for LE yet. I see a perfectly good ssl conection on all my browsers.

      1. For a few hours two weeks ago the cert was invalid. I missed the expiration notification.

Comments are closed.