Linux configuration for laptop

After deciding to install Linux on my new laptop (Lenovo G50-70 i5)  I was surprised to find that the system was a lot more unstable than when running Windows 8.1. Unlike the desktop, the laptop install of Ubuntu had several problems.

1. First and worst of all, it froze after coming back from suspend (sleep) .

2. Battery was draining too fast.

3. No gestures such as two finger scrolling were available by default.

4. Screen backlight was always at maximum after boot

5. No image through HDMI but the wallpaper


1. In order to get Ubuntu to work at all, during installation I had to go to a console environment and install a general AMD graphics package (fglrx). However, this turned out not to be the best driver choice for my laptop, these drivers were the cause of crushes. The solution was downloading a Catalyst Package from AMD website which in turn created four different driver packages based on my configuration. After installing these (there were four because drivers were split between core functionality drivers, basic drivers, graphic acceleration drivers and developer package) the system stopped freezing.

2 days later I found out that sometimes when waking up from suspended/sleep the system crushed and I had to do a cool reboot. The bug appears in several threads such as:

From the error message I get: “RADEON dpm resume failed” or similar, I figure it has something to do with the dynamic power management of the GPU. This wiki page explains what dpm is:


Update: The following steps are the cause of the nasty buggy behaviour mentioned above. The power optimiser called “tlp” when set to run on battery mode will make the laptop fail to wake from suspend  after a second suspend or to shut down after a suspend.

Battery drainage proved to be a lot simpler to solve than I thought it would be.

– install powertop utility to check for main power consumers and for tunables.

sudo apt-get install powertop

sudo powertop

– install tlp optimisation application, a very capable and smart program with plenty of functionality to be found online

sudo apt-get install tlp

run with sudo tlp start


sudo add-apt-repository ppa:linrunner/tlpsudo 
apt-get update
sudo apt-get install tlp tlp-rdw smartmontools ethtool

tlp will check if the laptop runs only on battery and optimises the system accordingly. If the laptop is plugged then tlp runs in AC mode. I noticed the power optimisations are greatest when power comes from battery alone and tlp runs in “bat” mode (tlp bat).

After running tlp bat, powertop no longer displays unsolved tunables.

To start tlp at startup add tlp start or tlp bat or better /usr/sbin/tlp start ( or bat) in /etc/rc.local before the “exit 0” line.


There seems to be a bug related to Lenovo trackpads that caused the issue but I am not sure.

I installed tpconfig and tried several solutions from the internet but I kept encountering the error :

Couldn’t find synaptics properties. No synaptics driver loaded?

So I actually have no synaptics drivers installed, only the generic evdev Linux drivers. What is worse is that synaptiks package was maintained only until version 13.10 (I am running 14.04) si it will not solve my problem.

Basically I have the exact same problem with the one described here: and at the current time the is no answer given.

I found a possible solution here:

After upgrade to 3.18.1 kernel everything worked as expected, although for some reason the sensitivity of the trackpad was very very low.

This brought it to a normal state:

xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Finger" 1 10 256

xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Pressure Motion" 1 160

xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Pressure Motion Factor" 0. 65 0.65

To upgrade the kernel:

Download the Linux kernel (3.18.*) from official website and Linux headers from here:

And then install all packages:

sudo dpkg -i linux-headers-3.18.1-031801*.deb linux-image-3.18.1-031801-generic_3.18.1-031801.201412170637_*.deb

Another useful script for trackpad configuration:


xinput --set-prop --type=int --format=32 "ETPS/2 Elantech Touchpad" "Synaptics Two-Finger Pressure" 1

# Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels
xinput --set-prop --type=int --format=32 "ETPS/2 Elantech Touchpad" "Synaptics Two-Finger Width" 10

# vertical scrolling, horizontal scrolling - values: 0=disable 1=enable
xinput --set-prop --type=int --format=8  "ETPS/2 Elantech Touchpad" "Synaptics Two-Finger Scrolling" 1 1

# vertical, horizontal, corner - values: 0=disable  1=enable
xinput --set-prop --type=int --format=8  "ETPS/2 Elantech Touchpad" "Synaptics Edge Scrolling" 0 0 0

# stabilize 2 finger actions - value=pad-pixels
xinput --set-prop --type=int --format=32 "ETPS/2 Elantech Touchpad" "Synaptics Jumpy Cursor Threshold" 250


I have also added the script to the startup list.

Good source for trackpad tweaking:

To simulate middle click with with two finger tap:

synclient "TapButton2"=2



Enabling the horizontal scroll my cause a buggy behaviour in Java based programs such as NetBeans. To disable horizontal scrolling change this line like this:

xinput --set-prop --type=int --format=8  "ETPS/2 Elantech Touchpad" "Synaptics Two-Finger Scrolling    " 1 0

4. Added this command to rc.local

echo 200 > /sys/class/backlight/intel_backlight/brightness

Where 200 is how bright the screen should be.

5. Found the solution here:

Check the available displays with


xrandr --output eDP1 --off

Where eDP1 is my laptop’s display.