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