GithubHelp home page GithubHelp logo

Comments (28)

Faugus avatar Faugus commented on September 25, 2024 1

@jp7677 I applied the patch as you suggested and it didn't change anything.

from labwc.

Faugus avatar Faugus commented on September 25, 2024 1

@Consolatis it worked!
When I toggle it, the game becomes smooth.
But is there a way to enable it by default? System-wide, I mean.
Because I need to toggle it everytime I run a game and when I do it breaks the gamepad compatibility with the game.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

Depending on the game WLR_NO_HARDWARE_CURSORS may prevent direct scanout from happen. Unless you have issue with the cursor without it I'd recommend removing the env var.

You could also try to give labwc a higher priority via nice (but need to ensure that the game then in turn starts at the default value).

from labwc.

Faugus avatar Faugus commented on September 25, 2024

I set WLR_NO_HARDWARE_CURSORS because in some games (like Uncharted) the mouse cursor was stuttering with VRR ON.
I just tried to remove it and nothing changed.

I tried to set -20 priority to labwc and nothing changed aswell.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

Just so that we are on the same page:

  • VRR on, no recording, smooth game
  • VRR off, no recording, smooth ?
  • VRR on, recording, gameplay smooth, recording jittery ?
  • VRR off, recording, gameplay smooth, recording jittery ?

from labwc.

Faugus avatar Faugus commented on September 25, 2024
  • VRR on, no recording, smooth game
  • VRR off, no recording, JITTERY game
  • VRR on, recording, gameplay smooth, RECORDING JITTERY
  • VRR off, recording, GAMEPLAY JITTERY, RECORDING JITTERY

from labwc.

Faugus avatar Faugus commented on September 25, 2024

I forgot to mention that on Last Epoch, the MangoHud's frametime graph is a straight line and running at around 100 FPS and feels jittery.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

Alright, so:

  • VRR on smooth gameplay and VRR off jittery gameplay.
  • the recording is always jittery

Do you have a chance to test the same with sway 1.9?
They are now using the same rendering backend as we do so it might shed a light on the area where we can proceed to debug.

Completely random thought:
Does the same happen when using the vulkan renderer? (WLR_RENDERER=vulkan in ~/.config/labwc/environment)

from labwc.

Faugus avatar Faugus commented on September 25, 2024

Do you have a chance to test the same with sway 1.9?

I could, but not today, unfortunately.

Does the same happen when using the vulkan renderer? (WLR_RENDERER=vulkan in ~/.config/labwc/environment)

I tried this before and it didn't change anything.

I just recorded a video to show you the jittery and looks like the recording is better now.
I think removing the WLR_NO_HARDWARE_CURSORS did the trick.

I'll do more tests and report back.

from labwc.

jp7677 avatar jp7677 commented on September 25, 2024

I don’t know how trustworthy this is and if this is even related, but according to https://www.reddit.com/r/labwc/comments/1amhc4v/comment/kpmrk6n you could try to apply #1278 and may be (probably not) something changes.

from labwc.

Faugus avatar Faugus commented on September 25, 2024

I've been doing some tests and I discovered that the mesa-git driver was affecting the framepace, so I installed the regular mesa driver.

With that out of the way, things got wierder:
Playing on KDE feels a lot smoother than on Labwc, but the recording on Labwc is smoother than on KDE.

Here's a video showing the comparison:
https://youtu.be/Z9H9afcptEE

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

This is not exactly an area of expertise of mine, so just some more random thoughts.

AFAIR the frame rate of the recording is dictated by the recording application. On wlroots based compositors there is also the choice between using shared system memory buffers (SHM) or GPU buffer handles (dmabuf). I don't know if there are recording applications out there that make use of that.

What are you using for the recordings, OBS via screenshare portal and pipewire? If yes you could try wf-recorder for testing as well (but that only works on wlroots based compositors). OBS might also have some wlr-screencopy-unstable-v1 protocol plugin.

Increasing the niceness of the recording application might also help.

from labwc.

Faugus avatar Faugus commented on September 25, 2024

@Consolatis I'm using https://git.dec05eba.com/gpu-screen-recorder/about/ which only uses GPU.

But as I said, recording is better now, probably WLR_NO_HARDWARE_CURSORS was the problem.
Check the video https://youtu.be/Z9H9afcptEE.

The gameplay (without recording and VRR) is jittery compared to KDE. 100 FPS feels like 30 FPS, while on KDE is smooth.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

@Consolatis I'm using https://git.dec05eba.com/gpu-screen-recorder/about/ which only uses GPU.

This seems to grab the frames directly from the DRM plane and thus skips the whole compositor layer. Very interesting. Thanks for posting that link.

As for why its jittery during normal gameplay (without VRR) I am not sure. You could potentially try the ToggleTearing action (along with https://labwc.github.io/labwc-config.5.html#entry_core_allowtearing).

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

As far as I remember the application can request the activation of tearing. So that is something that could potentially be done via wine but I don't follow the topic so don't know what is planned there.

For adaptiveSync we do have a fullscreen option so it gets enabled automatically when an application is in fullscreen.
Maybe we could add something similar for allowTearing.

In the meantime you could potentially use a windowRule, e.g. something like this

<windowRules>
  <windowRule title="some game title as shown in A-Tab">
      <action name="ToggleTearing" />
  </windowRule>
</windowRules>

Edit:
Potentially you could even use something like identifier="*" for the window rule and thus set it for all applications. I have absolutely no clue how that effects usual desktop applications though.

from labwc.

Faugus avatar Faugus commented on September 25, 2024
  <windowRules>
    <windowRule identifier="*">
      <action name="ToggleTearing" />
    </windowRule>
  </windowRules>

That didn't work. I still need to toggle it manually.

from labwc.

Faugus avatar Faugus commented on September 25, 2024

Maybe we could add something similar for allowTearing.

I think that would be the best option @Consolatis.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

Maybe we could add something similar for allowTearing.

I think that would be the best option @Consolatis.

Thoughts @ahesford @Ph42oN ?

from labwc.

Faugus avatar Faugus commented on September 25, 2024

image
KDE has this option enabled by default. That's why gaming without VRR is smoother on KDE.

from labwc.

ahesford avatar ahesford commented on September 25, 2024

A fullscreen option to allowTearing was part of the original PR. We could add that option back by modifying get_tearing_preference in output.c to check for a fullscreen option and, if that's set, see if the active view is fullscreen; if so, it can return true without checking server->active_view->tearing_hint.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

A fullscreen option to allowTearing was part of the original PR. We could add that option back by modifying get_tearing_preference in output.c to check for a fullscreen option and, if that's set, see if the active view is fullscreen; if so, it can return true without checking server->active_view->tearing_hint.

Thanks!
Added #1568 based on your suggestion.

@Faugus testing the PR would be much appreciated.

from labwc.

Faugus avatar Faugus commented on September 25, 2024

@Consolatis Do I need to enable something in the rc.xml file?

I still have <allowTearing>yes</allowTearing>

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

@Consolatis Do I need to enable something in the rc.xml file?

I still have <allowTearing>yes</allowTearing>

Yes, it should be set to fullscreen.

from labwc.

Faugus avatar Faugus commented on September 25, 2024

@Consolatis it's working!
The only problem is if I'm running on fullscreen and I try to change to borderless window, the game crashes.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

@Consolatis it's working!

Sweet, thanks for testing.

The only problem is if I'm running on fullscreen and I try to change to borderless window, the game crashes.

Does the same happen when you use yes and ToggleTearing? And does it happen when you do not use tearing at all (e.g. a setting of no)?

from labwc.

Faugus avatar Faugus commented on September 25, 2024

@Consolatis I tried with several games.
Looks like this window problem only happens with the Wine Wayland Driver.
With Proton and regular Wine everything works fine.
Since the Wine Wayland Driver is still in development, there's no need to worry about it now.

from labwc.

Consolatis avatar Consolatis commented on September 25, 2024

Well, the proper solution here would actually be for the wine wayland driver to set the tearing hint itself. But having a more generic option available on the compositor level still sounds like a good idea to me. We'll likely merge #1568 in a few days, after the release.

from labwc.

Faugus avatar Faugus commented on September 25, 2024

Thank you so much!

from labwc.

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.