Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jun 2022 09:37:55 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Cejka Rudolf <cejkar@fit.vutbr.cz>
Cc:        Emmanuel Vadot <manu@bidouilliste.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Reasons for keeping sc(4) and libvgl ?
Message-ID:  <CANCZdfoty7HGTk81QLLKTj_Sq7N1oQ%2BQG1sYzBrQJo97X59pWQ@mail.gmail.com>
In-Reply-To: <YrQZjFaxkXW5sE4d@fit.vut.cz>
References:  <20211126160454.3eb827365a02103169ab9adc@bidouilliste.com> <YaSV2CeuWWsMjy33@fit.vutbr.cz> <YrQZjFaxkXW5sE4d@fit.vut.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000070543505e21f3d4d
Content-Type: text/plain; charset="UTF-8"

On Thu, Jun 23, 2022 at 1:44 AM Cejka Rudolf <cejkar@fit.vutbr.cz> wrote:

> Hello,
>   so is there any solution for problem below now?
>
> Cejka Rudolf wrote (2021/11/29):
> > Hello,
> >   I have one problem or two with VT in FreeBSD 12. I wrote a question in
> > freebsd-stable what to do, but without response, so I still have to
> > use SC. Please, could you look at it? There is not configured device
> > /dev/console without monitor after upgrade from 11 to 12 and device
> > /dev/kbdmux0 is busy using VT but not with SC.
> >
> > Subject: Unable to grab keyboard with VT on a headless node in stable/12
> >
> > Hello,
> >   I have a headless node without monitor and without keyboard. There
> > is just network and USB card reader in keyboard mode.
> >
> > In stable/11, there was no problem to disconnect USB card reader
> > from kbdmux using kbdcontrol -A ukbd0 < /dev/console and open
> > /dev/ukbd0 in a program.
> >
> > However, under stable/12 it works just with connected monitor.
> >
> > Without monitor, there is an error:
> >
> > # kbdcontrol < /dev/console
> > -bash: /dev/console: Device not configured
> >
> > Furthermore with default VT, it is also impossible to use /dev/kbdmux0:
> >
> > # kbdcontrol < /dev/kbdmux0
> > -bash: /dev/kbdmux0: Device busy
> >
> > I have found a workaround using SC, where it is possible to atleast
> > open /dev/kbdmux0 and use kbdcontrol -A ukbd0 < /dev/kbdmux0, but why
> > keyboard operation is now dependend on connected monitor? And why VT
> > does not allow to open /dev/kbdmux0?
> >
> > Thank you.
>

Have you filed a bug for this? This looks like a legit bug and one that
should be easy(ish) to reproduce.
Or at least it looks that way on the surface, there might be a pilot error
as well that just happened to
work before and needs a slightly different workaround to what you are
doing...

And it's an actual monitor connected that's the only difference? Or is this
some KVM switch that's
connected, so there's an atkbd in the mix somewhere? What's the difference
in dmesg between
these two boots? Is this with EFI or legacy BIOS boot?

'Not conifgured' is ENXIO which is returned when /dev/console isn't there
(eg, no /dev/console), which
seems weird in the extreme. And it's 'bash' that's giving the message,
which means kbdcontrol isn't
even getting invoked. A dmesg with bootverbose would be most enligtening.

And I'm also a little confused, detach ukbd0 from a usb card reader? That's
an interesting setup. While
it won't affect whether or not this is a bug, I'd be interested to know
more details there...

Warner

--00000000000070543505e21f3d4d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jun 23, 2022 at 1:44 AM Cejka=
 Rudolf &lt;<a href=3D"mailto:cejkar@fit.vutbr.cz">cejkar@fit.vutbr.cz</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello=
,<br>
=C2=A0 so is there any solution for problem below now?<br>
<br>
Cejka Rudolf wrote (2021/11/29):<br>
&gt; Hello,<br>
&gt;=C2=A0 =C2=A0I have one problem or two with VT in FreeBSD 12. I wrote a=
 question in<br>
&gt; freebsd-stable what to do, but without response, so I still have to<br=
>
&gt; use SC. Please, could you look at it? There is not configured device<b=
r>
&gt; /dev/console without monitor after upgrade from 11 to 12 and device<br=
>
&gt; /dev/kbdmux0 is busy using VT but not with SC.<br>
&gt; <br>
&gt; Subject: Unable to grab keyboard with VT on a headless node in stable/=
12<br>
&gt; <br>
&gt; Hello,<br>
&gt;=C2=A0 =C2=A0I have a headless node without monitor and without keyboar=
d. There<br>
&gt; is just network and USB card reader in keyboard mode.<br>
&gt; <br>
&gt; In stable/11, there was no problem to disconnect USB card reader<br>
&gt; from kbdmux using kbdcontrol -A ukbd0 &lt; /dev/console and open<br>
&gt; /dev/ukbd0 in a program.<br>
&gt; <br>
&gt; However, under stable/12 it works just with connected monitor.<br>
&gt; <br>
&gt; Without monitor, there is an error:<br>
&gt; <br>
&gt; # kbdcontrol &lt; /dev/console<br>
&gt; -bash: /dev/console: Device not configured<br>
&gt; <br>
&gt; Furthermore with default VT, it is also impossible to use /dev/kbdmux0=
:<br>
&gt; <br>
&gt; # kbdcontrol &lt; /dev/kbdmux0<br>
&gt; -bash: /dev/kbdmux0: Device busy<br>
&gt; <br>
&gt; I have found a workaround using SC, where it is possible to atleast<br=
>
&gt; open /dev/kbdmux0 and use kbdcontrol -A ukbd0 &lt; /dev/kbdmux0, but w=
hy<br>
&gt; keyboard operation is now dependend on connected monitor? And why VT<b=
r>
&gt; does not allow to open /dev/kbdmux0?<br>
&gt; <br>
&gt; Thank you.<br></blockquote><div><br></div><div>Have you filed a bug fo=
r this? This looks like a legit bug and one that should be easy(ish) to rep=
roduce.</div><div>Or at least it looks that way on the surface, there might=
 be a pilot error as well that just happened to</div><div>work before and n=
eeds a slightly different workaround to what you are doing...</div><div><br=
></div><div>And it&#39;s an actual monitor connected that&#39;s the only di=
fference? Or is this some KVM switch that&#39;s</div><div>connected, so the=
re&#39;s an atkbd in the mix somewhere? What&#39;s the difference in dmesg =
between</div><div>these two boots? Is this with EFI or legacy BIOS boot?</d=
iv><div><br></div><div>&#39;Not conifgured&#39; is ENXIO which is returned =
when /dev/console isn&#39;t there (eg, no /dev/console), which</div><div>se=
ems weird in the extreme. And it&#39;s &#39;bash&#39; that&#39;s giving the=
 message, which means kbdcontrol isn&#39;t</div><div>even getting invoked. =
A dmesg with bootverbose=C2=A0would be most enligtening.</div><div><br></di=
v><div>And I&#39;m also a little confused, detach ukbd0 from a usb card rea=
der? That&#39;s an interesting setup. While</div><div>it won&#39;t affect w=
hether or not this is a bug, I&#39;d be interested to know more details the=
re...</div><div><br></div><div>Warner</div><div><br></div></div></div>

--00000000000070543505e21f3d4d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoty7HGTk81QLLKTj_Sq7N1oQ%2BQG1sYzBrQJo97X59pWQ>