Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 2016 01:10:23 +0100
From:      Polytropon <freebsd@edvax.de>
To:        "Luis P. Mendes" <luislupe@gmx.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: kbdmux disabled --> no useable keyboard?!
Message-ID:  <20160218011023.8519212d.freebsd@edvax.de>
In-Reply-To: <20160217164414.GA73442@hp.tbl>
References:  <20160217164414.GA73442@hp.tbl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Feb 2016 16:44:14 +0000, Luis P. Mendes wrote:
> (Due to change of hardware and OS I lost the original messages, but
> will paste the context)
> 
> On 2015.11.25 Polytropon wrote:
> > On Tue, 24 Nov 2015 23:23:56 +0000, Luis P. Mendes wrote:
> > >   Hi,
> > >
> > >   I'm setting up a multiseat workstation, where two users, with two
> > >   monitors, two keyboards, two mice and two X sessions can be
> > >   connected to the same computer at the same time.
> > >
> > >   For this to happen, one of the things that is necessary to do is to
> > >   disable kbdmux in order for the two keyboards to be considered
> > >   independent.
> > >
> > >   In the past, I've accomplished this with syscon, which had other
> > >   problems.  But now with vt, when I disable kbdmux either on
> > >   /boot/device.hints or in /boot/loader.conf with:
> > >     hint.kbdmux.0.disabled="1"
> > >
> > >   No keys are recognized by the OS, although dmesg seems to know about
> > >   the existence of the USB keyboard.
> >
> > You need to manually transfer the control of one keyboard to the
> > other - from the "active" to the "inactive" one (to become the
> > "active" one). Use the kbdcontrol program to do this, "man kbdcontrol"
> > has more information about the -k option.
> >
> > This of course only works when kbdmux is disabled.
> 
> Only now, could I return to this project.
> 
> The steps I've taken:
> 1. Have an USB keyboard attached to the motherboard.  No serial keyboard used.

The AT keyboard isn't a typical serial keyboard. A Sun keyboard is. ;-)



> 2. In /boot/loader.conf, have these lines added:
>     ukbd_load="YES"
>     hint.kbdmux.0.disabled="1"
>     hint.atkbd.0.disabled="1"
>     hint.atkbdc.0.disabled="1"

I don't know if disabling the AT keyboard controller is useful here.
If no keyboard is attached, the device will stay present. But if an
USB keyboard is being used anyway, this should not matter.



> 3. In /etc/rc.conf.local:
>     kbdcontrol -k /dev/ukbd0 < /dev/console

That should go to /etc/rc.local. Note that /etc/rc.conf.local is a
configuration file (in the style of /etc/rc.conf) that's being sourced
additionally; see "man rc" and "man rc.conf" for details.



> 4. In /var/log/messages, there are these lines:
>     kernel: ukbd0: <USB Keyboard> on usbus0
>     kernel: kbd0 at ukbd0
> 
> 5. # ll /dev/uk*
>      crw-------  1 root  wheel  0x7f 15 Fev 22:39 /dev/ukbd0
> 
> 6. # ls -l /dev/kb*
>      lrwxr-xr-x  1 root  wheel  5 15 Fev 22:39 /dev/kbd0 -> ukbd0

For comparison: With an AT and a USB keyboard both operational,
the following results will be present:

% ll /dev/*kbd*
crw-------  1 root  wheel    0,  55 2016-02-17 19:30:58 /dev/atkbd0
lrwxr-xr-x  1 root  wheel         6 2016-02-17 19:30:58 /dev/kbd0@ -> atkbd0
lrwxr-xr-x  1 root  wheel         7 2016-02-17 19:30:58 /dev/kbd1@ -> kbdmux0
lrwxr-xr-x  1 root  wheel         5 2016-02-17 19:31:10 /dev/kbd2@ -> ukbd0
crw-------  1 root  wheel    0,  10 2016-02-17 19:30:58 /dev/kbdmux0
crw-------  1 root  wheel    0, 150 2016-02-17 19:31:10 /dev/ukbd0

In this case, kbdmux is active. If it was not, the both keyboards
should be identified as kbd0 (atkbd0) and kbd1 (ukbd0).

As you can see from your kernel message, the device has been picked
up and recognized correctly, and the required device links have been
established.



> But I can't type anything in the (virtual) console.  I'm not
> considering X yet.

And you are _totally sure_ the keyboard works?



> I don't understand what exactly is meant as example in the manual of
> kbdcontrol, so cannot find what is wrong with this.
> Would appreciate some help on this.

You have been using the correct command for switching to a specific
keyboard (as quoted above).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160218011023.8519212d.freebsd>