syndaemon polls 5 times a second even though it is started with the -R XRecord extension option

Bug #906987 reported by Colin Ian King
48
This bug affects 8 people
Affects Status Importance Assigned to Milestone
The Ubuntu Power Consumption Project
Triaged
Medium
Unassigned
gnome-settings-daemon (Ubuntu)
Confirmed
Undecided
Unassigned
xserver-xorg-input-synaptics (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

syndaemon is polling at 5Hz even on an idle system. It is waking up the CPU and wasting power.

However, it is running with -R option that should enable it to use XRecord which avoids polling, so I believe gnome-settings-daemon is doing the right thing. This used to work, I believe it was fixed for natty (see bug #633125), so it is a regressed on Oneric and it is also broken in Precise (I checked against today's daily build).

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: xserver-xorg-input-synaptics 1.4.1-1ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Uname: Linux 3.0.0-14-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Tue Dec 20 17:12:36 2011
DistroCodename: oneiric
DistroVariant: ubuntu
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: xserver-xorg-input-synaptics
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Colin Ian King (colin-king) wrote :
Changed in xserver-xorg-input-synaptics (Ubuntu):
milestone: none → ubuntu-12.04-beta-1
tags: added: battery-power-consumption
summary: - syndaemon polls 5 times a second even though it isR started with the -R
- XRecord extension
+ syndaemon polls 5 times a second even though it is started with the -R
+ XRecord extension option
Changed in xserver-xorg-input-synaptics (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

We do not currently build syndaemon with XRecord support. Please see

  https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/774978/comments/38

for the history and rationale for this.

Changed in xserver-xorg-input-synaptics (Ubuntu):
status: New → Triaged
status: Triaged → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

It ought to be possible to implement syndaemon like gnome-session's idle detection. It uses the XSync extension and XCreateAlarm(). I have started making some investigations about this.

If all else fails, we could at least lower the polling frequency from 5 to 2 Hz, which would then match our default unlocking delay of 0.5 seconds.

Martin Pitt (pitti)
Changed in xserver-xorg-input-synaptics (Ubuntu):
status: Confirmed → Triaged
Changed in ubuntu-power-consumption:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Robert Hooker (sarvatt) wrote :

Yeah -R was way too unstable to continue enabling and it was even disabled in a SRU in natty (the one release that ever had it enabled) because of it. This could be worked around easily by calling syndaemon with -m 500 in gnome-settings-daemon which is responsible for spawning it, with a patch like the attached one. The problem is the syndaemon man page warns about pitfalls of too high values so getting this right might take some trial and effort introducing bugs to people and I'm not sure 5 wakeups/second is worth it.

       -m <poll-interval>
              How many milliseconds to wait between two polling intervals. If this value is too low, it will cause unnecessary wake-ups. If this
              value is too high, some key presses (press and release happen between two intervals) may not be noticed. This switch has no effect
              when running with -R. Default is 200ms.

Revision history for this message
Colin Ian King (colin-king) wrote :

Let me see if I can rig up a test and see exactly how much each wakeup costs.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "launch syndaemon with an increased poll interval in gnome-settings-daemon" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Martin Pitt (pitti)
Changed in xserver-xorg-input-synaptics (Ubuntu):
milestone: ubuntu-12.04-beta-1 → ubuntu-12.04-beta-2
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti)
Changed in xserver-xorg-input-synaptics (Ubuntu):
milestone: ubuntu-12.04-beta-2 → ubuntu-12.04
Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

why dont you apply the patch?

Revision history for this message
Bryce Harrington (bryce) wrote :

@Sarvatt, is there anything we should do on the -synaptics end for this bug? When we looked at the issue previously it did not seem like XRecord was easily fixable for this usage; are there any new ideas on what we might do (even if just papering over it...)?

Changed in xserver-xorg-input-synaptics (Ubuntu):
milestone: ubuntu-12.04 → none
Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

still there in 13.04

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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