저는 GUI가 없는 Raspbian 10(buster)을 사용하고 있습니다. 그러다가 X 서버를 설치해서 하나 만들었는데 startx
, 키보드의 키를 눌러도 그림과 같이 화면에 아무런 효과가 없습니다.이 사진.
키보드를 연결하면 다음과 같이 쓰여져 /var/log/Xorg.0.log
키보드가 실제로 인식되었음을 나타냅니다.
[ 2121.984] (II) config/udev: Adding input device Logitech USB Keyboard System Control (/dev/input/event2)
[ 2121.984] (**) Logitech USB Keyboard System Control: Applying InputClass "libinput keyboard catchall"
[ 2121.984] (II) Using input driver 'libinput' for 'Logitech USB Keyboard System Control'
[ 2121.986] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 26 paused 0
[ 2121.986] (**) Logitech USB Keyboard System Control: always reports core events
[ 2121.986] (**) Option "Device" "/dev/input/event2"
[ 2121.986] (**) Option "_source" "server/udev"
[ 2121.995] (II) event2 - Logitech USB Keyboard System Control: is tagged by udev as: Keyboard
[ 2121.995] (II) event2 - Logitech USB Keyboard System Control: device is a keyboard
[ 2121.995] (II) event2 - Logitech USB Keyboard System Control: device removed
[ 2121.996] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.1/0003:046D:C31C.0008/input/input11/event2"
[ 2121.996] (II) XINPUT: Adding extended input device "Logitech USB Keyboard System Control" (type: KEYBOARD, id 6)
[ 2121.996] (**) Option "xkb_model" "logitech_base"
[ 2121.996] (**) Option "xkb_layout" "us"
[ 2121.996] (WW) Option "xkb_variant" requires a string value
[ 2121.996] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[ 2122.003] (II) event2 - Logitech USB Keyboard System Control: is tagged by udev as: Keyboard
[ 2122.003] (II) event2 - Logitech USB Keyboard System Control: device is a keyboard
[ 2122.044] (II) config/udev: Adding input device Logitech USB Keyboard (/dev/input/event0)
[ 2122.044] (**) Logitech USB Keyboard: Applying InputClass "libinput keyboard catchall"
[ 2122.044] (II) Using input driver 'libinput' for 'Logitech USB Keyboard'
[ 2122.046] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 30 paused 0
[ 2122.046] (**) Logitech USB Keyboard: always reports core events
[ 2122.046] (**) Option "Device" "/dev/input/event0"
[ 2122.046] (**) Option "_source" "server/udev"
[ 2122.053] (II) event0 - Logitech USB Keyboard: is tagged by udev as: Keyboard
[ 2122.053] (II) event0 - Logitech USB Keyboard: device is a keyboard
[ 2122.054] (II) event0 - Logitech USB Keyboard: device removed
[ 2122.054] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:046D:C31C.0007/input/input9/event0"
[ 2122.054] (II) XINPUT: Adding extended input device "Logitech USB Keyboard" (type: KEYBOARD, id 7)
[ 2122.054] (**) Option "xkb_model" "logitech_base"
[ 2122.054] (**) Option "xkb_layout" "us"
[ 2122.054] (WW) Option "xkb_variant" requires a string value
[ 2122.054] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[ 2122.062] (II) event0 - Logitech USB Keyboard: is tagged by udev as: Keyboard
[ 2122.062] (II) event0 - Logitech USB Keyboard: device is a keyboard
[ 2122.065] (II) config/udev: Adding input device Logitech USB Keyboard Consumer Control (/dev/input/event1)
[ 2122.065] (**) Logitech USB Keyboard Consumer Control: Applying InputClass "libinput keyboard catchall"
[ 2122.065] (II) Using input driver 'libinput' for 'Logitech USB Keyboard Consumer Control'
[ 2122.162] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 31 paused 0
[ 2122.162] (**) Logitech USB Keyboard Consumer Control: always reports core events
[ 2122.162] (**) Option "Device" "/dev/input/event1"
[ 2122.162] (**) Option "_source" "server/udev"
[ 2122.169] (II) event1 - Logitech USB Keyboard Consumer Control: is tagged by udev as: Keyboard
[ 2122.169] (II) event1 - Logitech USB Keyboard Consumer Control: device is a keyboard
[ 2122.169] (II) event1 - Logitech USB Keyboard Consumer Control: device removed
[ 2122.170] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.1/0003:046D:C31C.0008/input/input10/event1"
[ 2122.170] (II) XINPUT: Adding extended input device "Logitech USB Keyboard Consumer Control" (type: KEYBOARD, id 8)
[ 2122.170] (**) Option "xkb_model" "logitech_base"
[ 2122.170] (**) Option "xkb_layout" "us"
[ 2122.170] (WW) Option "xkb_variant" requires a string value
[ 2122.170] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[ 2122.177] (II) event1 - Logitech USB Keyboard Consumer Control: is tagged by udev as: Keyboard
[ 2122.178] (II) event1 - Logitech USB Keyboard Consumer Control: device is a keyboard
또한 모니터가 절전 모드로 전환되고 ESC 키를 누르면 키보드가 깨어나기 때문에 키보드가 인식되고 있는 것 같습니다. Ctrl+Alt+도 작동합니다(tty를 변경할 수 있음).
이렇게 하면 xinit
같은 일이 일어날 것입니다.
다음 관련 패키지를 설치했습니다.
ii x11-xserver-utils 7.7+8 armhf X server utilities
ii xserver-common 2:1.20.4-1+rpt1 all common files used by various X servers
ii xserver-xorg 1:7.7+19+b8 armhf X.Org X server
ii xserver-xorg-core 2:1.20.4-1+rpt1 armhf Xorg X server - core server
ii xserver-xorg-input-all 1:7.7+19+b8 armhf X.Org X server -- input driver metapackage
ii xserver-xorg-input-libinput 0.28.2-2 armhf X.Org X server -- libinput input driver
ii xserver-xorg-input-wacom 0.34.99.1-1+b6 armhf X.Org X server -- Wacom input driver
ii xserver-xorg-legacy 2:1.20.4-1+rpt1 armhf setuid root Xorg server wrapper
ii xserver-xorg-video-all 1:7.7+19+b8 armhf X.Org X server -- output driver metapackage
ii xserver-xorg-video-amdgpu 18.1.99+git20190207-1 armhf X.Org X server -- AMDGPU display driver
ii xserver-xorg-video-ati 1:19.0.1-1 armhf X.Org X server -- AMD/ATI display driver wrapper
ii xserver-xorg-video-fbdev 1:0.5.0-1+b2 armhf X.Org X server -- fbdev display driver
ii xserver-xorg-video-nouveau 1:1.0.16-1 armhf X.Org X server -- Nouveau display driver
ii xserver-xorg-video-radeon 1:19.0.1-1 armhf X.Org X server -- AMD/ATI Radeon display driver
ii xserver-xorg-video-vesa 1:2.4.0-1+b1 armhf X.Org X server -- VESA display driver
내가 볼 수 있듯이 이벤트는 실제로 생성됩니다 showkey
.
어떤 아이디어가 있나요?
답변1
귀하의 키보드는 작동하지만 X 응용 프로그램에 초점이 없을 수 있습니다. 이 시도. ~/.xinitrc에 줄을 추가합니다(파일이 없으면 생성).
xterm &
이는 startx에게 시작 시 명령을 실행하도록 지시합니다. 거기에 입력해 보세요. 작동하지 않고 마우스가 있는 경우 xterm 창을 클릭하고 다시 입력하십시오. 마우스가 없으면 Alt-tab을 눌러 입력할 수 있는지 확인하세요.