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

Linux - Wayland support #30

Closed
alexbrrsclnt opened this issue Oct 21, 2023 · 15 comments
Closed

Linux - Wayland support #30

alexbrrsclnt opened this issue Oct 21, 2023 · 15 comments
Labels
bug Something isn't working linux Linux specific issue

Comments

@alexbrrsclnt
Copy link

The app launches without issues, but the widgets don't respect the position set in the respective configuration section. Also is not possible to drag&drop widgets. And finally (and maybe this is a KDE environment issue), each widget has a window task entry in the task bar.

tinipedal_wayland_widgets_position

In KDE preferences > Window managment section, you can set the location of the windows, the default is centered. If you change this setting, after toggle autohide option in the app to hide and show them again, the widgets respect that instead of the position set in the app.
I don't know if this is a KDE wayland issue or is also present in other environments like Gnome.

kde_preferences_window_management

If this issue is solved, the app would be perfect and ready for when X11 is disabled definitely in linux.

Thanks for the app!

@s-victor
Copy link
Owner

Hi, thanks for the feedback. KDE is known to have various issues with drag-ability & task icon problems from my previous testing. I had spent quite some time trying to fix those issues you mentioned on fedora KDE some months ago, but there was no success in solving them. At the moment there isn't anything I can do to help with the issue related to KDE. Other DE like gnome, lxde, xfce should work fine.

@s-victor
Copy link
Owner

s-victor commented Oct 21, 2023

I have a very good news.

Just found a solution from this post which solved dragging and position issues as I tested on fedora KDE (wayland).

You will need to run tinypedal with following cmd:
XDG_SESSION_TYPE=x11 python3 run.py

Please let me know if it works on your side too @alexbrrsclnt @berarma

Thanks.

Edit, the other solution also works as it seems:
QT_QPA_PLATFORM=xcb python3 run.py

Also, once launched, you may only see one widget, and need to click it to see other widgets.

@alexbrrsclnt
Copy link
Author

I will try both methods and report back!

Thanks!

@berarma
Copy link
Contributor

berarma commented Oct 22, 2023

Gnome on Wayland has the same issues. Both workarounds work although I haven't tested them enough. I don't have rFactor 2 installed on this computer.

I have yet to test it on my main computer with Gnome on X11 to see there's no regressions there.

We can add one of those workarounds to the launcher if it doesn't break anything else.

@alexbrrsclnt
Copy link
Author

alexbrrsclnt commented Oct 22, 2023

I have tried both methods on KDE wayland and both work. But I don't know if this is a proper fix or a temporarily "hack". I think that if not yet, soon there must be a proper way to create "windows" or "panels" for widgets that not need to think that are in a X11 environment instead of a wayland one.

Maybe it's fine to keep this issue open until a proper fix is found, but advertise that a intermediate solution is available in the README.

Thanks!

EDIT: for the record, I have not tried to launch the app with that prefix on a X11 session, but I don't think that telling an X11 app that is going to be executed in an X11 session would suppose any regression :P

@berarma
Copy link
Contributor

berarma commented Oct 22, 2023

EDIT: for the record, I have not tried to launch the app with that prefix on a X11 session, but I don't think that telling an X11 app that is going to be executed in an X11 session would suppose any regression :P

Not for the first workaround, but I don't know exactly what the second workaround does. For that reason I would choose the first one if possible.

As for fixing it for Wayland, this probably implies upgrading to PySide2/QT 6. It would make it a bit harder to install on some systems still using QT5 and maybe bring other issues.

@s-victor
Copy link
Owner

Thank you guys for the feedback.

According to qt document in this link, this issue seems unlikely be "fixed". There were also some search results shown the same issue dated way back to 10 years ago...

Agree with berarma's concern. I did test with both pyside2(qt5) & pyside6(qt6) for various compatibility concerns long before, and both shown same results. So pyside2 was chose at the end for better compatibility with old system.

Once you decided, please feel free to make a PR with the workaround integrated in launcher. Thanks for help.

@berarma
Copy link
Contributor

berarma commented Oct 24, 2023

I've implemented a fix in #32, please test and report back. Thanks!

@alexbrrsclnt
Copy link
Author

I've implemented a fix in #32, please test and report back. Thanks!

Sure, I Will try ASAP!

@berarma
Copy link
Contributor

berarma commented Oct 24, 2023

It's already merged so just need to pull the newest commits from master.

@s-victor
Copy link
Owner

Just tested new installer & launcher, works perfect in vbox, great job @berarma

@s-victor
Copy link
Owner

hi, I just noticed a small issue in new installer.

If the install destination doesn't already contain share share/applications bin folders, it will throw insufficient privileges and fail to install, probably need some extra code to create folder if not exist?

@berarma
Copy link
Contributor

berarma commented Oct 25, 2023

hi, I just noticed a small issue in new installer.

If the install destination doesn't already contain share share/applications bin folders, it will throw insufficient privileges and fail to install, probably need some extra code to create folder if not exist?

That's done on purpose, the choosen directory should contain the structure since we're just setting the prefix. Although I should have shown a different error message.

I can change it to create them or add a better error message. If you think there's a use case I would create them, if not I think it's a protection to avoid installing them in the wrong location.

@s-victor
Copy link
Owner

All good no worries, thanks for explanation.

@alexbrrsclnt
Copy link
Author

Reinstalled from latest master and works perfectly.

Thanks!

@s-victor s-victor added linux Linux specific issue bug Something isn't working labels Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux Linux specific issue
Projects
None yet
Development

No branches or pull requests

3 participants