summaryrefslogtreecommitdiff
path: root/Documentation/driver-api/serial
diff options
context:
space:
mode:
authorlianzhi chang <changlianzhi@uniontech.com>2021-12-15 15:51:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-21 11:19:14 +0300
commitfb09d0ac07725b442b32dbf53f0ab0bea54804e9 (patch)
tree741c893d5004bcc32d56df94c2a3b53ab24b5f9a /Documentation/driver-api/serial
parent34de6666843d47a4564f540574402f621c689ea0 (diff)
downloadlinux-fb09d0ac07725b442b32dbf53f0ab0bea54804e9.tar.xz
tty: Fix the keyboard led light display problem
Use the "ctrl+alt+Fn" key combination to switch the system from tty to desktop or switch the system from desktop to tty. After the switch is completed, it is found that the state of the keyboard lock is inconsistent with the state of the keyboard Led light.The reasons are as follows: * The desktop environment (Xorg and other services) is bound to a tty (assuming it is tty1), and the kb->kbdmode attribute value of tty1 will be set to VC_OFF. According to the current code logic, in the desktop environment, the values of ledstate and kb->ledflagstate of tty1 will not be modified anymore, so they are always 0. * When switching between each tty, the final value of ledstate set by the previous tty is compared with the kb->ledflagstate value of the current tty to determine whether to set the state of the keyboard light. The process of switching between desktop and tty is also the process of switching between tty1 and other ttys. There are two situations: - (1) In the desktop environment, tty1 will not set the ledstate, which will cause when switching from the desktop to other ttys, if the desktop lights up the keyboard's led, after the switch is completed, the keyboard's led light will always be on; - (2) When switching from another tty to the desktop, this mechanism will trigger tty1 to set the led state. If other tty lights up the led of the keyboard before switching to the desktop, the led will be forcibly turned off. This situation should be avoided. * The current patch is to solve these problems: When VT is switched, the keyboard led needs to be set once.Ensure that after the switch is completed, the state of the keyboard LED is consistent with the state of the keyboard lock. Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: lianzhi chang <changlianzhi@uniontech.com> Link: https://lore.kernel.org/r/20211215125125.10554-1-changlianzhi@uniontech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/driver-api/serial')
0 files changed, 0 insertions, 0 deletions