Low Graphics Mode in Unity 7

Unity 7 has had a low graphics mode for a long time but recently we’ve been making it better.

Improvements have been made to reduce the amount of visual effects that are seen while running in low graphics mode.  At a high level this includes things like:

  • Reducing the amount of animation in elements such as the window switcher, launcher and menus (in some cases down to zero)
  • Removing blur and fade in/out
  • Reducing shadows

Typically people running Ubuntu in a virtualised environment don’t have direct access to the powerful GPU features that are used by OpenGL and by Unity.  Instead the virtualisation software emulates these features using the CPU.  Although most desktop CPUs are tremendously powerful they can’t match a dedicated GPU for the sorts of massively parallel processing needed to produce the effects used in Unity 7, and so drawing elements of the user interface on screen takes significantly longer that it would on dedicated GPU hardware.  This has a knock on effect on the perceived performance of the desktop environment.

Related to this, but slightly different, is where a computer is being controlled remotely over VNC, RDP etc.  Let’s take a window which fades in when opened as an example.  The remote control software has to sample the screen, find out what’s changed, perhaps compress those changes and then send the data down the wire.  If a window is being draw gradually from 100% transparency to 0% (i.e. fade in) in 10% chunks then there will be 10 re-draws of that window required at the remote end (in practice it may get 3 or 4 redraws, but this is good enough for our example).  All this takes time.  With Low Graphics mode enabled then window is only drawn once at 0% transparency (fully opaque) and only needs to be sent to the remote end once, reducing the overhead and speeding up the user’s experience.

Low graphics mode should enable itself when it detects certain GL features are not available but there are times when you might want to force it on.  Here’s how you can force low graphics mode on 16.04 LTS (Xenial) :

  1. nano ~/.config/upstart/lowgfx.conf
  2. Paste this into it:
start on starting unity7
pre-start script
    initctl set-env -g UNITY_LOW_GFX_MODE=1
end script
  1. Log out and back in

If you want to stop using low graphics comment out the initctl line by placing a ‘#’ at the start of the line.

This won’t work in 16.10 Yakkety because we’re moving to systemd for the user session.  This will be fixed in due course.

About the author

Will's photo

Will leads the team working on the Ubuntu desktop at Canonical. He has a diverse background originally specialising in data networks and global communications systems and has provided consultancy to clients such as BT, Verizon, Inmarsat and Schlumberger. Will has been using and contributing to Ubuntu since 2005 and in 2015 he was recognised as an Ubuntu Member. He has three kids, plays golf badly and is a member of The Royal Institution of Great Britain.

More articles by Will

Posted in: