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 610482 - problems triggered when I open the laptop lid
problems triggered when I open the laptop lid
Product: gnome-settings-daemon
Classification: Core
Component: general
Other Linux
: Normal minor
: ---
Assigned To: gnome-settings-daemon-maint
: 597682 612285 (view as bug list)
Depends on:
Blocks: randr-tracker
Reported: 2010-02-19 18:39 UTC by Nicolò Chieffo
Modified: 2010-10-13 17:41 UTC
See Also:
GNOME target: ---
GNOME version: ---

Fix xrandr erroring out on warped g-s-d fn-F7 timestamps (2.25 KB, patch)
2010-04-02 15:15 UTC, Chase Douglas
accepted-commit_now Details | Review

Description Nicolò Chieffo 2010-02-19 18:39:50 UTC
gnome-settings-daemon 2.29.90-0ubuntu1

The problems I have are minor, and are not present if gnome-settings-daemon is not running.

They come every time I open the laptop lid (of course after having closed it, no matter for how long)
1) the first bulk of keypresses lag some seconds (no matter when I hit the keys, it can also be 1 minute after I opened the lid) then the keyboard goes back to normal work
2) some panel icons (apparently all applets) suddenly disappear and reappear (like a flahs). This does not always happen
3) I see a notification that says: "Could not switch the monitor configuration / could not set the configuration for CRTC 64" (this only if I not disable kernel mode setting in my intel x4500hd)
Comment 1 Nicolò Chieffo 2010-03-02 12:24:19 UTC
the monitor notification is another problem, because only one of my 2 laptops exposes it, but the other 2 bugs are present in both.
They are an HP and a DELL both with intel graphics, if that matters
Comment 2 Jens Granseuer 2010-03-09 17:13:15 UTC
*** Bug 612285 has been marked as a duplicate of this bug. ***
Comment 3 Chase Douglas 2010-04-02 15:15:20 UTC
Created attachment 157762 [details] [review]
Fix xrandr erroring out on warped g-s-d fn-F7 timestamps
Comment 4 Chase Douglas 2010-04-02 15:17:06 UTC
See for a more details.
Comment 5 Nicolò Chieffo 2010-04-02 15:20:15 UTC
Is this fix about "could not switch the monitor configuration" or others issues?
Comment 6 Chase Douglas 2010-04-02 15:24:02 UTC
Nicolò Chieffo:

It fixes issue #3 on your list. It does not fix the keypress refresh lag. I don't know exactly why, but it seems that xrandr events are propagated until a key is pressed. That's like an X issue though.
Comment 7 Nicolò Chieffo 2010-04-02 15:32:23 UTC
Do you suggest opening a bug in X?
Comment 8 Chase Douglas 2010-04-02 15:36:47 UTC
I suppose it wouldn't hurt. This issue could be coming from anywhere X and below, including the kernel drivers, but X would be a good place to start.
Comment 9 Nicolò Chieffo 2010-04-02 16:10:43 UTC
What exactly should I write in the bug description?
Comment 10 Chase Douglas 2010-04-02 16:12:45 UTC
I would summarize the symptoms (#1 and #2 in your description here), and state that it seems to be a delayed xrandr notification event that doesn't fire until the first key press.
Comment 11 Sebastien Bacher 2010-04-16 19:53:48 UTC
the change described there has been tested by ubuntu users and seems to work correctly
Comment 12 Jens Granseuer 2010-04-17 09:01:37 UTC
"there" being So NOTGNOME?
Comment 13 Chase Douglas 2010-04-18 20:29:37 UTC

Unfortunately, this bug report got littered with some superfluous information about a secondary bug. However, the "Could not switch the monitor configuration / could not set the configuration for CRTC 64" bug is an issue with gnome-settings-daemon. The attached patch resolves this issue.
Comment 14 Jens Granseuer 2010-04-19 20:22:10 UTC
Ok. Federico, care to take a look?
Comment 15 Nicolò Chieffo 2010-05-06 08:36:25 UTC
For insterested people, here we have the Xorg bug about symptoms 1 and 2
The bug didn't receive any attention yet
Comment 16 Federico Mena Quintero 2010-05-06 18:22:34 UTC
For reference, here are Chase's comments from the Ubuntu bug:

--- comment 12

The libxrandr2 function XRRSetCrtcConfig (called from gnome-settings-daemon through libgnome-desktop) is called twice when I open the lid on my laptop. The second call has an older timestamp value, and thus the xorg xserver is returning RRSetConfigInvalidTime. Now we need to figure out why it's called twice like this.

--- comment 13

Gnome-settings-daemon is receiving two input events in a very short amount of time from the kernel. The input events are basically fn-F7, or "change my display output configuration". Unfortunately, these events are coming in reverse order, so the timestamps go backwards. The input timestamps are fed to the xserver, which evaluates the first just fine, and then errors out on the second due to the timestamp warping. What we need to do is either:

a. Have g-s-d detect warped timestamps and refuse to continue
b. Have g-s-d detect warped timestamps and set a the timestamp to the previous + 1

I'm testing out a. right first since it's the cleaner approach. I don't think there will be any issues with it, but you never know. I'll test out b. if a. has issues.
Comment 17 Federico Mena Quintero 2010-05-06 20:49:09 UTC
Pushed with some stylistic changes as c114f0ca3da756725996bfa2111b2cc4e1982d92 in master and d5e0550961e337a8ce08e41534bd26f7daab79be in gnome-2-30.
Comment 18 Nicolò Chieffo 2010-05-06 21:03:06 UTC
This does not include a fix for the first 2 sympthoms, right?
Comment 19 Federico Mena Quintero 2010-05-06 22:39:22 UTC
(In reply to comment #18)
> This does not include a fix for the first 2 sympthoms, right?

Comment 20 Bastien Nocera 2010-10-13 17:41:45 UTC
*** Bug 597682 has been marked as a duplicate of this bug. ***