Surface Type Cover not detected by dpkg-reconfigure keyboard-configuration

Bug #1858090 reported by Daniel Tang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
console-setup (Ubuntu)
New
Undecided
Unassigned

Bug Description

keyboard-configuration does not detect a Surface Type Cover as a keyboard during dpkg-reconfigure. This causes it to skip the dialog and prevents one from configuring the Type Cover.

$ lsb_release -rd

Description: Ubuntu 19.10
Release: 19.10

$ apt-cache policy keyboard-configuration
keyboard-configuration:
  Installed: 1.191ubuntu3
  Candidate: 1.191ubuntu3
  Version table:
 *** 1.191ubuntu3 500
        500 http://ubuntu.mirror.rafal.ca/ubuntu eoan/main amd64 Packages
        100 /var/lib/dpkg/status

What I expected to happen:

# dpkg-reconfigure keyboard-configuration

[I get prompted with an interactive dialog asking me to configure the keyboard]

What happened instead:

# dpkg-reconfigure keyboard-configuration

Your console font configuration will be updated the next time your system
boots. If you want to update it now, run 'setupcon' from a virtual console.
update-initramfs: deferring update (trigger activated)

[...]

[The expected dialog doesn't show up, and it goes straight to rebuilding the boot image]

Workaround:

Plug in a standalone USB Keyboard before running the command.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: amd64
CurrentDesktop: KDE
DistroRelease: Ubuntu 19.10
Package: console-setup 1.191ubuntu3
PackageArchitecture: all
ProcVersionSignature: Ubuntu 5.3.0-24.26-generic 5.3.10
Tags: eoan
Uname: Linux 5.3.0-24-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: dialout kvm plugdev sudo systemd-journal wireshark
_MarkForUpload: True

Revision history for this message
Daniel Tang (daniel-z-tg) wrote : ConsoleSetup.txt

apport information

tags: added: apport-collected eoan
description: updated
Revision history for this message
Daniel Tang (daniel-z-tg) wrote : Dependencies.txt

apport information

Revision history for this message
Daniel Tang (daniel-z-tg) wrote : Keyboard.txt

apport information

Revision history for this message
Daniel Tang (daniel-z-tg) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Daniel Tang (daniel-z-tg) wrote : ProcEnviron.txt

apport information

Revision history for this message
Daniel Tang (daniel-z-tg) wrote :

Analysis:

This is caused by keyboard-configuration trying and failing to detect a keyboard.

It detects my USB keyboard using InterfaceClass 03, InterfaceSubClass 01, and InterfaceProtocol 01 in /sys/bus/usb/devices/ .
It detects the built-in keyboard on my other computer using "AT Set" in /proc/bus/input/devices .
However it does not detect the Surface Type Keyboard ('N: Name="Microsoft Surface Type Cover Keyboard"') in /proc/bus/input/devices .

The problem is in the keyboard_present() function of line 36230 of /var/lib/dpkg/info/keyboard-configuration.config .

Revision history for this message
Daniel Tang (daniel-z-tg) wrote :

After making the keyboard detection search pattern for /proc/bus/input/devices more generic, dpkg-reconfigure keyboard-configuration works. The patch is attached.

Revision history for this message
Daniel Tang (daniel-z-tg) wrote :
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "keyboard-configuration.config.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.