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

Full OSD support on Wayland #18

Open
LynXDTS opened this issue Sep 8, 2024 · 7 comments
Open

Full OSD support on Wayland #18

LynXDTS opened this issue Sep 8, 2024 · 7 comments

Comments

@LynXDTS
Copy link

LynXDTS commented Sep 8, 2024

Please, if possible, implement the feature present in https://github.com/git-developer/sc-controller - fork of original package from kozec.

Feature in question - possibility to summon OSD in wayland.

image

@LynXDTS
Copy link
Author

LynXDTS commented Sep 8, 2024

As I see - both of the projects utilize python3 instead of original's python2

@C0rn3j
Copy link
Owner

C0rn3j commented Sep 8, 2024

There's no OSD differences as far as I see.

Do you have the gtk-layer-shell dependency installed? It won't work without it.
I just marked it and the rest of the deps as hard deps, as not having it just bit me on my own system, at least in the readme. Let's have a unified experience.
It might be a good idea that the deps are verified in the code too.

Just summoning and closing the OSD menu makes the daemon sad with an error - which probably should be marked as debug instead:

D SCCDaemon     STICK locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.A locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.B locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
E OSD osd.menu      Sucessfully locked input
D SCCDaemon     SCButtons.B unlocked
D SCCDaemon     STICK unlocked
D SCCDaemon     SCButtons.A unlocked

The bigger problem is that attempting to use the "Display Keyboard" option crashes the scc-osd-daemon:

[247347.701772] input: SCC OSD Keyboard as /devices/virtual/input/input58
[247347.702020] input: SCC OSD Mouse as /devices/virtual/input/input59
[247347.702745] python[1822375]: segfault at 200000041 ip 00007ec6634c5045 sp 00007ffc42bedca0 error 6 in libX11.so.6.4.0[a3045,7ec663439000+94000] likely on CPU 10 (core 4, socket 0)
[247347.702752] Code: 15 f0 92 09 00 49 89 c5 48 85 c0 0f 84 61 fd ff ff 49 89 87 20 0a 00 00 49 8b 47 08 48 8d 0d 92 df fe ff 48 8d 3d 4a 95 00 00 <48> 89 48 40 41 83 4d 04 12 ff 15 cc 88 09 00 48 85 c0 0f 84 11 02

I don't think we should be using X11 there at all?

D SCCDaemon     STICK unlocked
D SCCDaemon     SCButtons.A unlocked
D SCCDaemon     SCButtons.B unlocked
D OSD osd.keyboard  Using font DejaVu Sans
I OSD profile       Converted button(Keys.KEY_LEFTSHIFT) to trigger(50, button(Keys.KEY_LEFTSHIFT))
I OSD profile       Converted button(Keys.KEY_LEFTCTRL) to trigger(50, button(Keys.KEY_LEFTCTRL))
D OSD Mapper        Creating virtual devices
D OSD Mapper        Keyboard: <scc.uinput.Keyboard object at 0x775af0624590>
D OSD Mapper        Mouse:    <scc.uinput.Mouse object at 0x775af06b7da0>
D OSD Mapper        Gamepad:  <scc.uinput.Dummy object at 0x775af06b57f0>
D SCCDaemon     LEFT locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     RIGHT locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     STICK locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.STICKPRESS locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.RPADTOUCH locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.LPADTOUCH locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.RPAD locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.LPAD locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.RGRIP locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.LGRIP locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.START locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.C locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.BACK locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.A locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.X locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.B locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.Y locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.LB locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.RB locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.LT locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.RT locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.CPADTOUCH locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.CPADPRESS locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.STICKPRESS locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.RSTICKPRESS locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.DOTS locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.RGRIP2 locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
D SCCDaemon     SCButtons.LGRIP2 locked by <scc.sccdaemon.Client object at 0x7fc92d7697c0>
W Actions       Action KeyboardAction can't handle button release event
D SCCDaemon     SCButtons.CPADPRESS unlocked
D SCCDaemon     SCButtons.STICKPRESS unlocked
D SCCDaemon     SCButtons.RSTICKPRESS unlocked
D SCCDaemon     SCButtons.DOTS unlocked
D SCCDaemon     SCButtons.RGRIP2 unlocked
D SCCDaemon     SCButtons.LGRIP2 unlocked
D SCCDaemon     LEFT unlocked
D SCCDaemon     RIGHT unlocked
D SCCDaemon     STICK unlocked
D SCCDaemon     SCButtons.STICKPRESS unlocked
W SCCDaemon     scc-osd-daemon died; restarting after 5s
D SCCDaemon     SCButtons.RPADTOUCH unlocked
D SCCDaemon     SCButtons.LPADTOUCH unlocked
D SCCDaemon     SCButtons.RPAD unlocked
D SCCDaemon     SCButtons.LPAD unlocked
D SCCDaemon     SCButtons.RGRIP unlocked
D SCCDaemon     SCButtons.LGRIP unlocked
D SCCDaemon     SCButtons.C unlocked
D SCCDaemon     SCButtons.START unlocked
D SCCDaemon     SCButtons.BACK unlocked
D SCCDaemon     SCButtons.A unlocked
D SCCDaemon     SCButtons.X unlocked
D SCCDaemon     SCButtons.B unlocked
D SCCDaemon     SCButtons.Y unlocked
D SCCDaemon     SCButtons.LB unlocked
D SCCDaemon     SCButtons.RB unlocked
D SCCDaemon     SCButtons.LT unlocked
D SCCDaemon     SCButtons.RT unlocked
D SCCDaemon     SCButtons.CPADTOUCH unlocked
I SCCDaemon     scc-osd-daemon lost
D OSD DaemonCtrl    Connected to daemon, version 0.4.8.20
D OSD DaemonCtrl    Daemon reported profile change for sc1: /usr/share/scc/default_profiles/XBox Controller with High Precision Camera.sccprofile
D OSD DaemonCtrl    Daemon is ready.
I SCCDaemon     Registered scc-osd-daemon
I OSD osd.daemon    Sucessfully registered as scc-osd-daemon

Tested on a Plasma Wayland session (so kwin).
I might dig into this a bit deeper later.

@LynXDTS
Copy link
Author

LynXDTS commented Sep 8, 2024

Just spun up a fresh Arch VM, as I do not remember all of the configuration on main system.

Installed Yay, got sc-controller-git from AUR, installed gtk-layer-shell explicitly after that and passed my controller through - still no OSD upon pressing the "Steam button", otherwise app is functional. Tried to just launch sc-controller from terminal - no relevant errors it seems, do not know how do debug deeper than that, sorry.

@C0rn3j
Copy link
Owner

C0rn3j commented Sep 8, 2024

kill sc-controller, kill scc-daemon, launch scc-daemon debug in one terminal and sc-controller in another.

I am also on Arch.
What compositor did you try?

I've fixed the git AUR package just now, forgot about it.

@LynXDTS
Copy link
Author

LynXDTS commented Sep 8, 2024

Upon reboot magically fixed itself it seems, idk what could have been a problem.

Answering the question - KWin+Wayland as well.

@C0rn3j
Copy link
Owner

C0rn3j commented Sep 8, 2024

If you updated the package you might have pulled python-setuptools on top of it, it was missing in the -git package, but it should only have been a dependency for a fully functional About menu.

Glad it works now.
Leaving the issue open because the OSD is still partially broken on Wayland anyway.

@C0rn3j C0rn3j changed the title Enable OSD on Wayland Full OSD support on Wayland Sep 11, 2024
@C0rn3j
Copy link
Owner

C0rn3j commented Sep 17, 2024

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1141

https://gitlab.gnome.org/GNOME/mutter/-/issues/973

Apparently GNOME's mutter refuses to support Layer Shell, so it just won't work™ there I suppose, unless someone puts in the necessary work to figure out a solution.

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