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
rasterman has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
adia4 has joined #wayland
adia has quit [Remote host closed the connection]
jmdaemon has quit [Ping timeout: 480 seconds]
colordrops has joined #wayland
colordro1 has quit [Ping timeout: 480 seconds]
spstarr has quit [Remote host closed the connection]
rasterman has quit [Quit: Gettin' stinky!]
Arnavion has quit [Ping timeout: 480 seconds]
Arnavion has joined #wayland
Seirdy has quit []
colordrops has quit [Ping timeout: 480 seconds]
columbarius has joined #wayland
co1umbarius has quit [Ping timeout: 480 seconds]
jmdaemon has joined #wayland
columbarius has quit [Remote host closed the connection]
cabal704 has quit [Quit: WeeChat 3.4]
evx256 has quit [Remote host closed the connection]
mg_ has joined #wayland
mg_ has quit []
jmdaemon has quit [Ping timeout: 480 seconds]
columbarius has joined #wayland
jmdaemon has joined #wayland
ahartmetz has quit [Quit: Konversation terminated!]
d3x0r has quit [Remote host closed the connection]
Seirdy has joined #wayland
shankaru has joined #wayland
Company has quit [Quit: Leaving]
pounce has joined #wayland
rgallaispou1 has joined #wayland
rgallaispou1 has quit [Read error: Connection reset by peer]
whot has quit [Server closed connection]
whot has joined #wayland
rgallaispou has quit [Ping timeout: 480 seconds]
jmdaemon has quit [Ping timeout: 480 seconds]
rgallaispou has joined #wayland
leandrohrb has quit [Server closed connection]
leandrohrb has joined #wayland
pavan has quit [Ping timeout: 480 seconds]
jmdaemon has joined #wayland
go4godvin has quit [Server closed connection]
go4godvin has joined #wayland
maxzor has joined #wayland
maxzor has quit [Remote host closed the connection]
pnowack has joined #wayland
eroux has joined #wayland
jekstrand has quit [Ping timeout: 480 seconds]
radu2427 has joined #wayland
bim9262 has quit [Ping timeout: 480 seconds]
radu242 has quit [Read error: Connection reset by peer]
<whot>
luyn: i have a toddler at home, so the answer for anthing outside office hours is "dunno, who knows, not me who decides"
<kennylevinsen>
toddlers are the worst room mates
<pq>
kennylevinsen, what was the libseat answer to "I want to run this on VT 5 but I'm executing this via ssh", any doc for that? Just wondering as Weston is preparing to remove all --tty options with the old launchers. Maybe Weston doc should point to something.
jgrulich has quit [Remote host closed the connection]
<kennylevinsen>
pq: seatd always leases out the current VT, so chvt 5
jgrulich has joined #wayland
<kennylevinsen>
(if available that is)
manuel1985 has joined #wayland
<kennylevinsen>
(it would be possible to implement a "start on this specific VT instead" feature, but it is not currently present)
<pq>
alright, thanks
jmabr has joined #wayland
Major_Biscuit has quit []
jgrulich has quit [Remote host closed the connection]
jgrulich has joined #wayland
MajorBiscuit has joined #wayland
<mvlad>
so I guess using that env variable is required until libseatd can basically change vt on its own? Not actually a bug...
<pq>
what env var?
<mvlad>
that SEATD_VTBOUND
<pq>
no, that's a different use case
<kennylevinsen>
SEATD_VTBOUND is meant for CONFIG_VT=n primary seat or secondary seats not tied to VT
<pq>
where I use SEATD_VTBOUND=0, the VT does not exist at all.
<pq>
or, I do not want libseat to touch VT at all, because the VT is not relevant and is used by something else.
<pq>
like on a secondary physical seat
ahartmetz has joined #wayland
<mvlad>
oh, yeah, I see. On my side, I kind of referred that I also need to specify it when attempting start weston over a ssh session.
<pq>
hmm, but then something is wrong - when staring over ssh, we would want libseat to take over the current VT.
<pq>
by default, at least
<kennylevinsen>
you don't need to specify SEATD_VTBOUND when starting weston over ssh, but controlling the VT requires root. seatd-launch is a SUID wrapper for granting that in a weston-launch style, but sudo seatd & (or just having seatd running) will also work
<pq>
SEATD_VTBOUND=0 means it ignores the VT completely, which I expect to break things like VT switching and maybe even leak local input to the VT terminal unexpected.
<kennylevinsen>
we manage VTs in two ways: one is to disable the kernel console keyboard handling (very necessary! otherwise you are still typing into the terminal behind the weston session!), and another is to "pretend" that sessions are tied to VTs by changing VT when we change sesison (this is a lie that consolekit, logind and seatd all tell because it fits with user expectations)
<kennylevinsen>
pq: yup :)
<pq>
Right, so using libseat-builtin as a normal user cannot work when VTs are needed.
jgrulich has quit [Remote host closed the connection]
ppascher has joined #wayland
jgrulich has joined #wayland
<mvlad>
thanks both for clarifying.
flacks has quit [Quit: Quitter]
<luyn>
whot: sorry , i will ask questions on gitlab
flacks has joined #wayland
devilhorns has joined #wayland
jgrulich has quit [Remote host closed the connection]
shankaru has quit [Quit: Leaving.]
jgrulich has joined #wayland
<pq>
kennylevinsen, I just found out I had a couple dozen left-over weston processes stuck inside libseat "open" function in a poll().
<pq>
which is really weird, because from the terminal the always seemed to exit
<kennylevinsen>
hmm, stuck in open is weird
<kennylevinsen>
you don't happen to have a reproduction do you?
<pq>
I have had many attempts where weston fails to start, so likely from those, but the odd thing is I seemed to have returned to the shell, so I assumed the process was dead.
<pq>
well, it's with my secondary seat setup...
<pq>
let me try once more to get you a better picture
<kennylevinsen>
when you see it, can you also check if weston still has a child process (the builtin backend)?
<pq>
I thought I killed amdgpu by weston crashing, but once I SIGKILL'd all those left-overs, I got my amdgpu output back.
<pq>
I didn't see any child processes - unless they inherited weston's cmdline and process name?
<kennylevinsen>
it's a plain fork in the builtin backend
<kennylevinsen>
htop's tree view is usually my goto there
<pq>
in which case maybe they were *all* child processes and the real weston had quit?
<pq>
I use 'ps auxw -H', it's a magic incantation I've picked up ages ago. :-)
<kennylevinsen>
left behind servers could maybe make more sense than the inverse
<kennylevinsen>
if you had the stack trace for one of them that would reveal it
<kennylevinsen>
I don't think anyone knows what the ps arguments mean, we were just all passed down an incantation from our elders :P
<kennylevinsen>
I'm sure ps -elfy vs. ps aux could start wars if it hasn't already
<pq>
with htop, how do I tell which one is a process and which one is a thread?
<pq>
because if all these are processes, there is an awful lot of them
<kennylevinsen>
threads are green and toggled with H
<kennylevinsen>
(shift+h that is)
<pq>
thanks, now htop makes sense
<pq>
ok, so under normal running conditions, I see weston process with one child weston process of identical cmdline
<pq>
as expected
<kennylevinsen>
yeah that sounds fine
<pq>
I quit weston with Ctrl-c, weston shuts down gracefully, and now I have one stray weston process.
<pq>
parented to init
<kennylevinsen>
then that very much sounds like a stuck bulitin seatd process
<kennylevinsen>
can you give me the gdb stack for fun?
<pq>
you know, if this new process does not exec, then CLOEXEC does not happen.
<kennylevinsen>
thanks
<kennylevinsen>
and yes it does not exec, it's a plain fork in the style of the old wlroots "direct" backend
<kennylevinsen>
this is also why I much prefer the newer seatd-launch approach - it doesn't do anything weird in the compositor process, uses libseat's normal "seatd" backend and just starts the plain seatd executable
<kennylevinsen>
but I must admit that it was a troublesome birth - writing something intended for SUID use is an awful experience. :/
<pq>
okay, but I suspect I might have accidentally taken over the VT if I tried that :-)
<pq>
not having permissions to access ttys saved me
<kennylevinsen>
yup, it lacks the vtbound flag as I'm being veeeeery paranoid about env vars
<pq>
so I cannot yet tell it to not take over VT?
<kennylevinsen>
not seatd-launch, but I'm going to add a flag to it soon, someone else asked for it
<pq>
cool
<pq>
I guess looking into why the forked process does not exist would still be good?
<pq>
*exit
<kennylevinsen>
absolutely, I'm taking a look as we speak
<kennylevinsen>
it uses a PDEATHSIG to get SIGTERM sent once its parent dies, so either that didn't work or it stupidly ignored its signal
<pq>
the stray process does not react to a normal killall, nor even to killall -QUIT
<pq>
looks like SIGTERM is the default, and it doesn't exit on that
<pq>
weston might block all those signals before it calls into libseat, btw., since weston uses signalfd
<pq>
block or ignore, whichever is appropriate with signalfd
<pq>
and those are inherited on fork() I believe, maybe even on exec()
<pq>
kennylevinsen, btw. don't you have a socket open between the two processes? Doesn't that read as ERRHUP or something when the other end dies?
<pq>
kennylevinsen, confirmed, weston will block TERM, INT, QUIT and CHLD before it calls into libseat. wl_event_loop_add_signal() does that.
<pq>
and SIGUSR1
<kennylevinsen>
aaaah
<kennylevinsen>
so I just need to restore the signal mask after fork
<pq>
yup, I guess
<pq>
signals...
<kennylevinsen>
I also planned to look into using the socket (from socketpair) for closing instead of the deathsig
<kennylevinsen>
IIRC it was an early decision to avoid changing seatd behavior too much
<kennylevinsen>
(seatd doesn't normally close when children disconnect)
<kennylevinsen>
thanks for debugging :)
<pq>
thanks for working on fixes!
<kennylevinsen>
in the meantime, if this is bugging you: you can start a single seatd instance with SEATD_VTBOUND=0 somewhere, then you don't need builtin
<kennylevinsen>
only need to do this once if you leave it running
<pq>
as a normal user?
<kennylevinsen>
sudo would be easiest, otherwise you need to change the socketpath
<pq>
mmh, but I wouldn't like it to have root permissions
<kennylevinsen>
in that case: SEATD_VTBOUND=0 seatd -s /tmp/seatd.sock, then SEATD_SOCK=/tmp/seatd.sock weston
<kennylevinsen>
should work in recent releases
<pq>
maybe I'll make a systemd --user service for it and forget it even exists :-)
<kennylevinsen>
hah sure
<pq>
thanks!
<pq>
looks like you have removed the -s option
<pq>
luckily I'm not using *that* recent version yet, but git still
<kennylevinsen>
ah, you're using master
<kennylevinsen>
in master I'm trying to clean some of these things up
<kennylevinsen>
but there you will soon have the vt bound option for seatd-launch + a fix for this issue :P
<kennylevinsen>
soon-ish™
<kennylevinsen>
but it's in the stable releases
<pq>
sounds like depending on -s will be break, and I'm happy to use a git version, so maybe I'll just deal with this until you have a fix :-)
<kennylevinsen>
I'll try to expedite the fix then :)
<pq>
and I can test it, too
<pq>
kennylevinsen, btw. maybe you could also change the process name/cmdline in the child process? Would reduce confusion. :-)
<kennylevinsen>
how though? I'm not controlling argv]0 at the time of fork. Also, google is autocompleting my search as "change process name after marriage" which is just leading to further questions :P
<kennylevinsen>
*argv[0]
shankaru has joined #wayland
<emersion>
kennylevinsen: PR_SET_NAME i think?
<kennylevinsen>
why that *does* sound more relvant than the marrital advice google was giving me
<emersion>
hm linux-specific
<pq>
wonder if setting thread name would have the same effect
<pq>
phtread_setname_np
jgrulich has quit [Remote host closed the connection]
jgrulich has joined #wayland
Satan has quit [Remote host closed the connection]
Company has joined #wayland
<kennylevinsen>
pq: the builtin-fix branch seems to do the trick
<kennylevinsen>
PR_SET_NAME didn't do anything though, not sure why
<pq>
alright! let's see
<emersion>
kennylevinsen: there is one quirk with PR_SET_NAME
<emersion>
it will reject names which are too long
<emersion>
the limit is quite low
<pq>
16 chars
<emersion>
including terminating '\0'
<kennylevinsen>
> If the length of the string, including the terminating null byte, exceeds 16 bytes, the string is silently truncated.
<emersion>
ah, my bad then
<emersion>
i remember some trouble with PR_SET_NAME as well
<emersion>
but not sure what i was doing wrong then
<kennylevinsen>
but it would not be the first time in the history of mankind that the docs didn't quite describe the reality of things :P
<kennylevinsen>
I'll try with a shorter name later, was probably over 16 chars
masoudd has quit [Read error: Connection reset by peer]
masoudd has joined #wayland
<pq>
kennylevinsen, meson 0.61.2 warns about -Wl,--exclude-libs=ALL and 'meson.build_root', FYI
<kennylevinsen>
emersion: do you remember where the build_root discussion landed?
<kennylevinsen>
I vaguely remember that you raised a ticket after its deprecation
<emersion>
yeah, there's another function to use now iirc
<emersion>
sway should use it
<kennylevinsen>
ah cool, I'll get that updated then
tlwoerner has quit [Ping timeout: 480 seconds]
<pq>
weston has some new warnings as well
<pq>
from meson
tlwoerner has joined #wayland
MajorBiscuit has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #wayland
<pq>
kennylevinsen, that's interesting... KMS is acting weird, but at least there are no left-over processes.
<pq>
I need to revert and see if libseat has anything to do with it.
tlwoerner_ has joined #wayland
<pq>
kennylevinsen, your branch does definitely fix the stray process.
<pq>
maybe I had a kernel update to boot into, because how the CRTC turns off when Weston quits. It didn't before a reboot.
tlwoerner has quit [Ping timeout: 480 seconds]
<pq>
I mean, the CRTC stays off, rather than coming back with fbdev
<pq>
oh boo, I liked the HDR fbdev :-p
<pq>
...I can actually get the HDR fbdev back by soft-power cycling the monitor, which I supposed is the equivalent of hotplug
<kennylevinsen>
fbdev definitely needs HDR so FB on can get eye-searingly bright :P
<kennylevinsen>
*fbcon
<pq>
luckily I don't have fbcon on this card, only fbdev ;-)
<pq>
I should be booting into 5.15 to see what goodies it has over 5.10
duxsco has joined #wayland
<pq>
eh, does this monitor emit a hotplug when it goes to powersave??
<pq>
damn, looks like I just keep finding more easter eggs on this one
<emersion>
yeah, i've seen more and more of these
<emersion>
that really doesn't make sense to me, but oh well
<pq>
quit weston, monitor says no signal, wait, monitor goes to power save, monitor wakes up with fbdev image
<daniels>
there are some pretty phenomenal things in there
shankaru has quit [Quit: Leaving.]
shankaru has joined #wayland
<emersion>
pq, latest amdgpu should have the cursor rotation prop back
<pq>
no new interesting KMS properties in this kernel upgrade, oh well.
<emersion>
pq, drm_info has no format table, it auto-generates it from drm_fourcc.h
<pq>
emersion, ah, so it was a mistake. Nice to know.
<emersion>
pq, it was… complicated
<pq>
emersion, oh, so a simple rebuild should do?
<emersion>
in theory yes
<daniels>
want global window positioning? call set_geometry(x, y, 0, 0). want to pass random surface flags to the compositor? set your xdg app ID as "flags=stay-on-top|no-focus", then set it as "attrs=alpha:0.5". want the compositor to punch a transparent hole in its output? include (-1,-1) in your surface's opaque region.
<emersion>
amdgpu cursor can't do everything you'd want it to do
<emersion>
daniels: yikes
<daniels>
emersion: yeah, reading through other vendor trees (weston-imx ...) is just depressing thanks to their awful awful hacks. this one though ... there's a lot of creativity involved. I can't figure out if I'm angry or in awe.
<pq>
oh, it probably takes my system libdrm for the formats
pavan has joined #wayland
shankaru has quit []
<pq>
emersion, I think the libdrm.wrap is fixed at 2.4.104? 2.4.110 seems to be out.
<emersion>
pq, i think we should switch to git, instead of using the wrapdb
<pq>
do I need to edit that, or?
<emersion>
oh, we already do that
<emersion>
i completely forgot that we had a version hardcoded there
<emersion>
i wonder if we should update the version, or just trask HEAD
DebianUserMaybe has joined #wayland
<emersion>
track*
<emersion>
also i think the way we do all of these things is going to stop working with future meson versions
<emersion>
so maybe we should just switch to a submodule or something
DebianUserMaybe has quit [Remote host closed the connection]
DebianUserMaybe has joined #wayland
zebrag has joined #wayland
<pq>
XR48, XB48, AR48, AB48, so 16 bpc integer formats were added to amdgpu
<emersion>
maybe we should add a fallback pretty-printing in drm_info
<pq>
would be a nice addition to the hex
DebianUserMaybe has quit [Remote host closed the connection]
DebianUserMaybe has joined #wayland
duxsco has quit [Quit: duxsco]
l4s8g has joined #wayland
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #wayland
MrCooper has quit [Remote host closed the connection]
MrCooper has joined #wayland
Major_Biscuit has joined #wayland
MajorBiscuit has quit [Ping timeout: 480 seconds]
<kennylevinsen>
emersion: so pr_set_name updates /proc/PID/comm but not the command line ps/htop :(
CodeSpelunker has quit [Quit: CodeSpelunker]
bittin has quit [Read error: Connection reset by peer]
l4s8g has quit []
l4s8g has joined #wayland
manuel1985 has quit [Remote host closed the connection]
manuel1985 has joined #wayland
jgrulich has quit [Ping timeout: 480 seconds]
l4s8g has quit [Remote host closed the connection]
l4s8g has joined #wayland
l4s8g_ has joined #wayland
l4s8g has quit [Ping timeout: 480 seconds]
l4s8g has joined #wayland
l4s8g has quit []
l4s8g has joined #wayland
l4s8g_ has quit [Ping timeout: 480 seconds]
immibis has quit [Ping timeout: 480 seconds]
l4s8g has quit []
<daniels>
don't you have to change argv?
l4s8g has joined #wayland
colordrops has joined #wayland
<kennylevinsen>
Yeah but we're forking nowhere near main()
duxsco has joined #wayland
Major_Biscuit has quit [Ping timeout: 480 seconds]
l4s8g has quit []
l4s8g has joined #wayland
<zebrag>
My usb Cherry g84-4400 integrated trackball works most of the time, but sometimes it doesn't. It seems software related. I have no clue at all on how to address the problem.
l4s8g has quit [Remote host closed the connection]
devilhorns has quit []
l4s8g has joined #wayland
l4s8g has quit []
shankaru has joined #wayland
masoudd has quit [Ping timeout: 480 seconds]
duxco has joined #wayland
duxsco has quit [Ping timeout: 480 seconds]
duxco is now known as duxsco
tlwoerner_ has quit []
tlwoerner has joined #wayland
immibis has joined #wayland
shankaru has quit [Quit: Leaving.]
immibis has quit [Read error: Connection reset by peer]
l4s8g has joined #wayland
immibis has joined #wayland
___nick___ has joined #wayland
l4s8g has quit [Ping timeout: 480 seconds]
___nick___ has quit []
ecloud has quit [Ping timeout: 480 seconds]
___nick___ has joined #wayland
___nick___ has quit []
___nick___ has joined #wayland
ecloud has joined #wayland
l4s8g has joined #wayland
macc24 has quit [Ping timeout: 480 seconds]
ecloud has quit [Ping timeout: 480 seconds]
ecloud has joined #wayland
cabal704 has joined #wayland
jmdaemon has joined #wayland
hergertme_ has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
Satan has joined #wayland
l4s8g has quit [Ping timeout: 480 seconds]
l4s8g has joined #wayland
l4s8g has quit [Remote host closed the connection]
l4s8g has joined #wayland
immibis has quit [Remote host closed the connection]
immibis has joined #wayland
Lucretia-backup has quit [Read error: Connection reset by peer]