NetBSD Problem Report #57844
From www@netbsd.org Sat Jan 13 08:48:16 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id CE4601A9239
for <gnats-bugs@gnats.NetBSD.org>; Sat, 13 Jan 2024 08:48:16 +0000 (UTC)
Message-Id: <20240113084814.DDA641A923A@mollari.NetBSD.org>
Date: Sat, 13 Jan 2024 08:48:14 +0000 (UTC)
From: bbartlomiej.mail@gmail.com
Reply-To: bbartlomiej.mail@gmail.com
To: gnats-bugs@NetBSD.org
Subject: wscons doesn't support encoding=pl contrary to wskbd(4) man page
X-Send-Pr-Version: www-1.0
>Number: 57844
>Category: kern
>Synopsis: wscons doesn't support encoding=pl contrary to wskbd(4) man page
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 13 08:50:00 +0000 2024
>Closed-Date: Tue Oct 13 18:00:51 +0000 2026
>Last-Modified: Tue Oct 13 18:00:51 +0000 2026
>Originator: Bartlomiej Krawczyk
>Release: 10.0RC2
>Organization:
>Environment:
NetBSD netbsd.sol 10.0_RC2 NetBSD 10.0_RC2 (GENERIC) #0: Mon Jan 1 14:04:52 UTC 2024 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
While trying to set encoding to wscons I get:
netbsd# wsconsctl -k -w encoding=pl
wsconsctl: WSKBDIO_SETENCODING: Invalid argument
The same had been set by uncommenting the font and encoding in /etc/wscons.conf:
netbsd# grep -v "#" wscons.conf
font latin2 - 16 iso /usr/share/wscons/fonts/latin2.816
screen 1 - vt100
screen 2 - vt100
screen 3 - vt100
screen 4 - -
encoding pl
But the font seems to be loading just fine:
netbsd# wsfontload -l
Boldface 8x16
Boldface 16x32 16x32
latin2 8x16
wskbd(4) man page lists "pl" as a supported encoding and mentions pckbd(4) and ukbd(4) should support all of them. I'm using ukbd:
netbsd# dmesg | grep wskbd
[ 3,042702] wskbd0 at ukbd0: console keyboard
[ 3,052702] wskbd1 at ukbd1 mux 1
[ 5,162707] wskbd2 at ukbd2 mux 1
[ 7,662713] wsdisplay0 at radeondrmkmsfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
[ 7,682713] wskbd1: connecting to wsdisplay0
[ 7,712714] wskbd2: connecting to wsdisplay0
Is "pl" encoding actually supported or am I doing something wrong?
Setting "uk", "us" or "de" encodings with wsconsctl works just fine:
netbsd# wsconsctl -k -w encoding=de
encoding -> de
netbsd# wsconsctl -k -w encoding=uk
encoding -> uk
netbsd# wsconsctl -k -w encoding=pl
wsconsctl: WSKBDIO_SETENCODING: Invalid argument
netbsd# wsconsctl -k -w encoding=us
encoding -> us
>How-To-Repeat:
Try setting encoding=pl in wscons on NetBSD 10.0RC2
>Fix:
>Release-Note:
>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/57844: wscons doesn't support encoding=pl contrary to wskbd(4) man page
Date: Sat, 13 Jan 2024 10:06:35 -0000 (UTC)
bbartlomiej.mail@gmail.com writes:
>While trying to set encoding to wscons I get:
>netbsd# wsconsctl -k -w encoding=pl
>wsconsctl: WSKBDIO_SETENCODING: Invalid argument
While wscons knows that a polish encoding may exist, the keyboard
drivers for USB or PS/2 don't have a suitable descriptor table
for a polish layout.
The only keyboard driver that knows KB_PL seems to be for
the Amiga keyboard.
wskbd however supports a user keyboard map. I don't know the
details of the polish layout, but it should be possible to
construct it "manually" that way.
From: RVP <rvp@SDF.ORG>
To: gnats-bugs@netbsd.org
Cc: Michael van Elst <mlelstv@serpens.de>
Subject: Re: kern/57844: wscons doesn't support encoding=pl contrary to
wskbd(4) man page
Date: Sat, 13 Jan 2024 10:30:59 +0000 (UTC)
On Sat, 13 Jan 2024, bbartlomiej.mail@gmail.com wrote:
> While trying to set encoding to wscons I get:
> netbsd# wsconsctl -k -w encoding=pl
> wsconsctl: WSKBDIO_SETENCODING: Invalid argument
>
Dup of PR #57234.
Try loading a custom keymap. NetBSD has one for XT/AT keyboards. That PR
has my attempt at a PL layout for USB keyboards.
-RVP
From: Bartlomiej Krawczyk <bbartlomiej.mail@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/57844: wscons doesn't support encoding=pl contrary to
wskbd(4) man page
Date: Sat, 13 Jan 2024 15:41:26 +0100
On 13.01.2024 11:10, Michael van Elst wrote:
> While wscons knows that a polish encoding may exist, the keyboard
> drivers for USB or PS/2 don't have a suitable descriptor table
> for a polish layout.
>
> The only keyboard driver that knows KB_PL seems to be for
> the Amiga keyboard.
>
> wskbd however supports a user keyboard map. I don't know the
> details of the polish layout, but it should be possible to
> construct it "manually" that way.
Thanks Michael,
I planned to engage a bit more and that seems like a not too difficult
task. I guess I can base on existing maps. I will try to look into it in
following weeks.
--
Regards,
Bartlomiej Krawczyk
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57844 CVS commit: src/sys/dev
Date: Sat, 24 May 2025 16:50:54 +0000
Module Name: src
Committed By: nia
Date: Sat May 24 16:50:54 UTC 2025
Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c
Log Message:
wskbd(4): Define USB and PS/2 keymaps for KB_PL
This is the de-facto standard "Polish programmers" QWERTY keyboard,
what X11 simply calls "Polish". It's a simple variation of US QWERTY
with some extra characters when right alt is pressed.
Defining this layout is slightly optimistic, since even with latin-2
fonts loaded and the appropriate locale set, wscons seems to struggle
to input most of these characters.
Regardless, this allows the supposedly supported "pl" encoding
to not fail loading with an error message, and allows X11 to
auto-detect the keyboard layout (defining KB_PL and as an alias of
KB_US also accomplishes this goal), with room for proper UTF-8
support in the future.
PR port-amd64/57234 "# wsconsctl -k -w encoding=pl" *should* work.
PR kern/57844 wscons doesn't support encoding=pl contrary to wskbd(4) man page
PR install/58405 Selecting Polish keyboard type in sysinst is useless
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pckbport/wskbdmap_mfii.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57844 CVS commit: [netbsd-10] src/sys/dev
Date: Mon, 20 Oct 2025 14:03:00 +0000
Module Name: src
Committed By: martin
Date: Mon Oct 20 14:03:00 UTC 2025
Modified Files:
src/sys/dev/hid [netbsd-10]: hidkbdmap.c
src/sys/dev/pckbport [netbsd-10]: wskbdmap_mfii.c
Log Message:
Pull up following revision(s) (requested by nia in ticket #1180):
sys/dev/hid/hidkbdmap.c: revision 1.16
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.36
wskbd(4): Define USB and PS/2 keymaps for KB_PL
This is the de-facto standard "Polish programmers" QWERTY keyboard,
what X11 simply calls "Polish". It's a simple variation of US QWERTY
with some extra characters when right alt is pressed.
Defining this layout is slightly optimistic, since even with latin-2
fonts loaded and the appropriate locale set, wscons seems to struggle
to input most of these characters.
Regardless, this allows the supposedly supported "pl" encoding
to not fail loading with an error message, and allows X11 to
auto-detect the keyboard layout (defining KB_PL and as an alias of
KB_US also accomplishes this goal), with room for proper UTF-8
support in the future.
PR port-amd64/57234 "# wsconsctl -k -w encoding=pl" *should* work.
PR kern/57844 wscons doesn't support encoding=pl contrary to wskbd(4) man page
PR install/58405 Selecting Polish keyboard type in sysinst is useless
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.4.1 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/dev/pckbport/wskbdmap_mfii.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: nia@NetBSD.org
State-Changed-When: Tue, 13 Oct 2026 18:00:51 +0000
State-Changed-Why:
this is fixed, thanks for the report
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.