User experience for hybrid graphics

Registered by Chris Halse Rogers on 2012-10-30

The plumbing layer for hybrid graphics support is now roughly feature-complete. We are now in a position to expose this support to users, via the Unity desktop environment, which means we need some UI and some policy.

We need to know which applications to start on the powerful GPU, and users probably want some power-dependent policy to influence this decision.

This session is to discuss the design and implementation of the user-facing component of hybrid graphics.

Blueprint information

Status:
Not started
Approver:
Jason Warner
Priority:
Medium
Drafter:
Chris Halse Rogers
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
Accepted for raring
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

2013-04-04, seb128: setting remaining items to POSTPONED, the priority changed with the mobile focus and Mir, not sure what work is still planned on x/hybrid-graphics but that's not going to happen for raring in any case

------------------

switching gpu's is going to be an option. In raring it might be possible that the right pieces are in place to support dynamic gpu switching, in which case you want to kill your old opengl context and redraw inside the compositor. applications that care about power need to support robustness so they can do the same thing, and switch as needed..

a interface and/or policy for switching graphics cards would be useful, external displays could require a switch for cards.

= Session notes =

We're in a position that if you have two GPUs you should be able to use both of them (in some definition of works).

Needs to be exposed to users in some sort of nice fashion now. Need to define policy and user experience.

== User Experience ==
Best experience is no user experience, but it's completely transparent to the user. There are some exceptions to this though:
* You can't power off the external GPU until the application using it quits.
* If using an external monitor
* Only works on the free stack, only will work on free stack for the forseeable future.
* You can't switch applications from one GPU to the other for at least raring.

First step is balanced default policy which will be to know when to switch the extra GPU on and off. Maybe flag applications and actions. Eg apps that which would definitely use an external GPU. Or when plugging in an external monitor.
Actually the extra GPU will go into suspend when it's not necessary.

User would be able to override this to always force extra GPU on or off in all situations then. Eg a 3-way toggle for always-off-balance-always-on.

Should end up either in the power applet, only shown when the correct HW is present.

Applications should be able to specify whether they want to run on the external GPU explicitly. Perhaps the best place for this is in the desktop file for the application.

== Desktop File ==
Shipped in package, so this should scale across maintainers.
Unity should have access to this easily because it's already there when you try to launch it.
Can also be specified via an environment variable.

Unity would set this environment variable before launching if it was found in the desktop file. This switch would only have an effect and pass the infromation from the desktop file if running in 'balanced' mode.

== Unity ==
Will always start on the lower power GPU for first revision.

When switching power mode,
* if to lower: and they have apps running with GL=1 they should be recommended to restart their session.
* if to higher and they have apps running with GL=0 they should be recommended to restart their session.

== Backporting to 12.04 point releases ==
Awkward to fit through SRU policy due to impacting a lot of things. Probably need to work through the tech board instead.

Realistically not that important until the binary drivers support this as preinstalls will be using the binary drivers.

== Systems that can only run one GPU at a time ==
No current systems do this. This was the old design for hybrid graphics systems. "technically stupid"
Not worth targeting these systems as this is niche hardware.

(?)

Work Items

Work items:
[mlankhorst] Take lowest end HW w/ hybrid GFX and benchmark unity running with full effects on low end or high end GPU: POSTPONED
[johnlea] design for interface for selecting 3 modes: POSTPONED
[ubuntu-x-swat] design for environment variables for unity selecting GPUs properly and then publishing that spec: POSTPONED
[ubuntu-x-swat] design a spec for the desktop file and publish that spec to freedesktop: POSTPONED
identify implementation points for U/I switching and launching: POSTPONED
[raof] identify who to get to implement system-settings component: DONE
[ken-vandine] implement U/I for switching: POSTPONED
implement launcher interface: POSTPONED