ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput | register your nick to speak
<LaserEyess> but still, that function never returns, and I'm unclear why that is
<LaserEyess> "When being called at a point where other threads have been prepared to read (using wl_display_prepare_read_queue() or wl_display_prepare_read()) this function will sleep until all other prepared threads have either been cancelled (using wl_display_cancel_read()) or them self entered this function. The last thread that calls this function will then read and queue events on their corresponding event
<LaserEyess> queues, and finally wake up all other wl_display_read_events() calls causing them to return."
<LaserEyess> there's no other thread that's calling this though...
jmdaemon has joined #wayland
<repetitivestrain> is there a way to hang user data off a struct wl_client?
<repetitivestrain> the data is presumably created upon client connection
<repetitivestrain> and released upon disconnect
<emersion> with the destroy listener yes
<repetitivestrain> yeah but i can't find anything along the lines of wl_client_set_user_data :(
<repetitivestrain> right, smart, i see thanks
<i509VCB> /s/destroy_data/destroy_listener
udent has joined #wayland
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
Dami_Lu has quit [Read error: Connection reset by peer]
<romangg> Are there some good test clients for xdg-shell popups protocol version 2 and 3?
slattann has joined #wayland
<Compy_> Alright, so I have a kiosk shell configured for 1280x720@60. I have an auto-start application (say either SDL2 or gstreamer with a waylandsink). I've set the shell background to red, and assigned the appropriate appids to the HDMI output. When kiosk shell runs, I see the red background, I can see my apps running and reporting to stdout, but I never see anything on screen. However if I swap the shell directive out for
<Compy_> desktop-shell, I can see both apps. Any idea why this is? I've been poking and prodding at logs and code and can't seem to figure out what would cause it.
nerdopolis has quit [Ping timeout: 480 seconds]
<tleydxdy> the app need to support kiosk shell too I think
mxz has quit [Quit: cya]
mxz has joined #wayland
Guest586 is now known as DrNick
jgrulich has joined #wayland
kts has joined #wayland
tzimmermann has joined #wayland
cvmn has joined #wayland
slattann has quit [Read error: Connection reset by peer]
kts has quit [Quit: Leaving]
hardening has joined #wayland
<daniels> tleydxdy: no they don’t need specific support, just xdg
<daniels> Compy_: are you running 11.0 release or git?
dcz_ has joined #wayland
danvet has joined #wayland
kts has joined #wayland
cvmn has quit [Ping timeout: 480 seconds]
ofourdan has joined #wayland
mvlad has joined #wayland
rasterman has joined #wayland
ecloud has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ecloud has joined #wayland
manuel_ has joined #wayland
<pq> tleydxdy, to clarify, "kiosk shell" is not a protocol extension, it's only a shell plugin in Weston. Confusingly, "fullscreen shell" is a protocol extension *and* a Weston shell plugin requiring clients to use that extension. Also "fullscreen shell" has nothing to do with the fullscreen window state (of xdg-shell).
<pq> Kinda makes me wish "fullscreen shell" was named something else.
<pq> LaserEyess, if you call wl_display_read_events() without first polling the socket fd and ensuring there is something to read, then yes, it will block until there is something to read.
gschwind has joined #wayland
Major_Biscuit has joined #wayland
<pq> LaserEyess, FWIW, if you use EGL Wayland platform as well, then the EGL implementation will be reading the Wayland socket too (but not in its own hidden thread, only when you call EGL or GL).
kts has quit [Quit: Leaving]
slattann has joined #wayland
Dami_Lu has joined #wayland
pax^ has joined #wayland
pax^ has quit [Excess Flood]
sudocurse_ has quit [Write error: connection closed]
daniels has quit [Write error: connection closed]
hwentlan_ has quit [Read error: No route to host]
hwentlan_ has joined #wayland
jimjams has quit [Read error: Connection reset by peer]
smurray has quit [Read error: Connection reset by peer]
panzeroceania___ has quit [Write error: connection closed]
jimjams has joined #wayland
bwidawsk has quit [Remote host closed the connection]
zzag has quit [Remote host closed the connection]
sudocurse_ has joined #wayland
zzag has joined #wayland
bwidawsk has joined #wayland
Major_Biscuit has quit [Ping timeout: 480 seconds]
daniels has joined #wayland
smurray has joined #wayland
<wlb> wayland-protocols/main: i509VCB * content-type: fix enum name in wp_content_type_v1.set_content_type https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/6d068c170807 staging/content-type/content-type-v1.xml
<wlb> wayland-protocols Merge request !174 merged \o/ (content-type: fix enum name in wp_content_type_v1.set_content_type https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/174)
panzeroceania___ has joined #wayland
Major_Biscuit has joined #wayland
devilhorns has joined #wayland
slattann has quit []
Major_Biscuit has quit []
MajorBiscuit has joined #wayland
<wlb> weston Issue #675 closed \o/ (simple-dmabuf-egl: drop Y_INVERT flag https://gitlab.freedesktop.org/wayland/weston/-/issues/675)
<wlb> weston/main: Simon Ser * clients/simple-dmabuf-egl: drop Y_INVERT flag https://gitlab.freedesktop.org/wayland/weston/commit/9b455e24a2fb clients/ meson.build simple-dmabuf-egl.c
<wlb> weston/main: Marius Vlad * simple-dmabuf-feedback: Correct the rectangle orientation https://gitlab.freedesktop.org/wayland/weston/commit/75b6758fd242 clients/simple-dmabuf-feedback.c
<wlb> weston Merge request !1024 merged \o/ (clients/simple-dmabuf-egl: drop Y_INVERT flag https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1024)
<wlb> weston/main: Marius Vlad * hmi-controller: Add missing removal of destroy listener https://gitlab.freedesktop.org/wayland/weston/commit/cfbf2b0ab2ac ivi-shell/hmi-controller.c
<wlb> weston/main: Marius Vlad * ivi-shell: Move out weston_desktop_shell at the end https://gitlab.freedesktop.org/wayland/weston/commit/eb755cd81aad ivi-shell/ivi-shell.c
<wlb> weston Merge request !1050 merged \o/ (ivi-shell: Missing removal of destroy listener and desktop-shell UAF https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1050)
<pq> Dear compositor developers, libdisplay-info high-level API beginnings need opinions: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/merge_requests/108
kts has joined #wayland
jmdaemon has quit [Ping timeout: 480 seconds]
manuel_ has quit [Ping timeout: 480 seconds]
<LaserEyess> pq: no, I'm really not sure of anything at this point, not even sure enough to ask the right questions if I'm being honest
<LaserEyess> I am not the original author of this code
<LaserEyess> I am only trying to get it merged, since the original author has a particular disdain for linux it seems
<LaserEyess> dolphin is tricky because it's tryign to create a new window with EGL/Vulkan for the game, separate from the qt window being used for the general UI
<pq> LaserEyess, the big comment at https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/simple-shm.c#L423-459 should help understand the require initial roundtrips.
<pq> *required
<pq> however, mind to not call roundtrip functions from inside an event handler
<zzag> so should other compositors stop honoring the y invert flag? or what's the fate of the y inverted flag? will it be or is it deprecated?
<LaserEyess> pq: there is a second roundtrip call in the wayland input code
<LaserEyess> and it mentions something like that
<LaserEyess> the thing is, this deadlock is occuring between the wayland input event code and the QT UI code, I assume they're both stepping over each other or something
<LaserEyess> but dolphin needs separate input handling code for the game window, so I cannot really be sure how badly of an API misuse this is, or if it's just a small abuse and the rest is bad dolphin code given its architecture
<LaserEyess> ¯\_(ツ)_/¯
<pq> LaserEyess, sorry, the deadlock is completely separate from that roundtrip comment. The roundtrip is just some unrelated oddity I noticed.
<davidre> LaserEyess: Which Qt version are you using? Qt was somewhat wrong in the past
<LaserEyess> 6
<pq> LaserEyess, so do you have a deadlock somewhere else, or do you see the program sleeping in a readmsg syscall?
cool110 has quit [Ping timeout: 480 seconds]
<davidre> Ok 6 has no problem
<LaserEyess> pq: correct, the deadlock is immediately when the program starts, before any window even opens and is displayed
cool110 has joined #wayland
<LaserEyess> dolphin goes through and enumerates its input devices (including special things like wiimotes), and a wayland keyboard/mouse is an "input device", so it starts listening for inputs
<pq> LaserEyess, is something calling wl_display_read_events() with some dolphin or Qt locks held?
<LaserEyess> in that, it calls the device lock, but it can't, because in a separate thread the listener queue for wl_display_read_events is continually waiting for "something"
<LaserEyess> so it just sits there in wl_display_read_events(), holding the lock that the main UI thread needs to start the window
<pq> wl_display_read_events is waiting for other "threads" that have already called wl_display_prepare_read(), IIRC.
<LaserEyess> yes
<LaserEyess> but no one call tell me what those threads are...
<LaserEyess> any dolphin devs, I mean
<LaserEyess> clearly you guys don't know
<pq> EGL has one, but EGL also does not hold internal locks while doing it
<LaserEyess> that EGL code sholdn't be running at all
<LaserEyess> it's only for the game window, and the main UI window hasn't even started yet
<pq> also Qt pretty surely has one or more
<LaserEyess> I would assume, yes
<LaserEyess> but why aren't they calling wl_display_prepare_read()?
<pq> surely they are?
<pq> that's the whole reason why wl_display_read_events() does not make progress: someone called prepare_read, but then did not actually read nor cancel.
<LaserEyess> oh, then that
<pq> so, set up a breakpoint on prepare_read and see where it gets called from, and for read_event and cancel_read too
<LaserEyess> hm
<LaserEyess> I forgot I could do that
<pq> heh
<Compy_> daniels: I tested on both 10.0.1 and 11.0.0. Same behavior was observed. Both applications work fine with desktop-shell, but won't show up on kiosk shell.
<pq> hopefully you can identify each "context"
<pq> LaserEyess, wl_display_prepare_read_queue() is the one, and you also need to observe its return value, because if it fails, it doesn't count and is retried.
<pq> but maybe that's obvious from the context
<LaserEyess> none of this is obvious to me :')
<pq> I mean the stack trace
<LaserEyess> as I said before, one of my first steps is to learn enough to ask teh right questions
<davidre> In the above backtrace you posted "WaylandEventThread" are threads created by Qt, so it might be useful to see what the y are doing in that moment of time
<daniels> Compy_: can you please try git main? there’s a fix in there which might help
<LaserEyess> I wonder if this issue is that this initalization code is just happenign too early
<LaserEyess> because QT should be handling everything until the game window comes up
<LaserEyess> and I assume it stops reading events when it's not in focus
<LaserEyess> anyway, more work to do but thank you for the hints, pq and others
<pq> good luck :-)
<pq> LaserEyess, I don't think postponing things is going to solve anything, at worst it might hide problems.
<LaserEyess> I just don't see why the keyboard/mouse game input needs to be listening before a game has even started
<LaserEyess> to be clear, dolphin has two primary windows: the QT UI window, and a separate window that is started for games, that shares no focus with the QT UI
<pq> sure
<LaserEyess> wayland input is only needed for that window
<pq> but all those windows will share the wl_display, right?
<LaserEyess> I guess?
<pq> that would be the Wayland way, anyway
<pq> since if you have two wl_displays, you cannot cross-reference any Wayland objects between the two.
<pq> all Wayland objects are private to the wl_display where they were created.
<LaserEyess> I'm struggling to think what those two windows would want to share together though
<LaserEyess> in theory they're completely separate
<pq> mm, perhaps, I'm not familiar with the UI
fmuellner has joined #wayland
<LaserEyess> well, I just thought of an even easier way to determine if qt is blocking this
<LaserEyess> dolphin has a nogui mode that launches only a game window
<pq> libwayland-client is designed so that any number of threads (or contexts, does not need to be actual threads) can attempt to read the Wayland socket at any time. Only one at a time will actually read the socket, but it will read everyone's events from that socket. Dispatching the events is separate.
<pq> LaserEyess, https://github.com/dolphin-emu/dolphin/pull/11257/files#diff-cab4345b471a9da05039d9642051caeb156afca909b3f054fd57051836e22dc5R133-R137 definitely looks risky for blocking, because it's not obvious that there *are* any events to be read from the Wayland socket first. But maybe blocking there is ok, and not a deadlock?
fmuellner has quit [Remote host closed the connection]
<LaserEyess> that is actually exactly the function causing the deadlock
<pq> it all depends on where does KeyboardMouse::UpdateInput() get called from.
<pq> yeah, but it's blocking on the mutex and cond var, not in actual read syscall, right?
<pq> ISTR your stack trace has pthread_cond_wait something in it, not recvmsg?
<LaserEyess> yes
<pq> right
<LaserEyess> no one owns the mutex, so it's waiting on the cond var
<pq> so it is a real deadlock and not just a blocking read.
<LaserEyess> yes
<pq> the way that can happen is that someone does prepare_read, but no raed_events nor cancel_read :-)
<LaserEyess> yes, as you alluded to earlier
<LaserEyess> a very useful hint
<pq> good, so I think you're on to it, and we're on the same page
<LaserEyess> the only other thing that *should* be reading events is QT
<pq> that UpdateInput() function is suspicious for a reason separate from the daedlock you have
<LaserEyess> this KeyboardMouse object here is an emulated device abstraction for e.g. mapping a keyboard/mouse to a controller/wiimote
<LaserEyess> before a game starts, I don't think it needs to read *any* inputs
bilelmoussaoui has joined #wayland
<LaserEyess> I have to confirm that with dolphin devs, though
<pq> if the user stops pressing any keys and moving the mouse, should the game engine freeze until they move and type again? :-)
<LaserEyess> pq: yes, it's continuously polling in another thread, and when it polls it gets the devices lock which prevents dolphin from loading/checking input configs
<LaserEyess> and then the UI cannot proceed in loading
<LaserEyess> something is wrong here, and I suspect it's a subtle combination og wayland API misuse and dolphin cointroller API misuse
<LaserEyess> man I suck at typing
nerdopolis has joined #wayland
<pq> me too
<pq> I didn't quite understand but "continuously polling in another thread" sounds a little odd... depending on what that means exactly.
<pq> is it polling the Wayland socket, and then telling another thread to go call KeyboardMouse::UpdateInput()?
<LaserEyess> there's another thread that polls all inputs for updates
<LaserEyess> no, for dolphin to process keys
<LaserEyess> when it's polling those inputs, it takes the devices lock so no new devices can be added (I think)
<pq> anyway, we are digressing here - these are just theoretical problems and not the deadlock you have
<LaserEyess> yeah
<pq> have fun with breakpoints :-)
<LaserEyess> thanks...
<Compy_> daniels: Yeah, thanks for the tip! I'll pull down the latest main branch of weston and send off a new build. :)
<pq> maybe they change the timings and it won't deadlock...
<LaserEyess> wouldn't that be fun
<pq> threads often are
<LaserEyess> threads are very good when there are like 2 of them, or a threadpool that syncs with only one thread
<LaserEyess> 12 is a nightmare... especially when mo less than 4 are interacting
<tleydxdy> for multithread and wayland, one of the thread need to handle the wayland connection exclusively right?
<emersion> libwayland has a concept of queues
<emersion> for sharing the same wl_display across multiple processes
<emersion> err, threads
<tleydxdy> but there's still a thread that owns the queue?
<emersion> one queue per thread, yeah
<pq> tleydxdy, read a little above, I just explained that.
<emersion> even with 2 threads there's already plenty of potential for headhaches :P
<emersion> headaches*
bilelmoussaoui has quit [Remote host closed the connection]
<pq> Event queues are indeed what allow dispatching events in the correct context, and not from the random thread that happened to read the socket.
<pq> this way all sockets can read, they don't need to tell another thread to read
<tleydxdy> pq: I see so there's a way to tell which event is for which thread?
<pq> err, all threads can read
<pq> tleydxdy, Wayland objects are associated with event queues. Any events for the object is placed into the respective queue.
<emersion> tleydxdy: wl_proxy objects belong to one queue, their thread will get all events for that wl_proxy
<LaserEyess> two threads are fine imo as long as you're not doing silly things like reading and writing to the same resources while using locks
<LaserEyess> but unfortunately, that's exactly what's going on...
<pq> then it's up to the caller to ensure they dispatch the right queue from the right thread, and that the queue assignments are right
<tleydxdy> basically all thread could read from the socket, and they'll put the events into the right queue, then the correct thread can pick up the event from the correct queue
<pq> exactly
rv1sr has joined #wayland
co1umbarius has quit [Ping timeout: 480 seconds]
tlwoerner_ has quit []
tlwoerner has joined #wayland
ybogdano has joined #wayland
Company has joined #wayland
mokee has quit [Remote host closed the connection]
devilhorns has quit [Remote host closed the connection]
devilhorns has joined #wayland
tzimmermann has quit [Quit: Leaving]
columbarius has joined #wayland
ybogdano has quit [Read error: Connection reset by peer]
MajorBiscuit has quit [Ping timeout: 480 seconds]
pochu has quit [Quit: leaving]
<i509VCB> Given that https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/174 has been merged, could we get a 1.28.1 release? I would like to avoid vendoring the protocol with the fix in wayland-rs
mvlad has quit [Remote host closed the connection]
devilhorns has quit []
kts has quit [Quit: Leaving]
q234rty[m][m] has quit [Write error: connection closed]
arichardson[m] has quit [Write error: connection closed]
Joanna[m] has quit [Write error: connection closed]
Guest603 has quit [Write error: connection closed]
underpantsgnome[m] has quit [Write error: connection closed]
ujineli[m] has quit [Write error: connection closed]
jmariondev[m] has quit [Write error: connection closed]
[old]freshgumbubbles[m] has quit [Write error: connection closed]
cb5r[m] has quit [Write error: connection closed]
Naruto[m] has quit [Write error: connection closed]
furyishere[m] has quit [Write error: connection closed]
hex[m]1 has quit [Remote host closed the connection]
zaibon[m] has quit [Remote host closed the connection]
unix-supremacist[m] has quit [Write error: connection closed]
rails[m] has quit [Write error: connection closed]
ttancos[m] has quit [Write error: connection closed]
apol[m] has quit [Write error: connection closed]
xerpi[m] has quit [Write error: connection closed]
robertmader[m] has quit [Write error: connection closed]
ki[m] has quit [Write error: connection closed]
niecoinny[m] has quit [Write error: connection closed]
Max[m]1234 has quit [Write error: connection closed]
teh1[m] has quit [Write error: connection closed]
Guest631 has quit [Write error: connection closed]
windowsxp[m] has quit [Remote host closed the connection]
nazarewk[m] has quit [Remote host closed the connection]
Guest620 has quit [Write error: connection closed]
jasyuiop[m] has quit [Remote host closed the connection]
YaLTeR[m] has quit [Write error: connection closed]
DemiMarie has quit [Write error: connection closed]
toggleton[m] has quit [Write error: connection closed]
hariselldon[m] has quit [Write error: connection closed]
RAOF has quit [Write error: connection closed]
marcusbritanicus[m] has quit [Write error: connection closed]
cmeissl[m] has quit [Write error: connection closed]
botiapa[m] has quit [Write error: connection closed]
rubo_[m] has quit [Write error: connection closed]
qaq[m] has quit [Write error: connection closed]
Bran[m] has quit [Write error: connection closed]
Miepee[m] has quit [Write error: connection closed]
emilio[m]1 has quit [Write error: connection closed]
FbioPacheco[m] has quit [Write error: connection closed]
ehfd[m] has quit [Write error: connection closed]
davidre has quit [Write error: connection closed]
ongy[m] has quit [Write error: connection closed]
gnustomp[m] has quit [Write error: connection closed]
zamundaaa[m] has quit [Write error: connection closed]
Sumera[m] has quit [Write error: connection closed]
ozwald1[m] has quit [Write error: connection closed]
i509VCB has quit [Write error: connection closed]
Ryhon[m] has quit [Write error: connection closed]
Kelseyjgilbert[m] has quit [Write error: connection closed]
jryans has quit [Write error: connection closed]
MatrixTravelerbot[m]1 has quit [Write error: connection closed]
psydroid[m] has quit [Write error: connection closed]
FellFromTheSky[m] has quit [Write error: connection closed]
bluepqnuin has quit [Write error: connection closed]
yshui` has quit [Write error: connection closed]
Nova[m] has quit [Write error: connection closed]
frytaped[m] has quit [Write error: connection closed]
pitsch[m] has quit [Write error: connection closed]
anomalous_creator[m] has quit [Write error: connection closed]
deknos82[m] has quit [Write error: connection closed]
danburd[m] has quit [Write error: connection closed]
vchernin[m] has quit [Write error: connection closed]
diamondburned[m] has quit [Write error: connection closed]
BilalElmoussaoui[m] has quit [Write error: connection closed]
pac85[m] has quit [Write error: connection closed]
GeorgesStavracasfeaneron[m] has quit [Write error: connection closed]
halfline[m] has quit [Write error: connection closed]
heftig has quit [Write error: connection closed]
nielsdg has quit [Write error: connection closed]
Nico has quit [Write error: connection closed]
varlad[m] has quit [Write error: connection closed]
tzx[m] has quit [Write error: connection closed]
smasher_tati[m] has quit [Write error: connection closed]
Shimmy[m] has quit [Write error: connection closed]
q234rty[envs][m] has quit [Write error: connection closed]
RomanGilg[m] has quit [Write error: connection closed]
Levans has quit [Write error: connection closed]
japchae[m] has quit [Write error: connection closed]
j-james[m] has quit [Write error: connection closed]
Poly[m] has quit [Write error: connection closed]
Max1 has quit [Write error: connection closed]
ammen99[m] has quit [Write error: connection closed]
AndrewAylett[m] has quit [Write error: connection closed]
hch12907 has quit [Write error: connection closed]
GrahamPerrin[m] has quit [Write error: connection closed]
inkbottle[m] has quit [Write error: connection closed]
edrex[m] has quit [Write error: connection closed]
d_ed[m] has quit [Write error: connection closed]
drakulix[m] has quit [Write error: connection closed]
cousinofthor[m] has quit [Write error: connection closed]
ambasta[m] has quit [Write error: connection closed]
junglerobba[m] has quit [Write error: connection closed]
bdaase[m] has quit [Write error: connection closed]
tleydxdy has quit [Write error: connection closed]
Mershl[m] has quit [Write error: connection closed]
JosExpsito[m] has quit [Write error: connection closed]
doras has quit [Write error: connection closed]
hasebastian[m] has quit [Write error: connection closed]
DrNick has quit [Write error: connection closed]
ahmadraniri[m] has quit [Write error: connection closed]
Florian[m] has quit [Write error: connection closed]
gschwind has quit [Quit: Leaving]
ahmadraniri[m] has joined #wayland
jgrulich has quit [Remote host closed the connection]
andyrtr has quit [Quit: ZNC 1.8.2 - https://znc.in]
andyrtr has joined #wayland
doublesaiko has joined #wayland
Narrat has joined #wayland
dblsaiko has quit [Remote host closed the connection]
<wlb> weston Issue #687 opened by Thi Garlet (garlett) Kiosk: Client application not displaying https://gitlab.freedesktop.org/wayland/weston/-/issues/687
doublesaiko has left #wayland [#wayland]
dblsaiko has joined #wayland
dblsaiko has quit [Quit: WeeChat 3.5]
rasterman has quit [Quit: Gettin' stinky!]
danvet has quit [Ping timeout: 480 seconds]
Narrat has quit []
ahmadraniri[m] has quit [Remote host closed the connection]
dcz_ has quit [Ping timeout: 480 seconds]
ahmadraniri[m] has joined #wayland
ybogdano has joined #wayland
co1umbarius has joined #wayland
jmdaemon has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
rv1sr has quit []
d_ed has joined #wayland
ybogdano has quit [Read error: Connection reset by peer]
ybogdano has joined #wayland
hardening has quit [Ping timeout: 480 seconds]
rasterman has joined #wayland