Ubuntu 11.04 – X freezing after screensaver active / laptop lid closed
by bigpresh on May.12, 2011, under Linux, System Administration
I recently upgraded my laptop (a Dell 17R / N7010) to Ubuntu 11.04 (Natty), and since then, it has been randomly freezing when I come back to it after leaving it for a while.
I see my X session exactly as I left it, and can move the mouse around, but nothing seems to respond to mouse/keyboard events. The system is still alive, I can SSH to it from another box, or switch to a different virtual terminal (e.g. Ctrl + Alt + F1), and I can kill Xorg (sudo pkill X) at which point gdm immediately gets restarted, and I can log back in.
It seems to only strike when the laptop has been left unattended for some time. I can close the lid, wait ten seconds and re-open it, and everything is fine. I can also trigger the screensaver by locking the screen with Ctrl + Alt + L, then unlock, and all is also fine.
I’ve done some Googling, and I’m certainly not the only person experiencing this:
Bug 772925 – Screen freezes after laptop lid closed for more than 1 minute
Bug 781402 – Ubuntu 11.04 / Unity freezing when screen is ‘woken up’
a discussion of bug 781402 on fossplanet.com
Bug 740126 – Disabling an output can cause vblank events to be missed
I’m using ‘Ubuntu Classic’, i.e. using GNOME rather than Unity, but the reports of the problem I’ve seen are split between both.
I’ve found a suggestion of a possible fix – installing compizconfig-settings-manager then disabling Sync to vblankon ubuntuforums.org.
I’ve just tried that out; I’ll update this post when I know whether it has worked or not.
EDIT: I’ve checked logs for anything illuminating and found little, but I did just spot the following in /var/log/Xorg.0.log.old:
[437515.524] (EE) intel(0): [DRI2] DRI2SwapComplete: bad drawable
I’ve no idea if it’s related to the problem or not.
EDIT 2: So far, it would seem that disabling “Sync to vblank” as mentioned above has fixed the problem, for me. (It’s also possible that it was fixed in one of the updates since, but I haven’t spotted any package updates that looked relevant.)
If you’re having the same problem, feel free to comment here on whether the “Sync to vblank” change stopped the freezes for you.
18 Comments for this entry
2 Trackbacks / Pingbacks for this entry
-
Ubuntu 11.04 on Lenovo E420 « Vivek's blog
July 26th, 2011 on 3:44 am[...] Reboot. The system may not hang. http://www.preshweb.co.uk/2011/05/ubuntu-11-04-x-freezing-after-screensaver-active-laptop-lid-closed... [...]
-
Ubuntu Linux on the Lenovo U160 | Zen of Linux
August 30th, 2011 on 7:25 pm[...] posts? X freezing after lid closed Fix: Screen Freezes Acpi Screen [...]
May 15th, 2011 on 6:15 am
Hi,
I have the same problem (ubuntu 11.04, classic setting).
I tried the “disabling sync to vblank” idea, but yesterday my notebook froze again.
Did it work for you?
Regards, hiandras
May 18th, 2011 on 1:46 am
Love,
I soul the same problem (ubuntu 11.04, classic setting).
I tried the “incapacitating sync to vblank” line, but yesterday my notebook froze again.
Did it production for you?
Regards, hiandras
May 18th, 2011 on 2:56 am
Thanks for the post. I’ve been having the same problem (with Unity) and I’ve just disabled sync to vblank. Hopefully that will do the trick.
May 18th, 2011 on 3:31 am
This workaround was unsuccessful for me as well.
May 18th, 2011 on 3:00 pm
the same thing is happening to me as well [11.04]. the thought of leaving my system unattended gives me creeps now a days coz of the freezing!!! i googled and found somewhere that its because of changing the default theme. did anyone using the default ubuntu theme experience freezing??
May 19th, 2011 on 5:29 am
I changed the default theme. I am using “New wave”.
I tried it with several different screen savers.
May 20th, 2011 on 11:33 am
it freezes with the default theme anyway…. the only time it worked was when the update was running… i left the system on all night and no prob :)
May 21st, 2011 on 4:18 pm
I have the same issue, and tried to fix with the same “disabling sync to vblank” but still have the problem. No updates for this bug yet. Frustrating, as I have to lock my screen at least once a day.
May 22nd, 2011 on 6:20 am
I had the same problem..but the fix did not work for me…my dell laptop still freezes on closing the lid…m using classic ubuntu 11.04
May 23rd, 2011 on 3:54 pm
I know someone who has been using Ubuntu and he has been complaining about that one, too. Maybe I could lead him to your website and let him try what you have tried, :)
May 26th, 2011 on 8:11 pm
Thanks for this tip as I too am going to try it. Some have not been so successful with this, it seems, but I feel it worth trying after having to reboot my laptop after being up for over 6 days….
May 27th, 2011 on 9:34 pm
Hi, I’ve been having the same freezing problem of X on ubuntu 11.04. Installing compizconfig-settings-manager then disabling Sync to vblankon worked perfectly after restarting X.
Thanks a lot!
May 27th, 2011 on 9:47 pm
Interesting that the “sync to vblank” ‘fix’ seems to work for some people, but not others.
In case it’s relevant, I changed my screen saver setting from “blank screen” to an actual screensaver (“Hypertorus”) at about the same time.
I’m no longer seeing the problem, thankfully.
June 19th, 2011 on 7:06 pm
Same problem here with Ubuntu Classic, 11.04 – I regret my decision to upgrade from the previous version.
July 14th, 2011 on 11:55 pm
I used the method described, the “sync to vblank”. I rebooted after to make sure everything was loaded properly and have not had an issue for 2 days, way more than had been happening before.
Thanks for the lead!
Roger
July 25th, 2011 on 11:56 am
I’m still having troubles with this issue. With or without vblank
.
Hope Ubuntu solves the problem..
August 3rd, 2011 on 5:29 am
just found this other site suggesting to simply enable any screensaver, it seems to be working…
http://www.rajeshrana.net/2011/05/27/ubuntu-11-04-freezes-hangs-idle/
or remove gnome screensaver, and install xscreensaver
September 25th, 2011 on 1:48 am
Removing gnome screensaver and installing xscreensaver worked for me (Narwhal on X61s). Thanks!