3 min read

Finally real smooth scrolling on Linux with the touchpad and Chrome 54

In these days I reviewed the Xiaomi Notebook Air 12 (video in italian), It's a nice portable ultrabook computer but the scrolling experience isn't satisfying in Chrome, both on Windows and Linux.
So let's fix this touchpad and GPU issue on Linux once for all.

This is what I mean with real smooth scrolling ([video](https://www.youtube.com/watch?v=kqih3n1tReo))

The hardware

The new Macbook has almost the same spec of the Mi Notebook Air 12, it's based on cpu Skylake Intel m3 -6Y30, gpu Intel HD Graphics 515 and a big and responsive Synaptics trackpad.

Probably other hardware is fine too, better if you have the accelerated video card driver.

The touchpad

The default settings disable a lot of cool features.. like the horizontal scrolling. So let's enable some features and tweak some acceleration parameters.

synclient MinSpeed=1.8 MaxSpeed=4 AccelFactor=0.04 ClickPad=1 VertHysteresis=0.1 HorizHysteresis=0.1 VertScrollDelta=-30 HorizScrollDelta=-30 HorizTwoFingerScroll=1

Now the touchpad should be more reactive, to have these settings persistent you have to copy this file in ~/.config/autostart/touchpad-fix.desktop.

If you have issues, check or reinstall these packages: xserver-xorg-input-synaptics (if Synaptics is your vendor) and xserver-xorg-input-libinput

The number 10 is the number of your trackpad, and you get it from the command xinput.

$ xinput --list-props 10
Device 'SYNA3105:00 06CB:7EA5':
	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
	Device Accel Profile (265):	1
	Device Accel Constant Deceleration (266):	2.500000
	Device Accel Adaptive Deceleration (267):	1.000000
	Device Accel Velocity Scaling (268):	12.500000
	Synaptics Edges (269):	80, 1921, 64, 1111
	Synaptics Finger (270):	25, 30, 0
	Synaptics Tap Time (271):	180
	Synaptics Tap Move (272):	101
	Synaptics Tap Durations (273):	180, 100, 100
	Synaptics ClickPad (274):	1
	Synaptics Middle Button Timeout (275):	75
	Synaptics Two-Finger Pressure (276):	282
	Synaptics Two-Finger Width (277):	7
	Synaptics Scrolling Distance (278):	-30, -30
	Synaptics Edge Scrolling (279):	1, 0, 0
	Synaptics Two-Finger Scrolling (280):	1, 1
	Synaptics Move Speed (281):	1.800000, 4.000000, 0.040000, 0.000000
	Synaptics Off (282):	0
	Synaptics Locked Drags (283):	0
	Synaptics Locked Drags Timeout (284):	5000
	Synaptics Tap Action (285):	2, 3, 0, 0, 1, 3, 0
	Synaptics Click Action (286):	1, 1, 0
	Synaptics Circular Scrolling (287):	0
	Synaptics Circular Scrolling Distance (288):	0.100000
	Synaptics Circular Scrolling Trigger (289):	0
	Synaptics Circular Pad (290):	0
	Synaptics Palm Detection (291):	0
	Synaptics Palm Dimensions (292):	10, 200
	Synaptics Coasting Speed (293):	20.000000, 50.000000
	Synaptics Pressure Motion (294):	30, 160
	Synaptics Pressure Motion Factor (295):	1.000000, 1.000000
	Synaptics Resolution Detect (296):	1
	Synaptics Grab Event Device (297):	0
	Synaptics Gestures (298):	1
	Synaptics Capabilities (299):	1, 0, 1, 1, 1, 1, 0
	Synaptics Pad Resolution (300):	19, 19
	Synaptics Area (301):	0, 0, 0, 0
	Synaptics Noise Cancellation (302):	0, 0
	Device Product ID (256):	1739, 32421
	Device Node (257):	"/dev/input/event10"
	Synaptics Soft Button Areas (499):	0, 0, 0, 0, 0, 0, 0, 0

The browser and the settings

I tried the same settings on the current Chrome but I had to upgrade to Chrome 54 (beta) to have the real benefits.

Go to the address chrome://flags/ and replicate this config.

  • (optional) reset previously done changes
  • #ignore-gpu-blacklist enabled (not alwais it is better, so optional)
  • #smooth-scrolling disabled (Yeees! disabled :D )
  • (optional) #overlay-scrollbars enabled
  • restart Chrome

Now go to chrome://gpu/ just to check..

You should have something like:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Rasterization: Software only. Hardware acceleration disabled
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated

Conclusion

Wow finally we have a MacOS -like experience on a MacOS -like hardware. If you want also some multitouch gestures enabled in your touchpad I recommend libinput-gestures, it supports 3 and 4 fingers gestures in X, Wayland and it is vendor agnostic.