18.04 desktop - getting it working again



  • Note: The issues described below have been resolved: Unity8 can run on 18.04. (There are still issues to be resolved, but the following is now only of historical interests.)

    Background

    As mention recently Unity8 has two problem areas running on Ubuntu 18.04LTS.

    1. Mir-on-Mir doesn't work. This means that the configuration used previously of lightdm starting unity-system-compositor (to handle the "hardware") and Unity8 connecting to unity-system-compositor doesn't work.

    2. Client applications that use libmirclient cannot use EGL (only applications that use software rendering will work).

    Note that these are not Ubuntu specific, they are the same issues that prevent Unity8 running on other distros.

    I think the way ahead is:

    Don't use Mir-on-Mir

    With a bit of tweaking to Mir Unity8 will be able to run under the GNOME Display Manager [GDM]. The Mir team is aiming to have the necessary tweaks in place for the 18.04 release along with an example "Mir" desktop session.

    Until the Mir changes are available this approach can be "faked". Switch to a virtual terminal, log in and type the following:

    $ sudo chown -R $USER /dev/input
    $ QML_BAD_GUI_RENDER_LOOP=1 QT_QPA_PLATFORM=mirserver unity8
    

    (Thanks to @malditobastardo from the "UBports Unity8 Dev" group who volunteered to test this.)

    Applications should use Wayland to connect to Unity8

    For Qt it is necessary to install qtwayland5.

    This means changes to the environment variables set in the application environment. That means changes to any launchers (e.g. ubuntu-app-launch).

    From:

    GDK_BACKEND=mir
    QT_QPA_PLATFORM=ubuntumirclient
    SDL_VIDEODRIVER=mir
    

    To:

    GDK_BACKEND=wayland
    QT_QPA_PLATFORM=wayland
    SDL_VIDEODRIVER=wayland
    

    Once again this can be faked using miral-app-run <application> from the command line. (miral-app-run is in the mir-demos package.)

    There are still limitations to the Wayland support both in Mir and in the toolkits and the experience may not be perfect. In the release version of Mir Qt and SDL applications will work (with some issues) but GTK apps don't yet work as they require an unstable Wayland extension that Mir does not implement yet.

    This extension (xdg-shell-v6) has been enabled on Mir "master" but not yet released. My experience with GTK apps is that they are pretty good at working with this (although there are still some Mir issues to resolve). Some Qt based applications are problematic (They also behave badly on, e.g., Gnome shell if forced to use Wayland and not X11.)

    Please note

    All of this is "in development" so don't wreck your real machine by "just trying it": Use a Virtual Machine!!

    Things will not be "consumer ready" right away, there will be further improvements needed. This is just what is needed to get things running. (But, once these changes are in place, porting to other distros should just be a matter of compiling and packaging.)



  • @alan_g said in 18.04 desktop - getting it working again:

    With a bit of tweaking to Mir Unity8 will be able to run under the GNOME Display Manager [GDM]. The Mir team is aiming to have the necessary tweaks in place for the 18.04 release along with an example "Mir" desktop session.

    This "tweak" is taking longer that initially expected, so we've decided to release Mir 0.31 without this feature. This was motivated by the desire to ship only the new MirAL 2.0 API in 18.04LTS. The "tweak" will arrive soon, and be released in the next update.

    Also, I've caused confusion, so I'll explain the "tweak" in more detail:

    In the past, under logind, Unity8 has not accessed input or graphics directly, but used a privileged unity-system-compositor process to provide these through “Mir-on-Mir”. “Mir-on-Mir” is no longer supported because to do so would require additional distro patches to mesa, instead we've dropped the Mir-EGL patch entirely.

    The specific issue is that to access input as an unprivileged user shell (i.e. without unity-system-compositor) Unity8 needs to request permission from logind. That’s the Mir enhancement the Mir team is working on.

    I described this as “working with GDM” simply because that’s now the default on the desktop, not because GDM is a requirement. It should also work with lightdm.



  • The most recent edition of "This Week in Mir" reports:

    On mainline we’re landing some refactorings to simplify the Wayland input code, and the very first baby steps of logind support, which will make it easy to run Mir-based desktops from gdm.

    Is this the "tweak" that you mentioned?



  • @gizmochicken said in 18.04 desktop - getting it working again:

    Is this the "tweak" that you mentioned?

    Yes



  • Hey guys

    I'm constantly checking back here, to see if I can go for unity8 on my 18.04 machine yet.

    Could you please give me an update on if it's apt install unity8 and everything is running to try it out, our would it still need a lot of commandline-work?

    greetings
    Walter



  • @derwalter there is still work in progress. The logind work hasn't landed in Mir yet, so it isn't integrated in Unity8.

    @mariogrip reported last week that he got things work with Wayland.

    Bottom line: There's nothing to install yet.



  • @alan_g said in 18.04 desktop - getting it working again:

    @derwalter there is still work in progress. The logind work hasn't landed in Mir yet, so it isn't integrated in Unity8.

    Looks like this commit will provide logind support in Mir 0.32. True?



  • @gizmochicken No, that's just part of it. But the rest will be along soon. :)



  • Thanks for the quick reply!

    I ll stick around and wait till it works :)



  • yay, unity8 is installable again on 18.04
    https://github.com/ubports/unity8-desktop-install-tools

    after installing use the workarround from this thread or follow the opened issue at https://github.com/ubports/unity8-desktop-install-tools/issues/22

    xwayland doesn't work but @mariogrip and the mir people :) are making progress on it, i think. gtk3 apps sort of work, qt are rendered quite small for my eyes

    screencast unity8 on ubuntu 18.04
    https://www.youtube.com/watch?v=PITcJLo0A58

    it's recorded with a phone because mirscreencasting didn't work for me
    mirscreencast --stdout -m /run/mir_socket -s 1920 1080 --cap-interval 2 | ffmpeg -f rawvideo -pix_fmt bgra -s 1920x1080 -r 30 -i - -c:v libx264 -preset ultrafast -f matroska cast_full.mkv



  • Looks like the Mir team is making progress with the logind tweak.



  • After a few crashes, when opening Dolphin, which dropped me back to a not responding TTY and some reboots, I got it running!

    Thing is, I use a Lenovo Twist, which apparently doesn't have a recognized/working screen-rotation-detection and there is no manual way of rotating the screen like in unity7, which I am using right now. Unity7 is just not geared enough towards tablet-style-usage, but will have to do :)

    how does the actual development process of Unity8 go? (If there is a development process)
    How many people are contributing, what is being worked on, I would love to get some insights <3

    Greetings and good luck,
    I am staying connected :)



  • More progress has been reported. See "This week in Mir (25th May, 2018)" for details.



  • @gizmochicken Ivan is brilliant, that's for sure, and he's only 15 years old :D



  • Mir 0.32 release candidate discussed here. Note the logind support is nearly complete.



  • @gizmochicken said in 18.04 desktop - getting it working again:

    Mir 0.32 release candidate discussed here. Note the logind support is nearly complete.

    The Mir 0.32 release candidate including the logind support is now working fine on 18.04.

    Although there is currently a problem (seen on 16.04) that's blocking the release it should have no impact on Unity8.

    For the adventurous it would be reasonable to take Ubuntu 18.04 and...

    1. install the Mir from the Release Candidate PPA and Unity8 from UBports;
    2. recompile and install QtMir locally; and,
    3. try logging into a Unity8 desktop session.

    (Detailed instructions intentionally omitted to avoid tempting those that don't understand the risks.)



  • For the adventurous it would be reasonable to take Ubuntu 18.04 and...

    1. install the Mir from the Release Candidate PPA and Unity8 from UBports;
    2. recompile and install QtMir locally; and,
    3. try logging into a Unity8 desktop session.

    Reportedly, the UBports repo has been updated, and Unity8 can again be installed using the instructions found here.

    Unity8 on 18.04 is discussed in Ubuntu Touch Q&A 31 starting at about 61m49s.



  • Any chances to get unity8 desktop image for installation?



  • @lexswed said in 18.04 desktop - getting it working again:

    Any chances to get unity8 desktop image for installation?

    Once Unity8 is working well enough, that's a likely goal. But, as there are currently very few active developers, this might take a year or two.



  • After installing Unity8 using the instructions found here, I was able to log into Unity8 from either GDM or LightDM.

    I upgraded from Mir 0.32 to Mir 0.32.1 RC4 via ppa:mir-team/rc, and now, I can no longer log into Unity8 from either GDM or LightDM. What’s more, when I merely attempt to log into Unity8 with Mir 0.32.1 RC4 installed, I must reboot my system before I am again able to log into GNOME or Unity7.

    @mariogrip and/or @alan_g: Is Unity8 currently installing a modified version of Mir 0.32 rather than upstream Mir 0.32?

    If Unity8 is installing a modified version of Mir 0.32, then I would expect Mir 0.32.1 RCs likely not to work, and I’ll stop attempting to test the Mir 0.32.1 RCs for now.

    @alan_g: If Unity8 is installing upstream Mir 0.32, shouldn’t the Mir 0.32.1 RCs from ppa:mir-team/rc be expected to work with Unity8? Or am I missing a step?



  • @gizmochicken said in 18.04 desktop - getting it working again:

    @alan_g: If Unity8 is installing upstream Mir 0.32, shouldn’t the Mir 0.32.1 RCs from ppa:mir-team/rc be expected to work with Unity8? Or am I missing a step?

    I would expect 0.32.1 to be a "drop in" replacement for 0.32.0. (It works that way for egmde.)

    We need to understand what is happening, could you leave a message on the 0.32.1 PR? Preferably with informative log messages?

    Thanks


Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.