使用gnome-shell在ubuntu 17.04上启用自然滚动

我已经在ubuntu 17.04上安装了gnome-shell并且它工作得很好,但是我很难尝试使用触控板启用自然滚动。 它完美地开箱即用,但是在gnome中尽管我在系统设置中激活了自然滚动,但它不起作用。 我还在我的主文件夹中创建了文件“.Xmodmap”:

pointer = 1 2 3 5 4 6 7 8 9 10 11 12 

然后:

 xmodmap .Xmodmap 

我也尝试注销/登录,但仍然禁用自然滚动。 最后,我尝试安装“naturalscrolling”包:

 sudo add-apt-repository ppa:zedtux/naturalscrolling sudo apt-get install naturalscrolling 

但我得到:

 E: Unable to locate package naturalscrolling 

任何的想法?

ps:我的机器是戴尔XPS 15’9560

更新:

通过运行xinput list我看到了这个:

 ↳ DLL07BE:01 06CB:7A13 Touchpad id=12 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)] 

为什么有2个不同的触摸板?

 $ /usr/bin/xinput set-prop 15 "libinput Scroll Method Enabled" 0, 1, 0 property 'libinput Scroll Method Enabled' doesn't exist, you need to specify its type and format 

更新2:

我注意到自然滚动实际上在Pycharm(基于java的IDE)中工作,但Chrome,“文件”和其他应用程序仍然正常滚动:(

更新3

我通过干净安装的Ubuntu GNOME(支持开箱即用的自然滚动)“解决”了

我在戴尔XPS 15 9530上运行Ubuntu Gnome 17.04,这对我有用:

解决方案是安装xserver-xorg-input-libinput ,而是删除xserver-xorg-input-synaptics ,然后重启。 似乎升级安装了两者并默认选择了synaptic,这似乎没有自然的滚动选项。

有同样的问题。 解决了:

 sudo apt install xserver-xorg-input-libinput sudo apt purge xserver-xorg-input-synaptics 

然后重启

也许您的鼠标需要设置不同的属性。 请尝试以下方法:

找到你的鼠标ID(我的下面是10):

 $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech USB-PS/2 Optical Mouse id=10 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ USB Keyboard id=8 [slave keyboard (3)] ↳ USB Keyboard id=9 [slave keyboard (3)] 

列出鼠标的可用属性(用鼠标ID替换10):

 $ xinput list-props 10 Device 'Logitech USB-PS/2 Optical Mouse': Device Enabled (136): 1 Coordinate Transformation Matrix (138): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Accel Speed (273): 0.000000 libinput Accel Speed Default (274): 0.000000 libinput Accel Profiles Available (275): 1, 1 libinput Accel Profile Enabled (276): 1, 0 libinput Accel Profile Enabled Default (277): 1, 0 libinput Natural Scrolling Enabled (278): 1 libinput Natural Scrolling Enabled Default (279): 0 libinput Send Events Modes Available (258): 1, 0 libinput Send Events Mode Enabled (259): 0, 0 libinput Send Events Mode Enabled Default (260): 0, 0 libinput Left Handed Enabled (280): 0 libinput Left Handed Enabled Default (281): 0 libinput Scroll Methods Available (282): 0, 0, 1 libinput Scroll Method Enabled (283): 0, 0, 0 libinput Scroll Method Enabled Default (284): 0, 0, 0 libinput Button Scrolling Button (285): 2 libinput Button Scrolling Button Default (286): 2 libinput Middle Emulation Enabled (287): 0 libinput Middle Emulation Enabled Default (288): 0 Device Node (261): "/dev/input/event2" Device Product ID (262): 1133, 49215 libinput Drag Lock Buttons (289):  libinput Horizontal Scroll Enabled (290): 1 

正如您所看到的,我的鼠标中有一个名为“libinput Natural Scrolling Enabled”的属性,在我的情况下编号为278。

将其设置为1并启用自然滚动(用鼠标ID替换10,用实际属性编号替换278):

 $ xinput set-prop 10 278 1 

如果您使用的是synaptics驱动程序xserver-xorg-input-synaptics ,则可以在配置文件70-synaptics.confVertScrollDeltaHorizScrollDelta设置负值

 cp /usr/share/X11/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d/70-synaptics.conf sudoedit /etc/X11/xorg.conf.d/70-synaptics.conf 

然后重新启动并享受触控板的流畅自然滚动。 有关详细说明,请参阅Arch wiki上的此页面 。

我在启动应用程序中有以下内容:

 /usr/bin/xinput set-prop 14 "libinput Scroll Method Enabled" 0, 1, 0 

并命名为“边缘滚动解决方法。然后您也可以从”设置“本身反转滚动的顺序(就像我们在Unity中所做的那样)。


14是触摸板的代码。 你可以找到你的……

 $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad id=14 [slave pointer (2)] 

ppa:zedtux/naturalscrolling仅支持14.04。