Force update keyboard LEDs after calling EnableDevice to fix its hardware state after VT switching

Bug #1993621 reported by Yao Wei
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
New
Undecided
Unassigned
X.Org X server
New
Unknown
xorg-server (Ubuntu)
Fix Released
Undecided
Yao Wei
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

 * This change will force update keyboard LED status after calling EnableDevice, in order to resolve LED status not syncing after switching VT to a X session.

 * This also fixes the issue with NVIDIA driver and Xorg, that after resuming from suspend the keyboard LED is always off.

[ Test Plan ]

1. Log onto an GNOME Xorg session (KDE Kwin worked this issue around)

2. Turn on NumLock on the keyboard

3. Use Ctrl-Alt-F3 to switch to a text console, then Ctrl-Alt-F2 to switch back to desktop

NumLock LED should be on after switching back to the desktop

[ Where problems could occur ]

 * The changes are to push status to the device when enabling it regardless of actual keyboard state change, therefore switching between VTs and adding/removing keyboard/mouse/xinput devices should be affected by this change.

[ Original Report ]

Switching virtual terminals [Ctrl-Alt-F1 - F7] to a X session turns off keyboard LEDs.

This issue is reproducible on 2:21.1.3-2ubuntu2.1 (on 22.04)

To reproduce:
1. Log on a X session desktop (GNOME Xorg for example)
2. Turn on NumLock
3. Use Ctrl-Alt-F3 to switch to a text console, then Ctrl-Alt-F2 to switch back to desktop

Expected:
NumLock LED should be on

Actual:
NumLock LED is off, but functions like NumLock is on. If NumLock is pressed the LED turns off as well as the function. If CapsLock is pressed the LED states sync back (LED turns back on).

Yao Wei (medicalwei)
description: updated
tags: added: oem-priority originate-from-1991265 somerville
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Might be related to bug 1247668.

tags: added: jammy
Revision history for this message
Qian Fu (qian-fu) wrote :

bug 1247668 was reported on 2013. However, this issue is not observed with Ubuntu20.04, only Ubuntu 22.04.

Revision history for this message
Yao Wei (medicalwei) wrote :

Related MP for this issue, however the MP does not fix the issue, and we are proposing a similar patch: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/764

Changed in xorg-server:
status: Unknown → New
Yao Wei (medicalwei)
summary: - Switching virtual terminals [Ctrl-Alt-F1 - F7] to a X session turns off
- keyboard LEDs
+ Force update keyboard LEDs after calling EnableDevice to fix its state
+ after VT switching
Revision history for this message
Yao Wei (medicalwei) wrote : Re: Force update keyboard LEDs after calling EnableDevice to fix its state after VT switching

Attached is the debdiff for the following Merge Request merged upstream:
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1070

Please review

description: updated
description: updated
summary: - Force update keyboard LEDs after calling EnableDevice to fix its state
- after VT switching
+ Force update keyboard LEDs after calling EnableDevice to fix its
+ hardware state after VT switching
Revision history for this message
Yao Wei (medicalwei) wrote :
Revision history for this message
Yao Wei (medicalwei) wrote :
Yao Wei (medicalwei)
Changed in xorg-server (Ubuntu):
status: New → In Progress
assignee: nobody → Yao Wei (medicalwei)
status: In Progress → New
Yao Wei (medicalwei)
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

sorry, I didn't notice you had debdiffs here already, so I prepared the uploads myself.. anyway, j/k/l all uploaded

Changed in xorg-server (Ubuntu):
status: New → In Progress
Changed in xorg-server (Ubuntu Jammy):
status: New → In Progress
Changed in xorg-server (Ubuntu Kinetic):
status: New → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Yao, or anyone else affected,

Accepted xorg-server into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server/2:21.1.4-2ubuntu1.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xorg-server (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in xorg-server (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Yao, or anyone else affected,

Accepted xorg-server into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server/2:21.1.3-2ubuntu2.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xorg-server (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (xorg-server/2:21.1.4-2ubuntu1.6)

All autopkgtests for the newly accepted xorg-server (2:21.1.4-2ubuntu1.6) for kinetic have finished running.
The following regressions have been reported in tests triggered by the package:

nvidia-graphics-drivers-390/390.157-0ubuntu0.22.10.1 (i386)
gnudatalanguage/1.0.1-3maysync1 (amd64)
libsoup3/3.2.0-1 (amd64)
gscan2pdf/2.13.0-1 (amd64)
qlcplus/4.12.5-3 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/kinetic/update_excuses.html#xorg-server

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (xorg-server/2:21.1.3-2ubuntu2.8)

All autopkgtests for the newly accepted xorg-server (2:21.1.3-2ubuntu2.8) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

libaperture-0/0.1.0+git20200908-3 (ppc64el)
aptdaemon/1.1.1+bzr982-0ubuntu39 (amd64)
notify-osd/0.9.35+20.04.20191129-0ubuntu2 (amd64)
nvidia-graphics-drivers-390/390.157-0ubuntu0.22.04.1 (i386)
libsoup3/3.0.7-0ubuntu1 (amd64)
mpv-mpris/0.6-2 (amd64)
openmsx/17.0-1ubuntu3 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#xorg-server

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Yao Wei (medicalwei) wrote :

This issue is verified on 2:21.1.3-2ubuntu2.8 on jammy, that switching from text terminal to X session the keyboard LED status would recover.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:21.1.7-1ubuntu2

---------------
xorg-server (2:21.1.7-1ubuntu2) lunar; urgency=medium

  * patches: Force update LEDs after device state update. (LP: #1993621)

 -- Timo Aaltonen <email address hidden> Tue, 21 Feb 2023 17:08:20 +0200

Changed in xorg-server (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Yao Wei (medicalwei) wrote :

This issue is also verified on 2:21.1.4-2ubuntu1.6 on kinetic

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

the nvidia autopkgtest failures are due to linux-doc not being installable on i386 anymore, the others passed now

Timo Aaltonen (tjaalton)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:21.1.4-2ubuntu1.6

---------------
xorg-server (2:21.1.4-2ubuntu1.6) kinetic; urgency=medium

  * patches: Force update LEDs after device state update. (LP: #1993621)

 -- Timo Aaltonen <email address hidden> Tue, 21 Feb 2023 17:17:27 +0200

Changed in xorg-server (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for xorg-server has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:21.1.3-2ubuntu2.8

---------------
xorg-server (2:21.1.3-2ubuntu2.8) jammy; urgency=medium

  * patches: Force update LEDs after device state update. (LP: #1993621)

 -- Timo Aaltonen <email address hidden> Tue, 21 Feb 2023 18:01:37 +0200

Changed in xorg-server (Ubuntu Jammy):
status: Fix Committed → Fix Released
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.