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

Make the render window a native Wayland window #2559

Closed
1 task done
PatrickJosh opened this issue Aug 12, 2021 · 10 comments
Closed
1 task done

Make the render window a native Wayland window #2559

PatrickJosh opened this issue Aug 12, 2021 · 10 comments

Comments

@PatrickJosh
Copy link

Is your feature request related to a problem? Please describe.
Currently, when using fractional scaling in GNOME with Wayland, the render window is slightly blurry. This happens to all applications that use XWayland instead of native Wayland as display server.

Describe the solution you'd like
Make the render window a native Wayland window so that it does not use the XWayland server anymore.

Describe alternatives you've considered
An alternative for me would be not to use Wayland or fractional scaling, but I do not consider both as sensible options. I have not thought about other options, I do not know if there are any.

Additional context
A screenshot to show the slight blurriness. You can see it best if you compare the text of the terminal with the headline of the render window.
grafik

@rom1v
Copy link
Collaborator

rom1v commented Aug 12, 2021

I guess this should be handled by SDL, could you please also report the problem to them?

@PatrickJosh
Copy link
Author

Sure, sorry. I did not know that.

@PatrickJosh
Copy link
Author

With a bit of search, I found this pull request in SDL's repository. With SDL_VIDEODRIVER=wayland scrcpy, it is indeed possible to run scrcpy with Wayland. However, the window does not have any decorations then, but the corresponding pull request is merged. Is this still an issue with SDL or now with scrcpy?

@PatrickJosh
Copy link
Author

PatrickJosh commented Aug 12, 2021

I manually fixed it by building scrcpy myself with having libdecor development files installed. Now the window has decorations. Maybe future versions of scrcpy could include libdecor as a requirement so that decorations are available with the prebuild binaries as well?

@PatrickJosh
Copy link
Author

PatrickJosh commented Aug 12, 2021

I noticed, directly after I have written the last comment, that the decorations are also available with the prebuild version, at least on Fedora, when libdecor is installed. So, libdecor should maybe be a dependency for the installation of scrcpy on Linux, at least on the distros that use Wayland by default now (Fedora, Ubuntu)? If this is not an option, in my opinion at least a note in the FAQ should be added.

rom1v added a commit that referenced this issue Aug 13, 2021
The video driver might need to be explicitly set to wayland.

Refs #2554 <#2554>
Refs #2559 <#2559>
rom1v added a commit that referenced this issue Aug 13, 2021
The video driver might need to be explicitly set to wayland.

Refs #2554 <#2554>
Refs #2559 <#2559>
@rom1v
Copy link
Collaborator

rom1v commented Aug 13, 2021

@rom1v rom1v closed this as completed Aug 13, 2021
@zenofile
Copy link

I added libdecor as runtime dependency for https://copr.fedorainfracloud.org/coprs/zeno/scrcpy/.

@rom1v
Copy link
Collaborator

rom1v commented Aug 13, 2021

@zenofile Thanks.

May I remove:

On some distributions (at least Fedora), the package libdecor must be installed manually.

from the FAQ then?

@zenofile
Copy link

zenofile commented Aug 13, 2021

@zenofile Thanks.

May I remove:

On some distributions (at least Fedora), the package libdecor must be installed manually.

from the FAQ then?

If the user decides to use the prebuilt binaries instead of the copr repository (or when using other distributions?), it might still be necessary to install libdecor manually. So I would recommend altering the text to something like:

On distributions that do not include libdecor as a runtime dependency when installing scrcpy via the package manager or when using the prebuilt binaries, it may need to be installed manually.

instead of removing it completely.

@xerpi
Copy link

xerpi commented Aug 13, 2021

With a bit of search, I found this pull request in SDL's repository. With SDL_VIDEODRIVER=wayland scrcpy, it is indeed possible to run scrcpy with Wayland. However, the window does not have any decorations then, but the corresponding pull request is merged. Is this still an issue with SDL or now with scrcpy?

You can override the SDL version an executable is linked to (scrcpy in your case) and provide your own SDL .so:

SDL_VIDEODRIVER=wayland SDL_DYNAMIC_API=/path/to/your/SDL/build/.libs/libSDL2-2.0.so.0

It might be useful while waiting until the latest SDL version reaches the repos of the distros.

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

No branches or pull requests

4 participants