Merge lp:~timchen119/unity-settings-daemon/unity-settings-daemon.1471708.trusty into lp:unity-settings-daemon/14.04

Proposed by Alberto Milone on 2015-07-08
Status: Rejected
Rejected by: Iain Lane on 2015-09-02
Proposed branch: lp:~timchen119/unity-settings-daemon/unity-settings-daemon.1471708.trusty
Merge into: lp:unity-settings-daemon/14.04
Diff against target: 12 lines (+1/-1)
1 file modified
plugins/xrandr/gsd-xrandr-manager.c (+1/-1)
To merge this branch: bzr merge lp:~timchen119/unity-settings-daemon/unity-settings-daemon.1471708.trusty
Reviewer Review Type Date Requested Status
Iain Lane 2015-07-08 Needs Fixing on 2015-07-09
Review via email:

Description of the change

This one-line change works around a race condition in the intel driver, that causes XOpenDisplay() to hang on resume from S3. Killing input mapping after 3 seconds seems to be enough.

To post a comment you must log in.
Alberto Milone (albertomilone) wrote :

This for LP: #1471708

Iain Lane (laney) wrote :

Did anyone try to figure out the underlying cause? Please report a bug (upstream?) and reference it in a comment. We should get this fixed properly. We also need to fix this in vivid and wily.

Onto the code. Does this have to be done synchronously? If not then please use g_spawn_async or similar and a timeout to kill the process. This will avoid blocking. If it fails (hangs) then could retrying succeed? If so then we should do that. We should also log a message if it's killed so that the user has a chance to know what's going on.

review: Needs Fixing
Tim Chen (timchen119) wrote :

Thanks Iain, it was originally a quick workaround for the possible race condition, totally agree that making it asynchronous, adding more verbose log and finding out the root cause are better ways to fix this issue.

Iain Lane (laney) wrote :

tseliot re-did this

Unmerged revisions

4043. By Tim Chen on 2015-07-06

* Add timeout 3s for xinput to prevent being blocked in Intel skylake platform. (LP: #1471708)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/xrandr/gsd-xrandr-manager.c'
2--- plugins/xrandr/gsd-xrandr-manager.c 2014-06-05 11:56:15 +0000
3+++ plugins/xrandr/gsd-xrandr-manager.c 2015-07-08 15:28:25 +0000
4@@ -2199,7 +2199,7 @@
5 if (gnome_rr_output_info_is_active(output)) {
6 g_debug ("Mapping touchscreen %d onto output %s",
7 device_id, name);
8- sprintf (command, "xinput --map-to-output %d %s",
9+ sprintf (command, "timeout 3s xinput --map-to-output %d %s",
10 device_id, name);
11 status = system (command);
12 }


People subscribed via source and target branches