Merge lp:~cypressyew/checkbox/fix-graphics-driver into lp:checkbox

Proposed by Po-Hsu Lin
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4127
Merged at revision: 4130
Proposed branch: lp:~cypressyew/checkbox/fix-graphics-driver
Merge into: lp:checkbox
Diff against target: 18 lines (+2/-2)
1 file modified
providers/plainbox-provider-checkbox/bin/graphics_driver (+2/-2)
To merge this branch: bzr merge lp:~cypressyew/checkbox/fix-graphics-driver
Reviewer Review Type Date Requested Status
Sylvain Pineau Approve
Paul Larson Approve
Review via email: mp+280099@code.launchpad.net

Description of the change

Fix the driver detection issue when running with power-saving mode on I+A systems.

As the system will call Intel driver from fglrx, so instead of returning the driver name detected in the pattern for Intel GPU (which will be fglrx in this case, causing false results), we should force it to return "intel" to avoid this issue.

Tested on:
201409-15485 - Intel UMA (14.04.3)
201409-15477 - I+N in both power-saving and performance mode (14.04.3)
201507-18599 - I+A in both power-saving and performance mode (14.04 oem)

It looks like this won't affect 3.2 Precise, as the Intel pattern in Xorg.log is different before 3.11 kernel (and it does not support graphic switching with older driver on Precise)

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

it might make sense to check if m.group(1) == 'fglrx' just in case, but if you are certain it just needs to be this no matter what, then it may be ok. Otherwise +1

review: Approve
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+1 for the fix

review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi,
thanks for reviewing this, I forgot the save this reply :)
checking if it's equal to 'fglrx' indeed make sense with I+A hybrid graphic systems. On an Intel GPU only UMA system, m.group(1) will be 'intel' there, make this check become more complicated (might need to combine with the hybrid graphic check). I think we can keep an eye on this, if it's not working, we can re-model this later.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'providers/plainbox-provider-checkbox/bin/graphics_driver'
2--- providers/plainbox-provider-checkbox/bin/graphics_driver 2014-06-19 14:58:28 +0000
3+++ providers/plainbox-provider-checkbox/bin/graphics_driver 2015-12-10 04:00:14 +0000
4@@ -199,12 +199,12 @@
5 display = {'Output': display_name}
6 continue
7
8- # For 4th Intel on 3.11
9+ # For 4th Intel after 3.11
10 m = re.search(
11 r'\(II\) (.*)\(\d+\): switch to mode .* using (.*),', line)
12 if m:
13 self.displays[display_name] = display
14- self.video_driver = m.group(1)
15+ self.video_driver = 'intel' # 'intel' is what we expect to see
16 display_name = m.group(2)
17 display = {'Output': display_name}
18 continue

Subscribers

People subscribed via source and target branches