After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648303 - Huge notification spawned when undocking
Huge notification spawned when undocking
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: xrandr
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-20 14:11 UTC by Cosimo Cecchi
Modified: 2011-05-04 11:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Cosimo Cecchi 2011-04-20 14:11:49 UTC
At the office I have a docking station for my ThinkPad with an external monitor plugged in. Every time I undock the laptop, I get a *huge* libnotify notification from the xrandr g-s-d plugin informing that something about switching monitor configuration has gone wrong.
The notification has about a hundred or so of lines like "CRTC foo bar baz 1024x768@60hz omg lol" (sorry, I don't remember the exact wording as I just closed it) and I think it looks extremely bad. Note that once undocked, the laptop keeps running just fine, so I don't really know what's the problem there.

We should probably just avoid spawning notifications in cases like this if those are just warnings/messages and there's nothing the user can do about it (a log file would be a better target).
Comment 1 Bastien Nocera 2011-04-21 10:09:45 UTC
Could you please get a log of what the XRandR plugin is doing?

Instructions are at:
http://git.gnome.org/browse/gnome-settings-daemon/commit/plugins/xrandr?id=bf0ad1d7d2fafe02730dc9f38d9964595374ebc3
Comment 2 Cosimo Cecchi 2011-04-22 05:33:45 UTC
Ok, this is the content of the log after the notification appears:

Handling XF86Display hotkey - timestamp 151066734
Regenerated stock configurations:
    Configuration 0
        cloned: no
        LVDS1: 1280x800@60 +1280+0 (Laptop)
        VGA1: 1280x1024@60 +0+0 (Dell 19") (primary output)
        HDMI1: disconnected
        DP1: disconnected
    Configuration 1
        cloned: no
        LVDS1: 1024x768@60 +0+0 (Laptop)
        VGA1: 1024x768@75 +0+0 (Dell 19") (primary output)
        HDMI1: disconnected
        DP1: disconnected
    Configuration 2
        cloned: no
        LVDS1: 1280x800@60 +0+0 (Laptop)
        VGA1: 1280x1024@60 +1280+0 (Dell 19") (primary output)
        HDMI1: disconnected
        DP1: disconnected
    Configuration 3
        cloned: no
        LVDS1: 1280x800@60 +0+0 (Laptop)
        VGA1: off (Dell 19") (primary output)
        HDMI1: disconnected
        DP1: disconnected
    Configuration 4
        cloned: no
        LVDS1: off (Laptop)
        VGA1: 1280x1024@60 +0+0 (Dell 19") (primary output)
        HDMI1: disconnected
        DP1: disconnected
Successfully switched to configuration (timestamp 151066734):
        cloned: no
        LVDS1: 1024x768@60 +0+0 (Laptop)
        VGA1: 1024x768@75 +0+0 (Dell 19") (primary output)
        HDMI1: disconnected
        DP1: disconnected
Got RANDR event with timestamps change=151066734 > config=130505337
  Ignoring event since change >= config
Got RANDR event with timestamps change=151066734 > config=130505337
  Ignoring event since change >= config
Got RANDR event with timestamps change=151066734 > config=130505337
  Ignoring event since change >= config
Got RANDR event with timestamps change=151066734 > config=130505337
  Ignoring event since change >= config
Got RANDR event with timestamps change=151066734 > config=130505337
  Ignoring event since change >= config
Handling XF86Display hotkey - timestamp 151069710
Got RANDR event with timestamps change=151066734 < config=151069723
  Automatically configured outputs to deal with event
Got RANDR event with timestamps change=151069723 = config=151069723
  Ignoring event since change >= config
Got RANDR event with timestamps change=151069723 = config=151069723
  Ignoring event since change >= config
Got RANDR event with timestamps change=151069723 = config=151069723
  Ignoring event since change >= config
Got RANDR event with timestamps change=151069723 < config=151074458
Applied stored configuration to deal with event
Got RANDR event with timestamps change=151074458 = config=151074458
  Ignoring event since change >= config
Got RANDR event with timestamps change=151074458 = config=151074458
  Ignoring event since change >= config
Got RANDR event with timestamps change=151074458 = config=151074458
  Ignoring event since change >= config
Got RANDR event with timestamps change=151074458 = config=151074458
  Ignoring event since change >= config


The notification itself says:

"Could not switch monitor configuration
could not assign CRTC to outputs
Trying modes for CRTC64
CRTC64: trying mode 1280x800@60hz with output at 1280x800@60hz (pass 0)
[ ... about a hundred or so of similar lines, with different resolution/refresh rates; the list is repeated twice, with (pass 1) the second time ... ]"
Comment 3 Bastien Nocera 2011-05-04 11:29:43 UTC
(In reply to comment #0)
> At the office I have a docking station for my ThinkPad with an external monitor
> plugged in. Every time I undock the laptop, I get a *huge* libnotify
> notification from the xrandr g-s-d plugin informing that something about
> switching monitor configuration has gone wrong.
> The notification has about a hundred or so of lines like "CRTC foo bar baz
> 1024x768@60hz omg lol" (sorry, I don't remember the exact wording as I just
> closed it) and I think it looks extremely bad. Note that once undocked, the
> laptop keeps running just fine, so I don't really know what's the problem
> there.
> 
> We should probably just avoid spawning notifications in cases like this if
> those are just warnings/messages and there's nothing the user can do about it
> (a log file would be a better target).

The problem is that your BIOS seems to be sending out a number of XF86Display calls when unplugging the dock.

I don't know how we can work-around that problem short of not handling the key. Please discuss this with mjg59 and the X hackers, your BIOS is being stupid...


commit 4ce9bf633b32cadbb332ef7bf437809a9d36eb30
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed May 4 12:25:04 2011 +0100

    xrandr: Never use a notification for errors
    
    Use a dialogue instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=648303