Not logged in
Log in now
Create an account
Subscribe to LWN
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Little things that matter in language design
LWN.net Weekly Edition for June 6, 2013
flicker-free suspend/resume on Intel
Posted Mar 6, 2013 0:42 UTC (Wed) by marduk (subscriber, #3831)
Posted Mar 6, 2013 11:44 UTC (Wed) by blackwood (subscriber, #44174)
Posted Mar 6, 2013 1:26 UTC (Wed) by neilbrown (subscriber, #359)
This will always switch console unless disable_vt_switch is set, and that only gets set by a call to pm_set_vt_switch(0).
This is only called by drivers/video/geode/gxfb_core.c and drivers/video/geode/gxfb_core.c, which defaults it to 0 unless it is set by a module parameter:
module_param(vt_switch, int, 0);
MODULE_PARM_DESC(vt_switch, "enable VT switch during suspend/resume");
So it looks like, with 3.9-rc1, you always get a vt switch at suspend/resume unless you have a GEODE video controller.
(note to self: I really should use that pm_set_vt_switch() call for my omap3 display on the GTA04 instead of commenting out the call to pm_prepare_console())
Posted Mar 6, 2013 1:30 UTC (Wed) by Tobu (subscriber, #24111)
Posted Mar 6, 2013 1:37 UTC (Wed) by Tobu (subscriber, #24111)
Posted Mar 6, 2013 11:47 UTC (Wed) by blackwood (subscriber, #44174)
Posted Mar 7, 2013 13:12 UTC (Thu) by sebas (subscriber, #51660)
Looking forward to flicker-free suspend/resume. Because I do that approximately a 100 times more often than rebooting, so not sure why everybody cares so much about flicker-free boot, with suspend states working stable and fast.I also hope to get a nice speedup from this, as the vt switch takes a long time here and is quite blocking.
Now if I only could convince networkmanager to not drop the wifi connection purposefully, on suspend/resume, because that's apparently not necessary anymore with this nice ultrabook hardware. Using ifup/ifdown, it does not and is immediately online. Did anybody try that?
Posted Mar 7, 2013 14:03 UTC (Thu) by johill (subscriber, #25196)
The "ultrabook" behaviour you refer to can be achieved with WoWLAN (http://wireless.kernel.org/en/users/Documentation/WoWLAN) and network scanning offload (while in suspend), but this doesn't exist in Linux yet.
However, a much easier solution could be implemented in NetworkManager: instead of scanning on all channels when resuming, it could scan just the channel that it was previously connected on. If that finds the previously connected AP, it would be able to reconnect almost immediately (delay of less than half a second), vs. a full scan that can take up to 10-15 seconds. This should be a fairly simple NetworkManager change.
Posted Mar 7, 2013 17:18 UTC (Thu) by raven667 (subscriber, #5198)
Posted Mar 7, 2013 20:39 UTC (Thu) by johill (subscriber, #25196)
But ultimately you're right, in the general case you have to scan all channels and that simply takes a while. It shouldn't be more than a few seconds since you're not connected; here it takes ~3.5 seconds to scan all the channels my card supports, but I know that it can be (much) slower depending on the device.
Posted Mar 7, 2013 23:25 UTC (Thu) by dlang (✭ supporter ✭, #313)
Posted Mar 8, 2013 0:10 UTC (Fri) by johill (subscriber, #25196)
1) scan the last channel
2) scan the known channels for the last SSID
3) scan all (remaining) channels
The intermediate step only makes sense if those known channels are a relatively small subset of all channels, but with typical installations they will be. In fact, for many networks like your home network 1) and 2) will be exactly the same because you only have a single AP, but for typical enterprise networks 2) will still be better than 3).
Posted Mar 8, 2013 0:56 UTC (Fri) by mgedmin (subscriber, #34497)
I'd love to see Network Manager pick up something from that.
Posted Mar 8, 2013 9:07 UTC (Fri) by johill (subscriber, #25196)
Posted Mar 8, 2013 15:35 UTC (Fri) by njwhite (subscriber, #51848)
Posted Mar 14, 2013 0:46 UTC (Thu) by kevinm (guest, #69913)
If CLOCK_MONOTONIC in Linux actually worked according to POSIX spec, then a timer based on this clock could be used to fix this problem.
(POSIX says that CLOCK_MONOTONIC measures time elapsed since "an unspecified point in the past", and further "This point does not change after system start-up time.". On Linux however, CLOCK_MONOTONIC stops while the system is suspended, which is clearly nonconforming).
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds