移动鼠标时无法滚动 - Win10 上的 Fedora 28 VM 来宾

Vin*_* C. 5 fedora virtual-machine windows mouse peripherals

我在这里问我的问题之前已经搜索了一段时间,但仍然找不到任何答案。

我注意到鼠标滚动在 Linux 上通常处理得不好(可能只是 Gnome tho)。

我在 Windows 10 主机下的 VirtualBox VM 上运行我的 Fedora 28。我注意到当鼠标不动时,使用鼠标滚轮滚动效果很好,但是每当我开始移动它时,滚动根本不起作用,直到鼠标再次不动为止。

你们中有人知道如何在移动鼠标时使其工作吗?我错过了一些配置还是什么?

我必须承认我不是一个可靠的 Linux 用户,我对外围设备配置了解不多。

fox*_*337 2

我发现了这个线程\n https://bbs.archlinux.org/viewtopic.php?id=223470

\n\n

基本上,如果我xev | grep -e "ButtonPress" -e "ButtonRelease"在滚动时运行并将鼠标移到窗口上,我可以清楚地看到事件,这意味着这是桌面环境/窗口管理器问题。

\n\n

人们在这里讨论有关该问题的更多信息https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues/9

\n\n

firefox如果我只是从终端启动,我会在移动鼠标时遇到滚动事件被忽略的情况,但如果我这样做GDK_CORE_DEVICE_EVENTS=1 firefox,那么一切都会按预期进行。

\n\n

https://forums.virtualbox.org/viewtopic.php?f=3&t=79002&start=15上的线程包含来自 bugmenot 用户的更有趣的回复:

\n\n

运行xinput应该显示 X 认为正在发送事件的设备:

\n\n
$ xinput \n\xe2\x8e\xa1 Virtual core pointer                          id=2    [master pointer  (3)]\n\xe2\x8e\x9c   \xe2\x86\xb3 Virtual core XTEST pointer                id=4    [slave  pointer  (2)]\n\xe2\x8e\x9c   \xe2\x86\xb3 VirtualBox mouse integration              id=9    [slave  pointer  (2)]\n\xe2\x8e\x9c   \xe2\x86\xb3 VirtualBox USB Tablet                     id=10   [slave  pointer  (2)]\n\xe2\x8e\x9c   \xe2\x86\xb3 ImExPS/2 Generic Explorer Mouse           id=12   [slave  pointer  (2)]\n\xe2\x8e\xa3 Virtual core keyboard                         id=3    [master keyboard (2)]\n    \xe2\x86\xb3 Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]\n    \xe2\x86\xb3 Power Button                              id=6    [slave  keyboard (3)]\n    \xe2\x86\xb3 Sleep Button                              id=7    [slave  keyboard (3)]\n    \xe2\x86\xb3 Video Bus                                 id=8    [slave  keyboard (3)]\n    \xe2\x86\xb3 AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]\n
Run Code Online (Sandbox Code Playgroud)\n\n

VirtualBox mouse integration显然,鼠标事件在和设备之间划分VirtualBox USB Tablet。其中一个接收移动事件,而另一个接收滚动事件。在某些应用程序中,一旦事件源变为活动状态,另一个事件源就会被忽略。

\n\n

解决方案是VirtualBox mouse integration暂时禁用(上面的列表中的 id=9)

\n\n
xinput disable 9\n
Run Code Online (Sandbox Code Playgroud)\n\n

或者完全通过添加文件来完成,例如/usr/share/X11/xorg.conf.d/50-vbox-mouse-fix.conf

\n\n
Section "InputClass"\n        Identifier "Fix VBox scroll wheel"\n        MatchProduct "VirtualBox mouse integration"\n        Option "Ignore" "on"\nEndSection\n
Run Code Online (Sandbox Code Playgroud)\n\n

(该MatchProduct指令正是 的字符串输出xinput)。

\n