gnome-settings-daemon and gnome-display-properties slow down xserver when external monitor added

Bug #339228 reported by Joseph Method
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
Fix Released
High
gnome-settings-daemon (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-settings-daemon

Whenever I plugin an external flatscreen TV CPU use goes up, the mouse jumps around and performance becomes jerky. The external monitor flickers for a while and eventually gives up. Killing gnome-settings-daemon immediately causes the external monitor to display properly. Restarting gnome-settings-daemon or starting gnome-display-properties separately both cause the external monitor to stop displaying. When I tail the Xorg.0.log during these times there are spikes in messages about polling the connected monitors for their display sizes.

Below I've included the text I wrote in comments to a similar bug (https://bugs.launchpad.net/ubuntu/+source/libxrandr/+bug/307306) that was eventually traced to gnome-settings-daemon and gnome-power-manager.

On a Macbook 1,1
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
Philips 42" LCD television

===
This g-s-d problem caused me to misinterpret a problem with dual-monitor displays. On a Macbook 1,1 whenever I plugged in a DVI-to-HDMI connector to a flatscreen television (using a TMDS-1 output on an intel card), on hotplug the machine would start to slow down. On coldplug and an unaltered xorg.conf it would attempt to load both displays but the flatscreen would start flickering on and off and eventually stop attempting to display anything. xrandr would show both active LVDS and TMDS-1 connections. Any attempt to use gnome-display-settings would only show a blank application window that could not be closed except by force quit. I had assumed that this was an issue directly with xserver-xorg-intel until I saw this bug: https://bugs.launchpad.net/ubuntu/+source/libxrandr/+bug/307306.

As of today, killing gnome-settings-daemon immediately caused the flatscreen video to appear and slowness issues are gone. Trying to use gnome-display-settings immediately kills the display and shows the blank window again. Perhaps this points to xrandr and intel, or xrandr and dual-monitor auto-detection?

Just to be clear, these are the same symptoms that Chousuke reported here: https://bugs.launchpad.net/ubuntu/+source/libxrandr/+bug/307306/comments/37. Running gnome-display-properties will cause the screen to go black until it's closed, regardless of whether g-s-d is running. A clean X session with g-s-d disabled at startup and briefly running gnome-display-properties is the same size as the current log.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: gnome-settings-daemon 2.25.92-0ubuntu4
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-settings-daemon
Uname: Linux 2.6.28-8-generic i686

Revision history for this message
Joseph Method (tristil) wrote :
Revision history for this message
Joseph Method (tristil) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, could you run gnome-settings-daemon --debug --no-daemon on a command line and see if it prints useful informations when you get the issue? could you get a stacktrace when it's using ressources? do you get a similar issue using xrand --auto on a command line?

Changed in gnome-settings-daemon:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

using "xrandr --auto" rather

Revision history for this message
Joseph Method (tristil) wrote :

I've attached two files, coldplug.txt where gnome-settings-daemon --debug --no-daemon is run while the monitor is plugged in, and hotplug.txt, where I unplugged the monitor, ran g-s-d, plugged in the monitor and used xrandr --output TMSD-1 --mode 1920x1080 to activate the monitor.

xrandr --auto causes the screen to go black momentarily, similar to the initial moments with g-s-d when brief flashes of the screen can be seen in-between blue or black screens.

Revision history for this message
Joseph Method (tristil) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

in which case do you get slowness? can you get similar issues by using xrandr on the command line? does anything is using cpu while you get the issue?

Revision history for this message
Joseph Method (tristil) wrote :

CPU jumps up past 50% on the System Monitor graph with both g-s-d and gnome-display-properties (top claims +60% CPU usage for Xorg). I used glxgears below. I'm not sure how I would test with xrandr. xrandr --auto just takes a second and there's no spike on the cpu history. By running xrandr repeatedly maybe there's a slight increase in activity, but nothing over 50% CPU.

glxgears before and after g-s-d

method@discourse:~$ glxgears
get fences failed: -1
param: 6, val: 0
302 frames in 5.0 seconds = 60.187 FPS
301 frames in 5.0 seconds = 60.119 FPS
301 frames in 5.0 seconds = 59.954 FPS
^C
method@discourse:~$ gnome-settings-daemon --debug --no-daemon &
[1] 9295
<snip>
method@discourse:~$ glxgears
get fences failed: -1
param: 6, val: 0
20 frames in 5.3 seconds = 3.771 FPS
17 frames in 5.3 seconds = 3.196 FPS
20 frames in 5.2 seconds = 3.877 FPS

glxgears after gnome-display-properties

method@discourse:~$ bg 1
[1]+ gnome-display-properties &
method@discourse:~$ glxgears
get fences failed: -1
param: 6, val: 0
26 frames in 5.2 seconds = 5.017 FPS
34 frames in 5.4 seconds = 6.310 FPS
31 frames in 5.2 seconds = 5.933 FPS

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you try to use gdb or strace to see if it's looping in the code somewhere

Revision history for this message
Joseph Method (tristil) wrote :

When I strace g-s-d it sets up and forks. If I strace the pid there's a lot of stuff like this repeating:

writev(3, [{"\226\t\3\0>\0\0\0[\276\0\0"..., 12}, {NULL, 0}, {""..., 0}], 3) = 12
select(4, [3], [], NULL, NULL) = 1 (in [3])
read(3, "\1|\335\3\4\0\0\0[\276\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\2\0\0\0\0\0\0"..., 4096) = 48
read(3, 0x84bf068, 4096) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN}], 7, 0) = 0 (Timeout)

The above is actually from the end of an strace on gnome-display-properties where it occurs as well.

Revision history for this message
Joseph Method (tristil) wrote :
Revision history for this message
Joseph Method (tristil) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks for your work there, I've no real clue about the issue right now though, do you think you could open the bug on bugzilla.gnome.org too where the people writting the code will read about it? they know the code better and might have a clue about what to change there

Revision history for this message
Joseph Method (tristil) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for sending the bug there

Changed in gnome-settings-daemon:
status: Incomplete → Triaged
Revision history for this message
Joseph Method (tristil) wrote :

Applying the patch that Peter Clifton suggested here (https://bugs.launchpad.net/ubuntu/+source/libxrandr/+bug/307306/comments/23) to libgnome-desktop-2-11 fixes the problems for me.

Revision history for this message
Neil Broadley (scaine) wrote :

Latest updates as of today appear to have fixed this issue here. MacMini, Intel graphics, Jaunty Alpha 6 install with latest updates.

Changed in gnome-settings-daemon:
status: Unknown → Invalid
Changed in gnome-settings-daemon:
status: Invalid → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue is fixed in jaunty now

Changed in gnome-settings-daemon (Ubuntu):
status: Triaged → Fix Released
Changed in gnome-settings-daemon:
importance: Unknown → High
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.