On my Lenovo Yoga 2 pro I installed Ubuntu 14.04 32bit and kept the installed Windows 8 on another partition.

In Windows, When you turn it into tablet mode, the keyboard and touchpad turns off so you don't accidently click on it at the back of the "tablet".

In ubuntu 14.04 only the keyboard turns off, but the touchpad stays active. Not even the Fn+F6 combination doesn't turn it off.

So far I can only disable it with

synclient TouchpadOff=1

(and re-enable with 0)

I tried xev to get the keycode for Fn+F6 but pressing this combo generates no output. Turning the monitor to the back neither.

How can I disable the touchpad automatically when I rotate or turn the monitor on the back, and re-enable the Fn+F6 Hotkey?

screenshot of the Touchpad Off Button on F6

UPDATE: After some weeks sudo apt-get upgrade Fn+F6 is working now, so there is only the question how to rotate the screen and how to disable the touchpad automatically when rotating the screen.


3 Answers 3



I think the Hotkey Fn+F6 works since some time If you install the latest Ubuntu updates.

Rotate the screen and touchscreen input 180 degrees

create the script /usr/local/bin/rotate-screen.sh
(I enhanced that script there at gist so it rotates 90° also)

# This script rotates the screen and touchscreen input 180 degrees, disables the touchpad, and enables the virtual keyboard
# And rotates screen back if the touchpad was disabled

isEnabled=$(xinput --list-props 'SynPS/2 Synaptics TouchPad' | awk '/Device Enabled/{print $NF}')

if [ $isEnabled == 1 ] 
    echo "Screen is turned upside down"
    xrandr -o inverted
    xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
    xinput disable 'SynPS/2 Synaptics TouchPad'
    # Remove hashtag below if you want pop-up the virtual keyboard  
    # onboard &
    echo "Screen is turned back to normal"
    xrandr -o normal
    xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1
    xinput enable 'SynPS/2 Synaptics TouchPad'
    # killall onboard 

and give it executable rights:

sudo chmod +x /usr/local/bin/rotate-screen.sh



create *.desktop file in /usr/share/applications/

gksudo gedit /usr/share/applications/rotate-screen.desktop


Paste below text:

[Desktop Entry]

Then run the script via the Unity launcher startmenu (type "rotate-screen")




I was in the exact same position, only on a Yoga 3. I found this thread and the brilliant answer by rubo77, so I've begun adapting it into a command line tool, so it's a little easier to control things exactly, and only toggle the things you want. It's still work in progress at the moment, but the core functionality is there and working.

Repo: https://github.com/RealOrangeOne/yoga-pal

(Installation instructions can be found Here)

Extra note, if your laptop has a hardware button for rotating the screen (on mine it's on the right hand side), you can bind that to call commands, meaning you can restore it's intended functionality. It can also be used in replacement for rubo's script inside a desktop entry if you would prefer to run it that way.

  • Looks nice, but you should add some instructions for the installation here.
    – A.B.
    Nov 25, 2015 at 19:03

You may want to checkout this repo: https://github.com/pfps/yoga-laptop

It fixes wifi issue and not working special keys. Screen rotation is WIP.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .