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

wl_seat@11: error 0 #103

Open
sonjiku opened this issue May 31, 2023 · 4 comments
Open

wl_seat@11: error 0 #103

sonjiku opened this issue May 31, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@sonjiku
Copy link

sonjiku commented May 31, 2023

Hey, I decided to try tofi out cause it looks nice.

I'm running sway on Fedora 38.

Whenever I run tofi or tofi-drun from the terminal I get:

wl_seat@11: error 0: wl_seat.get_keyboard called when no keyboard capability has existed

Tofi doesn't show up and the command just hangs there as if running until I ^C.

@philj56 philj56 added the bug Something isn't working label May 31, 2023
@philj56
Copy link
Owner

philj56 commented May 31, 2023

Interesting, I'm not sure why that would be the case. Tofi doesn't call get_keyboard unless it's specifically told one is available:

tofi/src/main.c

Lines 379 to 383 in 6060daa

bool have_keyboard = capabilities & WL_SEAT_CAPABILITY_KEYBOARD;
bool have_pointer = capabilities & WL_SEAT_CAPABILITY_POINTER;
if (have_keyboard && tofi->wl_keyboard == NULL) {
tofi->wl_keyboard = wl_seat_get_keyboard(tofi->wl_seat);

I'll try it on Fedora myself at some point and see if I can recreate the issue.

@sonjiku
Copy link
Author

sonjiku commented May 31, 2023

Thanks for the quick reply.

Some further info that I think might be useful:

I have a feeling that this issue might have been caused by me switching from vt2 to vt3, inside of which I opened Hyprland. (not sure if it was 2, just the one opened by sddm for sway)

Now just to test this, I tried running tofi inside of Hyprland when that happened, and it executed properly. But inside of sway i was still getting that error. Now after I closed Hyprland and returned to vt2, it stil had the error.

I don't know much about how X11 and Wayland, but with my understanding, from what I read on the error and what I had tried, I thought that maybe tofi was trying to open on the most recently opened graphical session (which i presume is what "seat" refers to).

I decided to try signing out of sway and back in, so it is the most recent session, and... Explosion sound tofi run properly this time.

My theory is that tofi is trying to open in the most recent "seat" instead of the one it was called from, so thats why this error appears. Maybe you could try it on the distro you use as well. When I get a chance I'll test out the theory as well, by:

  • Sign in sway
  • Switch to another vt
  • Start hyprland and try to run tofi.
  • Switch back to sway and run tofi.
  • If I get error: switch back to hyprland to check if maybe tofi is running there and just gives an error to the sway vt.

I hope that was helpful.

@philj56
Copy link
Owner

philj56 commented Jun 1, 2023

Ah thanks for the info. I've just tried this on my machine (Arch Linux, Sway 1.8.1, Hyprland 0.26.0) and everything seems to work fine - I can switch between Hyprland in one VT and Sway in another, and tofi works in both.

My theory is that tofi is trying to open in the most recent "seat" instead of the one it was called from, so thats why this error appears.

Tofi doesn't do any selection of seats or anything itself, that's handled by libwayland-client. The only thing that should affect what tofi tries to connect to is the value of the $WAYLAND_DISPLAY environment variable, as that's what libwayland uses to determine what to connect to.

Could you echo $WAYLAND_DISPLAY in Sway and Hyprland when it's acting up, and see what you get? It should be something like wayland-1 for one of them, and wayland-2 for the other.

@sonjiku
Copy link
Author

sonjiku commented Jun 3, 2023

Hey, after testing that theory on my machine as well, it seems like tofi worked without issue. While I was writing this message though, I tried running it again, and surprisingly I got the error once more! I haven't done any VT switching now though. Could it be my laptop going to sleep and then waking up after I close/open the lid? As soon as I test that I'll let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants