Index | Thread | Search

From:
yaydn@protonmail.com
Subject:
Re: Testing: wayland monitor hotplug
To:
"Kirill A. Korinsky" <kirill@korins.ky>
Cc:
"ports@openbsd.org" <ports@openbsd.org>
Date:
Sat, 09 Aug 2025 06:00:02 +0000

Download raw body.

Thread
På fredag 8. august 2025 kl. 01:36, Kirill A. Korinsky
<kirill@korins.ky> skrev:

> On Fri, 08 Aug 2025 00:59:04 +0200,
> yaydn@protonmail.com wrote:
> 
> > Secondary mice and keyboards needed a
> > 
> > doas chown youruser:your /dev/wsmouse1
> > doas chown youruser:your /dev/wskbd1
> > 
> > respectively before starting a startsway.sh, disconnecting and
> > reconnecting these did not work until logging out and back in again.
> > 
> > I have these chown commands in my /etc/rc.local to have this applied
> > every boot.
> 
> 
> Why do you apply it each boot?
> 
> I do have:
> 
> ~ $ cat /upgrade.site
> [...]
> echo Recover access to webcams for user catap
> echo 'chown catap /dev/video*' >>/etc/rc.firsttime
> 
> [...]
> ~ $
> 
> which rewert access after each upgrade.
> 
> --
> wbr, Kirill

For a lot of stuff, using the ttyC0 or the first tty is sufficient, but
secondary mice, keyboards, and webcams need chown reapplied at some
point. You might be right that it only needs to be after sysupgrade's
and that /etc/rc.firsttime is more than sufficient. I specifically
automated the chowning with /etc/rc.local as my touchpad is wonky and
need a secondary mouse.

I could be wrong though. As long as the user can access the
/dev/dri/card0 or whichever gpu and input before startsway.sh starts I
think you are okay. mathieu@, volker@, or someone actively working on
the guts of the graphical components in base is probably the one to ask
for the current interactions of security, wlroots based compositors, and
what is default provided by ttyC0 and which settings to change if you
want to use another ttyC#.

I don't have a webcam, so I can't fully comment, but I think you can
chown that after startsway.sh, like a cd/dvd/bluray drive or rsd#c of a
usb drive for qemu raw access or the like.

The secondary or tertiary and so on input need user access prior to
startsway.sh, as they do not yet have hotplug in wlroots based
compositors (window managers[WM] or desktop environments[DE]) on
OpenBSD. Sway and other wayland compositors will fail to start if they
cannot access the gpu with the user level permissions.

I'd be happy to be wrong. For all I know there is some greeter in wip or
my experience dogfooding has been superseded by some advancement or is
woefully incomplete.

I hope this info is helpful to some experimenting with wayland on
OpenBSD. Someone more qualified might correct any erroneous notions.

--
yaydn

Postscript: Sorry for the late replies, I have been a little under the
weather.