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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 13 08:50:00 +0000 2024
>Last-Modified:  Sat Jan 13 14:45:01 +0000 2024
>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:

>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

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.