![듀얼 스크롤 휠 마우스가 스크롤 휠이 하나만 있는 것처럼 동작하는 이유는 무엇입니까?](https://linux55.com/image/106661/%EB%93%80%EC%96%BC%20%EC%8A%A4%ED%81%AC%EB%A1%A4%20%ED%9C%A0%20%EB%A7%88%EC%9A%B0%EC%8A%A4%EA%B0%80%20%EC%8A%A4%ED%81%AC%EB%A1%A4%20%ED%9C%A0%EC%9D%B4%20%ED%95%98%EB%82%98%EB%A7%8C%20%EC%9E%88%EB%8A%94%20%EA%B2%83%EC%B2%98%EB%9F%BC%20%EB%8F%99%EC%9E%91%ED%95%98%EB%8A%94%20%EC%9D%B4%EC%9C%A0%EB%8A%94%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
나는 2개의 스크롤 휠과 5개의 "버튼"(가운데 첫 번째 스크롤 휠의 "클릭" 버튼을 포함하여 3개)과 왼쪽 및 오른쪽 버튼(아래 그림의 어두운 부분)이 있는 광학 GreatEye 휠마우스를 가지고 있습니다. 출력이 xinput --list-props
올바른 것 같습니다둘 다스크롤 휠이 버튼 6과 7에 작동하는 두 번째 버튼 대신 버튼 4와 5처럼 작동하는 이유는 무엇입니까?어떻게 해결할 수 있나요?(두 번째 스크롤 휠을 수평 스크롤 휠처럼 작동하게 하려면)?
위 사진의 출처는 다음과 같습니다.A4 기술웹사이트
출력. xinput list-props #
여기서 #은 올바른 장치 ID입니다.
Device 'ImExPS/2 Generic Explorer Mouse':
Device Enabled (142): 1
Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (269): 0
Device Accel Constant Deceleration (270): 1.000000
Device Accel Adaptive Deceleration (271): 1.000000
Device Accel Velocity Scaling (272): 10.000000
Device Product ID (261): 2, 6
Device Node (262): "/dev/input/event1"
Evdev Axis Inversion (273): 0, 0
Evdev Axes Swap (275): 0
Axis Labels (276): "Rel X" (152), "Rel Y" (153), "Rel Horiz Wheel" (267), "Rel Vert Wheel" (268)
Button Labels (277): "Button Left" (145), "Button Middle" (146), "Button Right" (147), "Button Wheel Up" (148), "Button Wheel Down" (149), "Button Horiz Wheel Left" (150), "Button Horiz Wheel Right" (151), "Button Side" (265), "Button Extra" (266), "Button Unknown" (264), "Button Unknown" (264), "Button Unknown" (264), "Button Unknown" (264)
Evdev Scrolling Distance (278): 1, 1, 1
Evdev Middle Button Emulation (279): 0
Evdev Middle Button Timeout (280): 50
Evdev Third Button Emulation (281): 0
Evdev Third Button Emulation Timeout (282): 1000
Evdev Third Button Emulation Button (283): 3
Evdev Third Button Emulation Threshold (284): 20
Evdev Wheel Emulation (285): 0
Evdev Wheel Emulation Axes (286): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (287): 10
Evdev Wheel Emulation Timeout (288): 200
Evdev Wheel Emulation Button (289): 4
Evdev Drag Lock Buttons (290): 0
두 스크롤 휠을 모두 사용하여 xev
표시된 이벤트가 동일하다는 것을 알았습니다. 나에게 이것은 커널/모듈 문제임을 암시합니다. 저는 백포트와 함께 Debian "Jessie"를 사용하고 있습니다. 후자는 현재 다음과 같은 것을 사용하고 있음을 의미합니다 uname -a
.
Linux XXXXX 4.9.0-0.bpo.1-rt-amd64 #1 SMP PREEMPT RT Debian 4.9.2-2~bpo8+1 (2017-01-26) x86_64 GNU/Linux
추측적인 가설로서 나는 알고 싶습니다. (실제로 둘 이상의 쥐를 가지고 있는 쥐의 수가 한정되어 있다는 점을 감안할 때)진짜스크롤 휠) 이것이 실제로 커널과 관련되어 있을 가능성이 있습니까? 그렇다면 보충 답변으로 문제가 무엇인지에 대한 자세한 정보를 어디서 찾을 수 있습니까?
업데이트: 다음과 같은 이유로 내가 틀렸을 수도 있습니다.
Evdev Wheel Emulation Axes (286): 0, 0, 4, 5
해야 한다:
Evdev Wheel Emulation Axes (286): 6, 7, 4, 5
하지만 xinput set-props # 286 6 7 4 5
#을 올바른 ID 번호로 변경하는 것만으로는 아무런 변화가 없습니다 ...
이상하게도 grep
내 /var/log/Xorg.0.log
파일을 -ping하면 다음이 생성됩니다.
[ 46.173] (II) config/udev: Adding input device ImExPS/2 Generic Explorer Mouse (/dev/input/event1)
[ 46.173] (**) ImExPS/2 Generic Explorer Mouse: Applying InputClass "evdev pointer catchall"
[ 46.173] (**) ImExPS/2 Generic Explorer Mouse: Applying InputClass "evdev pointer catchall"
[ 46.173] (II) Using input driver 'evdev' for 'ImExPS/2 Generic Explorer Mouse'
[ 46.173] (**) ImExPS/2 Generic Explorer Mouse: always reports core events
[ 46.173] (**) evdev: ImExPS/2 Generic Explorer Mouse: Device: "/dev/input/event1"
[ 46.173] (--) evdev: ImExPS/2 Generic Explorer Mouse: Vendor 0x2 Product 0x6
[ 46.173] (--) evdev: ImExPS/2 Generic Explorer Mouse: Found 9 mouse buttons
[ 46.173] (--) evdev: ImExPS/2 Generic Explorer Mouse: Found scroll wheel(s)
[ 46.173] (--) evdev: ImExPS/2 Generic Explorer Mouse: Found relative axes
[ 46.173] (--) evdev: ImExPS/2 Generic Explorer Mouse: Found x and y relative axes
[ 46.173] (II) evdev: ImExPS/2 Generic Explorer Mouse: Configuring as mouse
[ 46.173] (II) evdev: ImExPS/2 Generic Explorer Mouse: Adding scrollwheel support
[ 46.173] (**) evdev: ImExPS/2 Generic Explorer Mouse: YAxisMapping: buttons 4 and 5
[ 46.173] (**) evdev: ImExPS/2 Generic Explorer Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 46.173] (II) XINPUT: Adding extended input device "ImExPS/2 Generic Explorer Mouse" (type: MOUSE, id 9)
[ 46.174] (II) evdev: ImExPS/2 Generic Explorer Mouse: initialized for relative axes.
[ 46.174] (**) ImExPS/2 Generic Explorer Mouse: (accel) keeping acceleration scheme 1
[ 46.174] (**) ImExPS/2 Generic Explorer Mouse: (accel) acceleration profile 0
[ 46.174] (**) ImExPS/2 Generic Explorer Mouse: (accel) acceleration factor: 2.000
[ 46.174] (**) ImExPS/2 Generic Explorer Mouse: (accel) acceleration threshold: 4
[ 46.174] (II) config/udev: Adding input device ImExPS/2 Generic Explorer Mouse (/dev/input/mouse0)
한 줄이 포함되어 있지만 YAxisMapping: buttons 4 and 5
해당하는 내용은 없습니다 XAxisMapping: buttons 6 and 7
. 이는 암시적입니다...
노트:(코멘트에 대한 응답) PS/2 커넥터 마우스이므로 USB 관련 진단은 아마도 도움이 되지 않을 것입니다.
패키지를 설치 한 후 evtest
두 롤러의 이벤트가 동일 type 2 (EV_REL)
하지만 code 8 (EV_WHEEL)
첫 번째 휠에는 value 1
또는 -1
(두 개의 반대 방향으로 이동하기 위해)이 있지만 두 번째 휠에는 value 2
또는 이 있는 것을 확인했습니다 -2
. 흥미롭게도 사용 중에 일부 응용 프로그램에서 두 번째 스크롤 휠이 스크롤 동작을 생성하는 것을 발견한 것을 기억합니다.두 배첫 번째만큼 큽니다. 일부 코드가 값을 "방향"이 아닌 이동량으로 잘못 해석하는 것처럼 들리기 시작했습니다!
답변1
이것을 알아차린 것 같다열 다섯여러 해 전에! 며칠(2002년 7월 17-18일)에 걸쳐 Linux 커널 메일링 목록에 게시된 "PS2 입력 코어 지원"이라는 제목의 일련의 게시물은 이 문제가 알려져 있지만 구체적으로 처리할 수 있는 방법이 여러 가지 있음을 나타냅니다. 제품의 경우 동일한 데이터를 처리하기 위해 수동 모듈 매개변수를 사용해야 할 수도 있습니다. 그러나 이것은 결코 결실을 맺지 못한 것 같습니다. 자세한 내용은 보시는 것이 가장 좋습니다이것우편 엽서:
...
문제는 A4Tech 드라이버가 신경쓰지 않는다는 것이다. 이것은 내가 설명한 대로 들어오는 데이터를 해석합니다. +-1은 수직 이동, +-2는 수평 이동, 0은 이동 없음, 다른 모든 것은 무시됩니다. 이것은 A4Tech의 ImPS/2에 대한 설명입니다. ExPS/2 프로토콜.
따라서 GPM처럼 휠 움직임은 +-1만 가능하다고 가정할 수 있으므로 +-2가 수평 움직임이라고 안전하게 가정할 수 있으며 그러면 모든 것이 정상이거나 마우스 드라이버 동작에 영향을 미치는 몇 가지 옵션이 필요합니다.
내 모든 (A4Tech...) PS/2 휠 마우스는 10Hz 샘플링 속도에서도 +-1 휠 움직임만 보고하지만 내 마우스가 ExPS/2로 달성할 수 있는 대표적인 샘플이라고 생각하지 않습니다.
아니요, 일반 ImPS/2 및 ExPS/2 마우스는 실제로 1보다 큰 휠 동작 값을 보고할 수 있습니다.
몇 가지 경험적 방법을 사용하거나(3개의 움직임을 본 적이 있습니까? 그렇다면 A4Tech 마우스가 아닙니다...) 명령줄 인수를 사용할 수 있습니다.
나는 A4Tech 마우스 몇 개를 꺼내서 약간 고문하여 특정 시퀀스에 반응하는지 확인해야겠다고 생각했습니다...
또 다른 점은 버튼을 사용하여 스크롤 휠을 구별하는 USB A4Tech 마우스입니다. 반면 USB 사양은 마우스에 두 개의 스크롤 휠을 지정합니다. :(. 그러나 최소한 감지는 가능합니다.
--
Vojtech Pavlik
SuSE 연구소
그래서 저는 몇 가지 커널 해킹을 수행하고 ./drivers/input/mouse/psmouse_base.c
활성화되었을 때 문제를 해결하기 위해 마우스에서 읽은 데이터를 손상시키는 모듈 인수를 추가할 것입니다.psmouse_type
PSMOUSE_IMEX
글쎄, 이제 나에게 맞는 것이 있어 Linux 커널 입력 그룹 영역에 게시했습니다.입력: psmouse - A4Tech 듀얼 휠 마우스의 두 번째 스크롤 휠 수정하지만 소수의 사용자에게만 작동하기 때문에 추가될지는 확실하지 않습니다. 패치는 매우 사소하지만 PS/2와 호환되지 않는 다른 마우스의 동작을 수정하기 때문에 마우스 프로토콜은 기본적으로 보다 일반적인 방식으로 활성화되지 않습니다. 모듈로서, 현재 시스템에서 사용되는 모든 것을 통해 활성화할 수 있습니다. 데모의 경우 option psmouse a4tech_hack=1
먼저 해킹을 비활성화하십시오.modules.conf
evtest
stephen@Ripley:~$ sudo modprobe psmouse options a4tech_hack=0 stephen@Ripley:~$ sudo evtest --grab /dev/input/event1 Input driver version is 1.0.1 Input device ID: bus 0x11 vendor 0x2 product 0x6 version 0x0 Input device name: "ImExPS/2 Generic Explorer Mouse" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 272 (BTN_LEFT) Event code 273 (BTN_RIGHT) Event code 274 (BTN_MIDDLE) Event code 275 (BTN_SIDE) Event code 276 (BTN_EXTRA) Event type 2 (EV_REL) Event code 0 (REL_X) Event code 1 (REL_Y) Event code 6 (REL_HWHEEL) Event code 8 (REL_WHEEL) Properties: Property type 0 (INPUT_PROP_POINTER) Testing ... (interrupt to exit) Event: time 1511190325.037494, type 2 (EV_REL), code 8 (REL_WHEEL), value -1 Event: time 1511190325.037494, -------------- SYN_REPORT ------------ Event: time 1511190325.069545, type 2 (EV_REL), code 8 (REL_WHEEL), value -1 Event: time 1511190325.069545, -------------- SYN_REPORT ------------ Event: time 1511190325.103279, type 2 (EV_REL), code 8 (REL_WHEEL), value -1 Event: time 1511190325.103279, -------------- SYN_REPORT ------------ Event: time 1511190325.360609, type 2 (EV_REL), code 8 (REL_WHEEL), value -1 Event: time 1511190325.360609, -------------- SYN_REPORT ------------ Event: time 1511190325.754597, type 2 (EV_REL), code 8 (REL_WHEEL), value -2 Event: time 1511190325.754597, -------------- SYN_REPORT ------------ Event: time 1511190326.226203, type 2 (EV_REL), code 8 (REL_WHEEL), value 2 Event: time 1511190326.226203, -------------- SYN_REPORT ------------ Event: time 1511190326.335886, type 2 (EV_REL), code 8 (REL_WHEEL), value -2 Event: time 1511190326.335886, -------------- SYN_REPORT ------------ Event: time 1511190326.420238, type 2 (EV_REL), code 8 (REL_WHEEL), value -2 Event: time 1511190326.420238, -------------- SYN_REPORT ------------ Event: time 1511190326.849670, type 2 (EV_REL), code 8 (REL_WHEEL), value -2 Event: time 1511190326.849670, -------------- SYN_REPORT ------------
그런 다음 활성화한 후 값이 +/-2인 REL_WHEEL 이벤트가 이제 어떻게 REL_HWHEEL 이벤트에 올바르게 매핑되는지 확인합니다.
stephen@Ripley:~$ sudo modprobe -r psmouse stephen@Ripley:~$ sudo modprobe psmouse options a4tech_hack=1 stephen@Ripley:~$ sudo evtest --grab /dev/input/event1 Input driver version is 1.0.1 Input device ID: bus 0x11 vendor 0x2 product 0x6 version 0x0 Input device name: "ImExPS/2 Generic Explorer Mouse" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 272 (BTN_LEFT) Event code 273 (BTN_RIGHT) Event code 274 (BTN_MIDDLE) Event code 275 (BTN_SIDE) Event code 276 (BTN_EXTRA) Event type 2 (EV_REL) Event code 0 (REL_X) Event code 1 (REL_Y) Event code 6 (REL_HWHEEL) Event code 8 (REL_WHEEL) Properties: Property type 0 (INPUT_PROP_POINTER) Testing ... (interrupt to exit) Event: time 1511190624.369531, type 2 (EV_REL), code 8 (REL_WHEEL), value 1 Event: time 1511190624.369531, -------------- SYN_REPORT ------------ Event: time 1511190625.580824, type 2 (EV_REL), code 8 (REL_WHEEL), value -1 Event: time 1511190625.580824, -------------- SYN_REPORT ------------ Event: time 1511190626.139235, type 2 (EV_REL), code 8 (REL_WHEEL), value 1 Event: time 1511190626.139235, -------------- SYN_REPORT ------------ Event: time 1511190626.419281, type 2 (EV_REL), code 8 (REL_WHEEL), value -1 Event: time 1511190626.419281, -------------- SYN_REPORT ------------ Event: time 1511190626.693413, type 2 (EV_REL), code 8 (REL_WHEEL), value 1 Event: time 1511190626.693413, -------------- SYN_REPORT ------------ Event: time 1511190628.506133, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1 Event: time 1511190628.506133, -------------- SYN_REPORT ------------ Event: time 1511190628.669774, type 2 (EV_REL), code 6 (REL_HWHEEL), value -1 Event: time 1511190628.669774, -------------- SYN_REPORT ------------ Event: time 1511190628.921986, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1 Event: time 1511190628.921986, -------------- SYN_REPORT ------------ Event: time 1511190628.970915, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1 Event: time 1511190628.970915, -------------- SYN_REPORT ------------ Event: time 1511190629.235774, type 2 (EV_REL), code 6 (REL_HWHEEL), value -1 Event: time 1511190629.235774, -------------- SYN_REPORT ------------ Event: time 1511190629.425575, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1 Event: time 1511190629.425575, -------------- SYN_REPORT ------------ Event: time 1511190629.475333, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1 Event: time 1511190629.475333, -------------- SYN_REPORT ------------ Event: time 1511190629.668506, type 2 (EV_REL), code 6 (REL_HWHEEL), value -1 Event: time 1511190629.668506, -------------- SYN_REPORT ------------ Event: time 1511190629.730081, type 2 (EV_REL), code 6 (REL_HWHEEL), value -1 Event: time 1511190629.730081, -------------- SYN_REPORT ------------ Event: time 1511190629.862513, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1 Event: time 1511190629.862513, -------------- SYN_REPORT ------------ Event: time 1511190629.909745, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1 Event: time 1511190629.909745, -------------- SYN_REPORT ------------ Event: time 1511190630.139196, type 2 (EV_REL), code 6 (REL_HWHEEL), value -1 Event: time 1511190630.139196, -------------- SYN_REPORT ------------