Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big issue with the game window #170

Open
gumbucc opened this issue Dec 27, 2023 · 12 comments
Open

Big issue with the game window #170

gumbucc opened this issue Dec 27, 2023 · 12 comments

Comments

@gumbucc
Copy link

gumbucc commented Dec 27, 2023

I've been having a few major issues, which are likely flatpak-only (Nobody's able to help me in the Dolphin forums, and I can't install anything besides the flatpak on my system).

The main issue is that when I click off the main game render window the game essentially softlocks: Even if I click on the window again ("regain focus"), it's still unresponsive, pressing my buttons doesn't do anything, the game is essentially softlocked. It doesn't crash, it's just impossible to control. There are two ways to circumvent this. The first way is to turn off "Hotkeys require window focus" in the settings, then map a hotkey to "fullscreen". Then, if I click off of the window, I can just press that hotkey, and the focus regains for some reason. The fullscreen button in the menus doesn't work, only the hotkey.

The other way is to turn on "render to main window", which makes it so the game window and the main window are one and the same, which gets rid of the issue. But another issue crops up: when I enter fullscreen and then exit fullscreen while that setting is turned on, the separate game window that was supposed to be turned off reappears, and then Dolphin crashes, so that "solution" doesn't really work.

As said, I'm pretty sure this is a flatpak-only problem, but I'm not sure. When I posted this issue to the Dolphin Forums, literally nobody responded, and I can't find anyone else experiencing this issue on the main site. My leading theory is that is has something to do with Flatpak permissions, I'm not sure. It could also be an issue with the window manager.

If you're wondering, I'm running Linux Mint 21.2, 4GB of RAM, with a Intel© Core™ i5-5250U CPU. Nothing much else to say.

@cpba
Copy link
Collaborator

cpba commented Dec 27, 2023

This looks like the same issue as #168 that was reported a few months back.

I was unable to reproduce it then, and I haven't been able to reproduce it now either even though your instructions are much better.

My leading theory is that is has something to do with Flatpak permissions, I'm not sure.

The flatpak ships with --device=all, this should give you access to all input devices, but I've seen cases where people have accidentally overwritten this with flatseal of similar, it might be worth a look.

It could also be an issue with the window manager.

Do you use some esoteric window manager?

Other than that:

  • Is there something that might be stealing focus away from your window?
  • Have you tried earlier releases of this flatpak? Does it work the same in all of them?
  • Does this only happen with keyboard, or is it the same when using real wii remotes? Other game controllers?

@gumbucc
Copy link
Author

gumbucc commented Jan 5, 2024

Sorry for the late reply.

I'm on Cinnamon, which uses Muffin as it's window manager. I have never screw'd with Flatpak permissions, so if what your saying is true, then that must not be the reason. I also don't have a Wii Remote or physical controller at all besides my keyboard.

I'm pretty sure that this issue started maybe... half a year ago, or so. From what I've found, the only way to revert a Flatpak is to dig through a bunch of commits, and I'm not even sure when it started happening. I remember I updated Dolphin one day, played games normally for a day or so, then I tabbed out of a game (for the first time since I had updated if I remember) and I lost a ton of progress in a game. Then I asked around in the Dolphin forums and all I got was silence, so I uninstalled Dolphin because of my losses. Now, 6 months later (or so), I remembered this issue and assumed it got fix since it seemed like a pretty major issue, so I reinstalled Dolphin. Bug still exists, obviously.

The weirdest thing was that I'm pretty sure it wasn't a major update that broke it. The release number didn't change, I'm pretty sure it was a minor bug-fix update. Don't quote me on that, but I pretty sure it's true.

I still think it might be the window manager might be the culprit. Muffin, my window manager, is only used on Linux Mint, which isn't a super popular distro or anything, so I could see how this bug flew under the radar. The person who reported this bug before me didn't say what their distro was, did they?

Have you tried testing the Flatpak on a Linux Mint virtual machine? Maybe you could also test if the non-flatpak version works fine? I can't test to see if the issue occurs on other distros since my device isn't powerful enough to run VMs, and I can't build from source either. Do you recommend I file a bug report in the main Dolphin bug tracker? If so, I apologize for the hassle.

@cpba
Copy link
Collaborator

cpba commented Jan 8, 2024

I'm pretty sure that this issue started maybe... half a year ago, or so. From what I've found, the only way to revert a Flatpak is to dig through a bunch of commits, and I'm not even sure when it started happening. I remember I updated Dolphin one day, played games normally for a day or so, then I tabbed out of a game (for the first time since I had updated if I remember) and I lost a ton of progress in a game. Then I asked around in the Dolphin forums and all I got was silence, so I uninstalled Dolphin because of my losses. Now, 6 months later (or so), I remembered this issue and assumed it got fix since it seemed like a pretty major issue, so I reinstalled Dolphin. Bug still exists, obviously.

The weirdest thing was that I'm pretty sure it wasn't a major update that broke it. The release number didn't change, I'm pretty sure it was a minor bug-fix update. Don't quote me on that, but I pretty sure it's true.

If so, you will want to install https://flathub.org/apps/io.github.flattool.Warehouse which will make the downgrading process very easy, just look for dolphin-emu, click on the three dots and then downgrade. The runtime updates from august might be a good starting point.

Make sure to report back afterwards, figuring out which minor thing caused the issue would help a lot in fixing it (at least we could prepare a workaround).

I still think it might be the window manager might be the culprit. Muffin, my window manager, is only used on Linux Mint, which isn't a super popular distro or anything, so I could see how this bug flew under the radar.

To be honest it's my first time learning about a window manager called muffin, but I googled it a bit and it looks like it's a fork of an old gnome release. Could you switch it to regular gnome and see if that changes anything? It'd at least rule out your window manager.

Have you tried testing the Flatpak on a Linux Mint virtual machine? Maybe you could also test if the non-flatpak version works fine? I can't test to see if the issue occurs on other distros since my device isn't powerful enough to run VMs, and I can't build from source either.

No, I haven't. I'm not sure that'd even work since running the games requires hardware acceleration, I have never tried to set up a vm that way.

Do you recommend I file a bug report in the main Dolphin bug tracker? If so, I apologize for the hassle.

You should only report there if you can reproduce the issue after building the emulator from source, otherwise you're very unlikely to be taken seriously.

On that note, why are you not able to build from source?

@gumbucc
Copy link
Author

gumbucc commented Jan 10, 2024

Hey again. I installed Dolphin from source (I specifically installed it as a portable application, but that shouldn't matter). The reason I didn't do it before was because around a month ago, I tried installing from source, and it didn't work no matter what I did.

I tried building it again today, and it ended up installing without a hitch. I can confirm that the bug does not occur in the built version for me. It works perfectly fine. Through some testing, I've discovered that the issue on the flatpak (likely) comes from the version of Qt it uses.

You see, after fiddling around with that "Warehouse" program, I found that the issue started occurring after this update which updated dolphin from Qt5 to Qt6, or more specifically Qt 6.4. Currently, the Flatpak version of Dolphin uses Qt 6.6.0

But when building from source, Dolphin takes the newest version of Qt that is in the repositories, which for me is Qt 6.2.4. This is because Linux Mint is based on the latest LTS release of Ubuntu, current 22.04, so, of course, some packages are bound to be older than on rolling distros or on Flatpak. Newer versions of Ubuntu probably use a newer version of Qt.

To recap:
My system, and my source-built version of Dolphin run Qt 6.2.4
The Dolphin Flatpak currently runs Qt 6.6.0
The issue first started occurring for me when the Dolphin Flatpak updated from Qt 5.15 to Qt 6.4

With that all in mind, this is my hypothesis as to why this issue is happening on Flatpak:
(please take this all with a grain of salt, I'm not an expert on Flatpaks or Linux in general)

I think that since Linux Mint, the Cinnamon Desktop Enviorment, and the Muffin Window manager are made with the Ubuntu 22.04 repo in mind, which uses Qt 6.2.4, they aren't exactly equipped to handle newer versions of Qt. Because of this, when newer versions are run, they have issues, and the update to Qt 6.4 on the Flatpak created a lot of issues, a lot of them having to do with the UI. There is also a well-known issue with Dolphin that occurs on Qt 6.3+ listed here. I don't experience it, but it seems pretty similar to my issue.

Of course, I'm no Flatpak expert, so maybe my theory doesn't make sense with how Flatpaks work. I'm not really sure. Maybe Qt has nothing to do with this. All I know is that built-from-source Dolphin works fine, and the Flatpak version doesn't. Hope this helps. Also, what distro and DE do you use?

@cpba
Copy link
Collaborator

cpba commented Jan 11, 2024

Hey again. I installed Dolphin from source (I specifically installed it as a portable application, but that shouldn't matter). The reason I didn't do it before was because around a month ago, I tried installing from source, and it didn't work no matter what I did.

I tried building it again today, and it ended up installing without a hitch. I can confirm that the bug does not occur in the built version for me. It works perfectly fine. Through some testing, I've discovered that the issue on the flatpak (likely) comes from the version of Qt it uses.

You see, after fiddling around with that "Warehouse" program, I found that the issue started occurring after this update which updated dolphin from Qt5 to Qt6, or more specifically Qt 6.4. Currently, the Flatpak version of Dolphin uses Qt 6.6.0

Great news! Thank you for trying this out, that commit was a prime suspect but there was no way to know for sure without actual testing.

But when building from source, Dolphin takes the newest version of Qt that is in the repositories, which for me is Qt 6.2.4. This is because Linux Mint is based on the latest LTS release of Ubuntu, current 22.04, so, of course, some packages are bound to be older than on rolling distros or on Flatpak. Newer versions of Ubuntu probably use a newer version of Qt.

To recap: My system, and my source-built version of Dolphin run Qt 6.2.4 The Dolphin Flatpak currently runs Qt 6.6.0 The issue first started occurring for me when the Dolphin Flatpak updated from Qt 5.15 to Qt 6.4

With that all in mind, this is my hypothesis as to why this issue is happening on Flatpak: (please take this all with a grain of salt, I'm not an expert on Flatpaks or Linux in general)

I think that since Linux Mint, the Cinnamon Desktop Enviorment, and the Muffin Window manager are made with the Ubuntu 22.04 repo in mind, which uses Qt 6.2.4, they aren't exactly equipped to handle newer versions of Qt. Because of this, when newer versions are run, they have issues, and the update to Qt 6.4 on the Flatpak created a lot of issues, a lot of them having to do with the UI.

That package most likely also carries a bunch of debian/ubuntu downstream patches, so it might be something that they're fixing on their side but it's hard to tell. It seems more likely that there might be some unnoticed issues with dolphin in qt6, but given that the flatpak serves the exact same version of qt to everybody I can't see why it would only fail on some systems.

Maybe just some broken platform specific code in newer qt versions but I wouldn't know where to start looking.

There is also a well-known issue with Dolphin that occurs on Qt 6.3+ listed here. I don't experience it, but it seems pretty similar to my issue.

I remember looking at this issue at some point, you shouldn't experience it at all because current dolphin releases set an environment variable to work around it.

Of course, I'm no Flatpak expert, so maybe my theory doesn't make sense with how Flatpaks work. I'm not really sure. Maybe Qt has nothing to do with this. All I know is that built-from-source Dolphin works fine, and the Flatpak version doesn't. Hope this helps.

No, I'm pretty sure it's some kind of issue that dolphin has with newer qt versions. They have a very extensive test suite, but it's centred on emulation issues, it'd be easy for ui issues on minority platforms to fall through the cracks.

When I have some free time I'll see what are the best options to work around this issue and queue up a new build for you to test, hopefully we can fix it without negatively affecting anybody else.

Also, what distro and DE do you use?

I do all the testing in fedora with regular gnome.

@gumbucc
Copy link
Author

gumbucc commented Jan 11, 2024

Thanks for all the info 'n' help! Hope you can figure out a solution.

Also, I recommend trying to contact the other person who was experiencing my issue (this guy) to see what distro & DE they were/are using, if it's even possible to do such a thing on GitHub. That could really help narrow down things.

@cpba
Copy link
Collaborator

cpba commented Jan 12, 2024 via email

@gumbucc
Copy link
Author

gumbucc commented Jan 13, 2024

Alright

@cpba
Copy link
Collaborator

cpba commented Jan 20, 2024

I still don't know what to do about this.

Options considered so far:

  • Changing the kde runtime to 6.2 would possibly work, but that's already eol, and since it's based on 21.08 it would break dolphin for people on newer gpus.
  • Changing it to 5.15-23.08 would sidestep those issues, but isn't viable because dolphin already dropped support for qt5.
  • Changing the runtime to fdo 23.08 while building and bundling qt6.2 with dolphin would also likely work, but it would greatly balloon download and install sizes for everybody. It's also not advisable in general since the release is no longer supported.

At this point the best advice for users with this issue would be to temporarily downgrade the flatpak to the latest working version.

As far as I can tell mint follows ubuntu lts releases, a new one is due to be released in april. It's possible that this will fix itself at that point, but even if it doesn't, it'll still make it much easier to reproduce the issue outside the flatpak and see if upstream can do anything about it.

@gumbucc
Copy link
Author

gumbucc commented Jan 21, 2024

Yeah, I think you should just keep the flatpak as it is. While this issue is pretty annoying, there's ways to sidestep the issue (like my fullscreen hotkey workaround I detailed at the start of this thread) without having to downgrade or change Dolphin in some way. Linux Mint just updated to 21.3, which means it'll update to 22 (a new package base) in about 6 months. I'll see if it works when that happens.

@gumbucc
Copy link
Author

gumbucc commented Jul 29, 2024

After updating to Linux Mint 22, the issue persists. Maybe it's not a Qt issue?

@cpba
Copy link
Collaborator

cpba commented Aug 6, 2024

After updating to Linux Mint 22, the issue persists. Maybe it's not a Qt issue?

The other user who reported a similar issue (#168) said it happened on a chromebook, given that it worked on cinammon when using qt5 I still think it's got to be some regression in the library.

The main issue is that I don't know how to isolate this or where to report it.

Is it possible to reproduce the bug (on cinnamon) on mint22 when building from source there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants