race condition between android container and powerd may disable auto brightness availability
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Confirmed
|
Critical
|
Unassigned | ||
powerd |
New
|
Undecided
|
Alexandros Frantzis | ||
lxc-android-config (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
powerd has upstart startup condition "start on started dbus and android", so it's started after android container for sure. However, android init may take some time to really bring up its property service, and powerd has to read android property "ro.product.device" when initializing its device config. On some devices, there are chances that powerd starts up before android property service is ever ready and leaving following messages in syslog:
powerd[2506]: Initializing powerd.
powerd[2506]: owner id: 1
powerd[2506]: Could not determine device, running without config
powerd[2506]: libsuspend: detect module: autosleep.
powerd[2506]: light_dev: setting brightness to 102
powerd[2506]: Could not determine platform autobrightness capability, disabling
Changed in canonical-devices-system-image: | |
assignee: | nobody → Thomas Voß (thomas-voss) |
importance: | Undecided → Critical |
milestone: | none → ww08-2016 |
status: | New → Confirmed |
Changed in canonical-devices-system-image: | |
assignee: | John McAleely (john.mcaleely) → nobody |
I tried to add following poll loop to powerd upstart conf as ubuntu- location- service does, but some device still fails to retrieve correct property.
# wait for Android properties system to be ready property_ service ]; do sleep 0.1; done
while [ ! -e /dev/socket/
Instead, the follow poll guarantees property availability.
while [ -z "$(getprop ro.product.device)" ]; do sleep 0.1; done