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

possible race condition when loading inputplumber profiles on OGUI #397

Open
philmmanjaro opened this issue Sep 1, 2024 · 11 comments
Open

Comments

@philmmanjaro
Copy link
Contributor

Seems gamescope-plus 3.14.29-plus1 doesn't show OGUI overlay in steam-plus session. When I downgrade to 3.14.24-plus1 it works

@pastaq
Copy link
Collaborator

pastaq commented Sep 2, 2024

I was unable to reproduce after manually updating gamescope-plus and OpenGamepadUI to the latest versions.

@philmmanjaro
Copy link
Contributor Author

Must be some sort of glitch. Now works on my end also. Have to check what issues that can be. When it doesn't work I get the left Menu open as if I would have pressed GUIDE.

@pastaq
Copy link
Collaborator

pastaq commented Sep 3, 2024

After watching the video it looks like a bug that I thought was solved in the state refactoring. It seems that there is a time delay from when the button is pressed to when the default profile is switched. If you press the button multiple times (the number of times doesn't matter, it's time based) it will open the menu after about 1s. This is consistent with what I've seen in the past. It will likely manifest after/while you've running a game and not on the main menu before that.

@philmmanjaro
Copy link
Contributor Author

Yes. Some like that. Gamescope-Plus version is unrelated to that.

@philmmanjaro
Copy link
Contributor Author

On a bad state I get happy triggers in evtest:

Event: time 1725338725.656849, -------------- SYN_REPORT ------------
Event: time 1725338728.468155, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 1
Event: time 1725338728.468155, -------------- SYN_REPORT ------------
Event: time 1725338728.654430, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 0
Event: time 1725338728.654430, -------------- SYN_REPORT ------------
Event: time 1725338764.021574, type 1 (EV_KEY), code 710 (BTN_TRIGGER_HAPPY7), value 1
Event: time 1725338764.021574, -------------- SYN_REPORT ------------
Event: time 1725338764.207614, type 1 (EV_KEY), code 710 (BTN_TRIGGER_HAPPY7), value 0

@philmmanjaro philmmanjaro changed the title gamescope-plus 3.14.29-plus1 not able to display overlay in steam-plus possible race condition when loading inputplumber profiles on OGUI Sep 3, 2024
@pastaq
Copy link
Collaborator

pastaq commented Sep 5, 2024

On a bad state I get happy triggers in evtest:

Event: time 1725338725.656849, -------------- SYN_REPORT ------------
Event: time 1725338728.468155, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 1
Event: time 1725338728.468155, -------------- SYN_REPORT ------------
Event: time 1725338728.654430, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 0
Event: time 1725338728.654430, -------------- SYN_REPORT ------------
Event: time 1725338764.021574, type 1 (EV_KEY), code 710 (BTN_TRIGGER_HAPPY7), value 1
Event: time 1725338764.021574, -------------- SYN_REPORT ------------
Event: time 1725338764.207614, type 1 (EV_KEY), code 710 (BTN_TRIGGER_HAPPY7), value 0

These trigger events are from the default InputPlumber profile. The OpenGamepadUI profile isn't getting set every time.

We're working on switching to a rust backend for our dbus interface (from cpp) which will enable us to respond to signaling instead of polling. It seems in rare cases we are still missing some events with the current system.

@philmmanjaro
Copy link
Contributor Author

Reverting this change 75f312a from InputPlumber 0.34.5 makes no difference in the result. SteamUI acts similar, on evtest the other cmds are triggered. Looking forward to that rust backend. Do we have an rough ETA on that topic?

@pastaq
Copy link
Collaborator

pastaq commented Sep 5, 2024

Reverting this change 75f312a from InputPlumber 0.34.5 makes no difference in the result. SteamUI acts similar, on evtest the other cmds are triggered. Looking forward to that rust backend. Do we have an rough ETA on that topic?

It's a big change to a lot of subsystems so it won't be rushed. Maybe a few weeks.

@philmmanjaro
Copy link
Contributor Author

Could we add BTN_TRIGGER_HAPPY7 and BTN_TRIGGER_HAPPY5 to the LC/RC functions on the NEO in a temp workaround by checking if the other functions are not given and trigger a profile reload?

@pastaq
Copy link
Collaborator

pastaq commented Sep 5, 2024

Could we add BTN_TRIGGER_HAPPY7 and BTN_TRIGGER_HAPPY5 to the LC/RC functions on the NEO in a temp workaround by checking if the other functions are not given and trigger a profile reload?

That won't solve the problem and is missing the point. Those events occur because of the profile that is set. There is more that happens besides the profile switching, that is just a symptom of the problem of InputPlumber and OpenGamepadUI not communicating properly. We also set the intercept events and intercept mode at the same time, which won't be working either.

@philmmanjaro
Copy link
Contributor Author

I found out on how to trigger it since I had a typo in my os-session-select script:

  gamescope|steam|gamescope-session-steam)
    session_launcher="gamescope-session-steam.desktop"
    create_sentinel=1
  ;;
  steam-plus|gamescope-session-gamescope|steam-plus)
    session_launcher="gamescope-session-steam-plus.desktop"
    create_sentinel=1
  ;;

So a cold boot would use gamescope which is linked just to the regular gamescope-session-steam which wouldn't load the plus bits. After fixing that and getting the controller out of the bad state by spawning a full OGUI session and going back to the steam-plus session it worked more stable. Have to monitor it. But this is a way to trigger it on cold boot.

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

2 participants