Blocking calls when setting brightness causing input events to queue.

Bug #1436363 reported by Nick Dedekind
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity System Compositor
Triaged
Undecided
Unassigned

Bug Description

The call to powerd which changes the brightness is synchronous, which is blocking the input events. This results in input events to wait in the queue until the call is completed.

Test case:
Brightness slider in the indicator lags behind while swiping around a lot.

Result: (from MIR_CLIENT_INPUT_RECEIVER_REPORT=log)
http://pastebin.ubuntu.com/10677265/

Trial Resolution:
=== modified file 'src/powerd_mediator.cpp'
--- src/powerd_mediator.cpp 2014-09-17 09:44:55 +0000
+++ src/powerd_mediator.cpp 2015-03-25 14:20:00 +0000
@@ -195,7 +195,7 @@
     normal_brightness = brightness;

     if (backlight_state != BacklightState::automatic)
- powerd_interface->call("setUserBrightness", brightness);
+ powerd_interface->asyncCall("setUserBrightness", brightness);
 }

I'm not sure about implications of changing to async calls though.

Tags: pm-fail
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

USC receives requests to change brightness through the Unity.Screen dbus interface. It then forwards the requests to powerd through dbus again.

If an application or system component doesn't care to wait for the "set brightness" request to complete, then it would be cleaner for that component to issue an async call to Unity.Screen.setBrightness, instead of forcing asynchronous behavior on everyone by changing USC.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Marking as "won't fix" since, as noted above, I don't think USC is the right place for this fix. If you think differently let's discuss and we can reopen accordingly.

Changed in unity-system-compositor:
status: New → Won't Fix
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

I misunderstood the problem. This is indeed a valid issue.

Changed in unity-system-compositor:
status: Won't Fix → Triaged
tags: added: pm-fail
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.