03:08 hays: hey all what could be causing SDL init to fail due to no video device
03:16 bl4ckb0ne: thats probably a SDL issue, but it looks like it fails to init the wayland video driver for whatever reason
03:19 soreau: maybe WAYLAND_DISPLAY isn't set or something
03:20 bl4ckb0ne: yeah my bet is on failure to get the display
03:31 hays: wayland_display is set
03:33 hays: wayland-1
03:34 soreau: is XDG_RUNTIME_DIR also set?
03:35 hays: to /var/run
03:35 soreau: did you check the WAYLAND_DEBUG output?
03:36 hays: how woudl i do that
03:36 bl4ckb0ne: WAYLAND_DEBUG=1 when launching your bin
03:38 hays: no additional output
03:39 hays: for what its worth, mpv also does same thing.. sdl init fails
03:39 soreau: this probably means it's trying to use x11 path
03:40 hays: x11 is not installed
03:40 hays: this is from console
03:43 soreau: did you build sdl yourself? maybe it's missing wayland support
03:44 hays: --enable-video-wayland
03:45 hays: its compiled with wayland support. looking at log now
17:35 nielsdg: sure, was just mentioning it couldn't violate a spec it didn't implement in the first place
20:24 hays: what are reasons one would get a "connection refused" from wayland?
20:25 bl4ckb0ne: failed to connect to the display
20:37 hays: yeah im trying to figur eout why its not connecting to the display
20:38 hays: connect(6, {sa_family=AF_UNIX, sun_path="/var/run/wayland-1"}, 21) = -1 ECONNREFUSED (Connection refused)
20:45 bl4ckb0ne: permissions maybe
20:49 mjt: it means it is not listening
20:50 mjt: permission denied will return different error
20:51 hays: mjt: why wouldn't it be listening?
21:03 mjt: well, it's your system, no? I've no idea
21:03 mjt: I just said what this error means
21:05 mjt: ECONNREFUSED
21:05 mjt: A connect() on a stream socket found no one listening on the remote address.
21:06 hays: is wayland a daemon that needs to be running?
21:06 hays: sorry very new to this
21:07 bl4ckb0ne: a compositor needs to be running yes
21:07 hays: such as sway
21:07 hays: the above error is from sway
21:07 mjt: /var/run/wayland-1 is a strange name for a wayland socket
21:08 mjt: usually it is /run/user/$UID/wayland-0
21:08 i509VCB: There can be multiple servers running at the same time
21:08 mjt: and?
21:09 i509VCB: You'll typically have the WAYLAND_DISPLAY set to the socket name for the client to use
21:09 mjt: which resolves to a socket in $XDG_RUNTIME_DIR
21:10 i509VCB: Hmm yeah that's odd
21:10 mjt: it's very unlikely that XDG_RUNTIME_DIR is /var/run
21:10 mjt: it smells it is not set up correctly and have some default value
21:11 mjt: if it's after sudo/su, it kind of explains things but still it's not the right value for XDG_RUNTIME_DIR
21:13 hays: XDG_RUNTIME_DIR=/var/run
21:13 mjt: sure it is
21:13 hays: there is a patch applied to allow wayland to run as root
21:14 mjt: it's not the right value for it
21:14 hays: https://github.com/batocera-linux/batocera.linux/blob/master/package/batocera/display/sway/000-allow-running-as-root.patch
21:14 mjt: allow running *sway* as root
21:15 hays: sorry yews
21:15 hays: yes
21:15 mjt: where's your sway listening?
21:15 hays: what do you mean? right now say fails to launch
21:15 mjt: find its pid and do lsof -p $pid
21:15 hays: sway fails to launch with the error
21:15 mjt: heh
21:16 hays: sorry i said that but maybe it was missed
21:17 mjt: so do you have $WAYLAND_DISPLAY set *before* starting sway?
21:17 mjt: it is sway should should set this variable, fwiw
21:17 hays: WAYLAND_DISPLAY=wayland-1
21:17 mjt: and why do you set it?
21:18 hays: that i do not know
21:18 mjt: heh
21:18 mjt: unset it and try again
21:19 mjt: that's some strange stuff going on really. Setting random stuff to random values.. :)
21:20 hays: yeah im getting into this but i don't know everything
21:21 kennylevinsen: you're running an old version of sway if you need that patch
21:22 hays: mjt: set HDMI-A-2 as primary <-- well this is wrong im plugged into HDMA-A-1
21:22 hays: mjt: sway tried to launch
21:23 mjt: that's a strange patch as well.. why they changed the format of sway socket? there's no need to :)
21:23 kennylevinsen: if sway itself fails to start with a Wayland socket error, then WAYLAND_DISPLAY is erroneously set when starting sway which causes it to run in nested mode.
21:23 mjt: mjt: and why do you set it?
21:23 mjt: :)
21:27 hays: yeah hold on im trying stuff
21:27 kennylevinsen: also note that you are looking for #sway on libera chat, #wayland is for protocol and implementation discussions
21:29 hays: yes thats becoming clearer
22:21 DynamiteDan: Greeting. I am a longtime user of linux, bit never built a a graphical app on it. Could someone provide me with some info (a link) on how to start building native WayLand clients? Thanks in advance
22:48 soreau: you might have a look at https://github.com/emersion/hello-wayland
22:50 soreau: you can also use a toolkit such as gtk, which hides many of the platform details
22:55 DynamiteDan: thanks soreau !
22:56 DynamiteDan: My focus is understanding the Wayland layer :)
22:59 soreau: basically there's libwayland that implements server and client libraries, which facilitate communication across a socket between the two
23:03 DynamiteDan: exactly what I need for my study :)
23:03 DynamiteDan: thank you so much
23:03 soreau: np