Running Wayland apps on edge?

  • Thank you all for your reply :).

    phablet@ubuntu-phablet:~$ echo $XDG_RUNTIME_DIR
    phablet@ubuntu-phablet:~$ ls /run/user/32011/
    confined      mir_socket
    dbus-session  mir_socket_trusted
    dconf         pulse     
    keyring       signond             wayland-0
    libertine     upstart             wayland-0.lock

    $WAYLAND_DISPLAY - I don't thinks it is set at all but maybe I am looking wrong.

    I've also tried to make the app unconfined and there is no difference in the error at all. (unconfined click with some binaries with it - I've built it from the zub's source, it is hosted on my server, but you should never trust random packages like that so this is only for those very adventurous)

  • @zubozrout said in Running Wayland apps on edge?:

    $WAYLAND_DISPLAY - I don't thinks it is set at all but maybe I am looking wrong.

    That's fine - it overrides the default of wayland-0.

    If you've dropped any confinement then the next question is:

    What are the permissions on $XDG_RUNTIME_DIR/wayland-0?

  • @alan_g Seems ok to me:

    phablet@ubuntu-phablet:~$ ls -al $XDG_RUNTIME_DIR/wayland-0
    srwxrwxr-x 1 phablet phablet 0 srp 14 17:01 /run/user/32011/wayland

  • If you set WAYLAND_DEBUG=client when starting your app, the libwayland library will write what's happening (if anything) to the console log. There may be clues there.

  • I've tried this but it doesn't seem to be the way to go (It doesn't tell me more info):
    WAYLAND_DEBUG=client ubuntu-app-launch zub.sdldemo_SDLDemo_0.2

    And running just this doesn't tell me much more but I'd expect there would be something missing for the app to run without ubuntu-app-launch:

    phablet@ubuntu-phablet:~$ WAYLAND_DEBUG=client /opt/ 
    terminate called after throwing an instance of 'SDL2pp::Exception'
      what():  SDL_Init failed: No available video device

  • @zubozrout said in Running Wayland apps on edge?:

    I've also tried to make the app unconfined and there is no difference in the error at all.

    You did change the version number when doing this, yes? Or completely removed the old version first? Otherwise it will still have the old profile from the previous install.

  • @dobey Ha, good point. I'll try that when I can - and thank you very much for the info :).

  • Ok, I am getting the same error even if I remove and install the app again or compile it with a higher version number.

  • Is SDL_VIDEODRIVER=wayland? Or mir?

  • @zubozrout Are your changes in a branch of git, which I could compile locally for x86?

  • @dobey This one should be it:

    To build it it should hopefully be enough to follow these instructions:

  • Administrators

    If this is an android device, wayland currently will not work on stock edge, as some changes to the android graphic plugin is needed for wayland to work.


    I have setup an experimental branch that you can try:

    sudo ubports-qa install xenial_-_edge_-_wayland

    but yeah, this is highly experimental :upside_down_face:

    Please note that the "startup screen might just be black, but unity8 should come up after some time"

    To start any applications you need to set:

    export EGL_PLATFORM=wayland

  • It seems like this is a bit more difficult on MX4 (no space left in the respective filesystem) - but with a bit of persuading I was able to get the update installed following these steps:

    1. sudo ubports-qa install xenial_-_edge_-_wayland (finished with error)
    2. apt -o Dir::Cache::Archives=/home/phablet/Downloads full-upgrade (processing the updates using Downloads folder to save the packages to prior installing)

    With the above modifications I can confirm the screen being black on startup :).
    Unfortunately though I am still getting what(): SDL_Init failed: No available video device. And this could be an issue with my Wayland modifications in the code - which now seems more probable.

  • If you build your app on a PC with your build of SDL, does it work under wayland/weston? That's probably a good place to start debugging.

    Once that's working, if you have a 16.04 VM set up with unity8 installed, I would build an x86 version of the click, install it in the VM, and see what works.

    Once both of those are working, it should also work on phones/tablets, once the remaining bits to get wayland clients working there are done.

Log in to reply