Giter Club home page Giter Club logo

Comments (5)

complexlogic avatar complexlogic commented on May 23, 2024

Thanks for the report. It is my understanding that Ubuntu 21.04 defaults to Wayland session, except for systems with NVIDIA graphics. Could you confirm that your GNOME desktop is running via Wayland?

from flex-launcher.

iainsaxonhome avatar iainsaxonhome commented on May 23, 2024

According to the Settings app -> About it is Wayland and I'm seeing lots of Wayland references in the /usr/share and htop.

Although I'm running an Nvidia GPU on the host system the guest probably isn't aware of this as I haven't altered any video settings yet.

from flex-launcher.

complexlogic avatar complexlogic commented on May 23, 2024

OK. I was able to reproduce your issue. The root of the problem is that SDL still tries to use X11 by default for Linux. If the Wayland compositor has an XWayland connection available, SDL will try to use that instead of native Wayland. In regard to the window focus issue, I'm guessing there is some bug with GNOME/Mutter's XWayland implementation. You can use the environment variable SDL_VIDEODRIVER=wayland to force SDL to choose native Wayland over XWayland. Here is a desktop file that you can use for autostart:

[Desktop Entry]
Version=1.5
Type=Application
Name=Flex Launcher
GenericName=Application Launcher
Comment=Customizable HTPC Application Launcher
TryExec=flex-launcher
Exec=env SDL_VIDEODRIVER=wayland flex-launcher
Icon=flex-launcher
Categories=Video;AudioVideo;

Setting that fixes the focus issue for me.

However, running Flex Launcher in Wayland, you will likely encounter a different bug. When launching a program, you get stuck in an infinite loop where the program restarts immediately after you exit it. I believe this is due to a bug in SDL's Wayland implementation. It seems that SDL is sending erroneous repeat key presses, which causes the loop. I can add a workaround to ignore the repeated keypresses in the launcher, but I was hoping to report this to the SDL devs first to get it fixed at the source.

I think the best option for the time being is just to run Xorg, unless you really need Wayland for some reason. In my opinion, Wayland in it's current state provides little benefit for a simple device such as an HTPC. You can switch to Xorg by opening the file at /etc/gdm/custom.conf and uncommenting the line

WaylandEnable=false

from flex-launcher.

iainsaxonhome avatar iainsaxonhome commented on May 23, 2024

Thank you very much :) . I'll try this as soon as I get a chance!

from flex-launcher.

iainsaxonhome avatar iainsaxonhome commented on May 23, 2024

Sorry for the delay. Using Xorg worked and resolved the issue :) .

Closing issue ;) .

from flex-launcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.