Date: | February 22, 2007 / year-entry #65 |
Tags: | tipssupport |
Orig Link: | https://blogs.msdn.microsoft.com/oldnewthing/20070222-11/?p=27903 |
Comments: | 49 |
Summary: | One of my colleagues recently posted the story of the work he did to get laptops to resume quickly. The fun part was implementing the optimizations in the kernel. The not-fun part was finding all the drivers who did bad things and harassing their owners into fixing the bugs. One some laptops, he could get... |
One of my colleagues recently posted the story of the work he did to get laptops to resume quickly. The fun part was implementing the optimizations in the kernel. The not-fun part was finding all the drivers who did bad things and harassing their owners into fixing the bugs. One some laptops, he could get the resume time down to an impressive one second. And then entropy set in.
But now you have some tools to fight back, at least a little bit. The second half of that article explains how to use the event viewer to track down which drivers are ruining your resume time and disable them. |
Comments (49)
Comments are closed. |
"It’s likely you’ve never seen a real off-the-shelf laptop resume this quickly."
Maybe he should check the shelves at the Apple store.
I just bought a Vista laptop last weekend, and I was so disappointed to see that the out-of-box experience was no better–perhaps worse–than XP. It took more than an hour before all the first-run stuff was done. At one point, the Symantec software told me it needed to reboot so I said okay, then two seconds later warned me that it wasn’t done, and rebooting would cause problems.
A lot of the blame goes to the OEM, with their insistence on dropping tons of trial software and "value-added" utilities. I have 12 tray icons that do various things, at least half of them are non-essential and duplicates of other toolbar, desktop, or Start menu shortcuts.
I’ve always found it strange that PC laptops have such a problem with this. I guess I don’t understand what the big problem is.
Plus you’re using Symantec.
Isn’t disabling drivers a bad idea (like, they may be needed for something.) Couldn’t they be postponed so they kick in after the resume has got the machine running?
So why isn’t resume-time included as part of the the WHQL tests, so that if a driver doesn’t play ball, you just fail it? Why should driver writers care about a requirement that isn’t enforced…
My laptop resumes from standby fairly quickly, now if only I could undock it from its docking station without having to shut down. Attempting to undock otherwise just results in a prompt that LPT1 is allegedly being accessed by a running program. I do expect this has absolutely nothing to do with XP.
What bothers me more is battery usage in standby.
(And I know, I know, using Apple as an example is unfair because of the level of control they have over the hardware, but I’m going to do it anyway.)
If I sleep my Apple iBook, the battery is good for at least a solid week of remaining in sleep mode. When it was new, I got longer than that. I’ve never seen a PC able to sleep more than 48 hours without the battery going dead… what the heck is using up so much battery power in sleep mode? Other than refreshing RAM, there should be nothing running.
I think that as part of the Windows logo requirements they should also have to list things like average resume time and how many crashes get reported in their bucket, along with the standard WHQL cert.
One of the problems with power management is its a dog to debug as a developer, and for end users impossible to work out which driver is refusing shutdowns (usually some idiot that felt they knew best)
But it goes for apps too. The worst ones are those that try and be clever, that dont let you suspend because you might -heaven forbid- undock while suspended. What they fail to realise is that you are going to move your laptop anyway -you arent going to stay at work or miss a meeting just because some app told you you shoulnt power down.
Example:
Nortel VPN client tells you off for trying to suspend while on the VPN. I can pull out the LAN cord or switch off the WLAN without a complaint, but oh, no, powering off is a crime.
At least Vista stops the apps from doing this, though I think drivers can still cause trouble.
@Massif – read the aritcle:
"Congratulations, you’ve found yourself one of those ill-behaved drivers that slows down your system resume. This particular ONE I NEVER EVEN USE, so off I go to Device Manager and disable it. Keep looking, you’ll find more"
James: That may be because the laptop will eventually suspend to disk and turn off completely. Apparently Vista does this too by default, rather than requiring you to choose between suspend and hibernate.
@Aaargh!
When will you apple nutheads stop comparing apples to oranges?
Apple is a closed platform where they control pretty much everything. Windows is an open platform where Microsoft struggles to make sure it works on Hardware platforms and components created by thousands of vendors each working toward their own agenda.
If Microsoft followed the same path as Apple, they too would be making a ‘most wonderful’ product that had 5% of the market. Hello…..
Disclaimer: I do not work for Microsoft, neither am I friend of Microsoft. Just a neutral observer that got thoroughly disgusted with new spate of Mac Ads.
I just love the fact that Mac owner pay about twice as much for their machines. How about software? You pretty very limited in your selection and most of the time there isn’t any freeware or shareware around and you ended up having to pay hundreds for the software package :)
mastmaker, while you are correct in that a lot of the "polish" related issues are not Microsofts fault, it IS the fault of Dell’s and HP’s of the PC world.
They are the ones who select shoddy hardware. They are the ones with the influence to "encourage" their device manufacturers to create a better product.
You have to follow the money trail. Where do device manufacturers get must of their money. Who are their biggest clients. It’s not Microsoft.
That’s just what my wife did. We decided we each needed a laptop at home (vs my work machine). she She was so fed up with our Thinkpad’s inability to reliably suspend/resume that she decided on a MacBook. Seriously. This was her major impetus for switching. She actually likes Windows better!
Is there a way to figure out which drivers are causing suspend/resume problems w/ XP, or must I upgrade to Vista to get debug info?
How many of the kibbizers here have ever written a driver ? I’m guessing none right now from what’s been said.
My OSR manual from 2001 about power management in drivers, "pass it down to the bus driver" and "no one ever gets it right". The new DDK looks to have fixed some of these problems.
OSR’s most recent NT Insider article talks about driver development, since ya’ll want to slag Dell/HP/whomever. The jist is this: almost all hardware is a commodity now. Thus, there is no incentive for hardware manufacturers to spend extra time getting things just right, it makes them less competitive and costs money. Money that won’t be made back, since fickle consumers would rather buy the widget that is $10 less than the one where the widget company spent the extra $10 developing better drivers. So companies will do what they need to for passing whatever the current MS standard is to get signed drivers installed on a machine.
Nathan, I don’t disagree with your basic analysis. However, I think we all want more reliable systems and thus we need reliable drivers.
Microsoft has tried cajoling, begging, hassling, qualifying, providing automated tools and tests, etc. Ultimately the product belongs to Dell, Acer, Lenovo, and not Microsoft. They have to want it to be better.
Okay, so what do users need to do to provide incentives? Maybe there will be at least one OEM who can step up and do a decent job of qualifying drivers so the problems don’t occur. Perhaps the indirect route can work; we’ll all start buying Macs and wait for Microsoft to drop the hammer on OEMs.
All I can say is that I’ve been using Windows for 15 years and I’m pretty damn tired of the status quo.
For anyone interested in the Apple vs Mac vs Linux vs My Shoes debate, go read Jeff Atwood’s post.
http://www.codinghorror.com/blog/archives/000796.html
How about the opposite problem. Why does my laptop sometimes not go into standby when I close the lid because "XXXX prevented the laptop from entering standby mode" (or some message like that)?
If a driver says you cant suspend, you are mostly stuffed. Its refusing the syspend request. Apps can block it too, by failing the WM_POWER request. This isnt an MS or DELL/HP thing -its just bad apps that think they know best.
I have a special utility that does a forced suspend or hibernate; i reach for it the moment the OS takes more than 20s to respond.
Vista fixes all of this, I’m told. Too bad my two year old laptop cant handle it.
Since switching to Vista, my HP TC1100 is back from standby in about a second. I have to say I am most impressed by all the work that has gone into improving mobile scenarios.
My 3 year old laptop handles Vista just fine, Aero and all… (I’ve got a Dell 8600)
Anyway, that’s a bit off-topic :)
@DriverDude: sysinternals.com has ProcessExplorerNt which shows the children of svchost on Win2K or WinXP. I bet the problem will turn out to be Windows Update’s automatic update feature.
Am I the only one to have gathered from this story how cool event logging has become in Windows Vista?
cK,
You are 100% incorrect. These days Apple hardware is no more expensive (and sometimes cheaper) than the _equivalent_ PC. There must be a thousand articles out there comparing Macbook pros to similarly Dells (let alone Mac mini, Macbook, and Mac Pro).
The difference is that Apple doesn’t have any sort of budget / low end machines. The lowest end Mac is a mid-range PC.
As for freeware / shareware, you are 100% wrong on that count as well. Try http://www.freemacware.com/ on for size. Here’s a brief list of interesting freeware I find interesting / useful:
OpenOffice (and/or NeoOffice)
Firefox
Quicksilver
Google Earth
Handbrake
Windows Media support
Real Player
VLC
Picasa uploader
Soundflower
VirtueDesktops
Chmox
Plus the vast majority of Linux/BSD related open source software runs without any sort of emulation environment because the OS *is* Unix-based.
Thursday, February 22, 2007 11:33 AM by Steve Loughran
True. However, the following hotfix worked for me. I think it proves that frequently the cause isn’t even a driver. I thank Microsoft for allowing end users to download this one, and for its success in operation:
http://support.microsoft.com/kb/909095/ja
(Foreign language versions also available.)
Thursday, February 22, 2007 1:18 PM by Nathan
Your guess needs a hotfix for an off-by-one error, at least. I didn’t have to do power management in them though.
Thank you, Raymond.
It turns out that I had 3 problematic drivers:
Virtual Server 2003 R2 virtual network driver. Replacing Virtual Server with Virtual PC 2007 fixes this. Don’t try the SP1 Beta for Virtual Server. Vista x64 wakes up to a BSOD IRQL_NOT_LESS_THAN_OR_EQUAL with every resume with Virtual Server 2003 R2 SP1 Beta2 installed.
HP ProtectTools add 2 seconds to suspend/resume. More specifically, it’s the finger print scanner driver by AuthenTec Inc. that is distributed by HP with ProtecTools that cause the problem.
With these two items gone, suspend/resume very fast.
PS
The treeview categorization of event logging in Vista is fantastic.
Thursday, February 22, 2007 10:27 PM by Brian Reiter
Or only try it on crash boxes. There’s nothing wrong with a beta being a beta. Save the complaints for when releases are like betas.
Don’t get me started on suspend/resume problems…
Too late.
Nathan, that is an a**ine excuse for not delivering proper drivers. I absolutely agree Windows pwr management and PnP is hard to understand – I’ve spent weeks trying to make sense of it. But anyone who decides to ride the coatails of MS to sell hardware into the biggest PC market, then it is YOUR JOB to write proper drivers.
If they don’t like that, then drop out of the PC hardware game. Go sell to Apple – I hear they have fairly good developer relations.
Now, I also happen to think there are things that can be done to ease the development burden. For example, make more use of "class drivers." Nobody ships drivers for USB keyboards, mice – or for that matter, USB and firewire host controller chips. That’s because the industry has decided it is wasteful to have different hardware interfaces for essentially the same thing.
Don’t give me the bullshit of how propritary interfaces "add value." Here’s my retort: poorly written drivers subtract value.
Another example: There used to be a Promise ATA controller driver that caused a BSOD whenever the a disk reported an error. WTF? Why does every storage controller chip vendor think they have to re-design disk drive communications?
There also seems to be an information imbalance, which explains why (some) people make purchase decisions on price alone and not quality. The public just doesn’t know who to blame – sometimes they just blame Microsoft. Kudos to Vista for identifing the offending slowpokes!
IMHO Microsoft can do a great service by making their Windows error reporting statistics public. Of course, Microsoft has lots of app crashes of their own…
And just because no post is complete without bashing MS: I have two ThinkPad that sometimes does not resume properly because "svchost" takes 100% CPU. Gripe 1: svchost is a container for lots of services, so I can’t tell which service is really causing the problem (who thought of that?) Gripe 2: it’s (probably) not a driver problem becuase it’s two different ThinkPad vintages and happens on both Windows 2000 and XP. ARRRGGGG!
Most of the time it works and my WinXP thinkpad resumes in less than 3 seconds. Not bad.
As for Apple… they still don’t Hibernate, do they? Standby is great and all, but often I want to turn the whole thing off without losing my apps. Hibernate is great with desktop PCs – I don’t care how fast MacOS or Windows boots, what matters is how fast I can get my apps back.
Someone was asking why battery life was sometimes so bad on suspend for PC laptops. It turns out that there are various different types of suspend to RAM that can be done. My understanding is that there are two common ones: S1 and S3. S1 seems to be older (and thus more likely to be used in older machines) and is probably "easier" to implement. S3 only keeps power going to RAM, S1 will keep power going to much more of your system during standby.
If a laptop was doing S1 suspend then its standby battery life may not be so good.
The battery needs to power the memory if the memory hasn’t been written to disk. If it has, then it’s now hibernate rather than suspend. Macs just happen to have a single mode that combines the two behaviors so they’re mostly indistinguishable to the user. I’ve read that Vista does the same thing, though I haven’t seen it in action.
DriverDude,
All current Apple portables support hibernate. When you close the lid, the necessary state is written to disk and then the system suspends. If your battery runs out of juice or the battery is taken out it will simply restore from disk.
I’m going to shock some people here, but this is how the PC business works. When it comes to corporate PCs (not consumer or small biz systems), you, the end user are not the primary customer. Your IT department is, and whoever is in charge of placing that order for 500 laptops. It is no more a personal choice than exchange server.
IT departments care about what reduces their support calls, CIOs care about operational cost of productivity. If you have to wait 45s versus 10s for resume, it doesnt matter to them, and saving $50 on the laptop or, even better, a system that is easier to remotely manage, matters much more.
Now, before you go off and complain to your IT dept, remember what they have done for your laptop: given you good WLAN in meeting rooms, power sockets when you need them, and VPN networking. Because connectivity really matters to employee productivity, whereas transition times from S4 to S0 are not their concern. Failure to transit from S4 to S0, yes, but time it takes? Forget it.
Apple dont target the enterprise so much, so have lots of features good for end users, a bit less for the IT department. The other thing is that power managment is very hard to get right. Really hard to get right, and in the heterogenous world that is PC parts, very hit and miss.
Its very easy for us to give MS, HP, Dell or random device driver the blame for this situation, but it is the customer who is at fault for this, which in the enterprise is not you, the end user. These days there is pressure, competitive from Apple (now they have good CPUs) and from consumers. Consumers are driving wide screen laptops and want entertainment laptops, not things that let you delete email while someone talks through their animated powerpoint bullets that are sliding in one by one on the projector.
And remember, if you think MS suspend/resume is bad, at least it works most of the time. Which is not the case for Linux power management, which is still very hit and miss.
Greg, assume that since I’m reading Raymond’s blog I’m not an idiot. ;)
I know Apple laptops support hibernate. That has nothing to do with what I’m talking about. Apple laptops don’t switch from sleep to hibernate until the battery is almost completely dead. (Or at least that’s how my iBook behaves.)
If I put my iBook to sleep, and sit it in a corner for a week, come back, open the lid… it wakes from SLEEP mode, not hibernate mode. I know this because it doesn’t spin up the HD and load 640MB of saved OS and programs before it becomes usable, like hibernate requires. It’s usable in under a second after a week of sleep.
I’d also argue that it’s impossible to switch from sleep to hibernate and be "indistinguishable", since sleep mode doesn’t require spinning up the HD before you can use the laptop and hibernate does. Spinning up the HD is slow in my iBook.
My Dell laptop doesn’t even come close, it’s dead after 72 hours. Dead-dead. I’d love it if I could just leave the (charged) Dell laptop in my backpack on friday, forget about it over the weekend, then come open the lid on monday on the train and start working.
Ok, I stand corrected on Apple laptop hibernating, but it isn’t obvious to me how to hibernate a desktop Mac – like a G5 tower, for example. Yes, I want it all! :-)
There is a significant diff between S1 and S3 suspend and some hardware – or drivers! – can prevent a system from utilizing the better S3 suspend. S1 spins down the hard disk, turns off the LCD and halts the CPU but actually keeps power turned on to all those components. My test for S1 vs. S3 is simple: press the CD-ROM eject button; S3 actually turns off power (except RAM) so the CD-ROM tray will not eject, but it will eject in S1.
There may not be such a distinction on in MacOS X.
I have noticed some computers keep the kybd and mouse powered even in S3, whereas some do not.
Mine will do that okay, and it’s a 2 year old latitude 600.
Cripes, I didn’t want to start a Mac vs. PC flamewar, I was just griping that my Dell battery runs out quickly in sleep mode.
> James: That may be because the laptop will
> eventually suspend to disk and turn off
> completely. Apparently Vista does this too by
> default, rather than requiring you to choose
> between suspend and hibernate.
No, it stays in sleep mode the entire time with a sub-1 second wake time.
What I don’t get is what the hell the Dell is doing that uses up that much power when it’s not *doing* anything. I mean, you’d expect a 1-week+ sleep time if the computer’s not even being touched… what’s using up the battery? The HD is off, the wireless card is off, the DVDdrive is off… the CPU is off… does the little switch on the hinge take up 5 watts or something!?
My Alienware Aurora m9700 laptop was supposed to be a powerhouse of a portable game machine. It’s a 2.4GHz AMD Turion 64-based system, with 2GB of RAM, dual 256MB nVidia GeForce Go 79000GS video adapters running in SLI mode, dual 80GB portable SATA hard drives running RAID 0, and Windows XP Pro. Honestly, I don’t care how fast it resumes from standby, it’s fast enough, I’d be happy if it just didn’t BSOD 10 times a day. Done so since the day I pulled it out of the box, and tech support acts like it’s my fault. Next time, I’m buying a Mac, and I hate Macs. Until that day, any idea of how to determine if it’s just a driver problem, or is this piece of crap DOA?
AWH: Do you have it configured to generate crash dumps on BugCheck? If so, the Windows crash reporting might give you a hint; you can also get things like stack backtraces from windbg, which should point the finger fairly clearly. (The name of the driver should also show up on the BSOD itself, although that’s not always the true culprit.)
Also try something like driveragent.com: see if you’re using old drivers for anything, since replacements might well have fixed the bug.
Re proprietary interfaces, I think maybe Microsoft should take the lead and come up with class drivers and standards and pitch them to hardware makers.
Looking at the mentioned example (storage controllers), I wouldn’t be surprised if part of why they want proprietary is so they can add fancy features that only they have (features that they hold patents on naturally :). If there was a universal standard for disk controllers, it would be much harder to do that.
My #1 wish for standardization (other than video cards which will never happen) would be networking cards and chipsets (both Ethernet and WiFi).
Jonathan Wilson: As soon as you standardize something, somebody will come along with a new feature that doesn’t fit the model and requires its own custom driver.
For example, you standardize an Ethernet interface and somebody comes along with TCP offload engines. You wait a while for the market to pick the best implementation and standardize it. The very next day somebody will come out with SSL offloading and you’re right back where you started. Go ahead and standardize that too, but you’ll already be behind the curve when VLAN tagging gets implemented in hardware.
on all my XP machines (laptops and workstations), if I suspend the machine to RAM and leave an open browser window with a Flash-Ad or Flash-movie (say YouTube), as soon as I wake the machine up it tries to draw all missed frames. If the machine was suspended for 24 hours it sometimes takes 15+ minutes to resume. Everything works well if I close all browser windows that contain a Flash movie.
I filed a bug report against Flash 7 on the Macromedia page and they marked it as fixed, then they regressed with Flash 8. It doesn’t work since then.
I really wished that it was only drivers that behave badly.
Sunday, February 25, 2007 6:42 PM by Miral
Didn’t the following patch work for you? It worked for me with the exact same symptoms. But maybe I’m a technology hypochondriac.
Thursday, February 22, 2007 9:19 PM by Norman Diamond
On the other hand, battery usage in standby or hibernation doesn’t look like Microsoft’s fault. For example the BIOS is still active even while powered off (hibernating or completely shut down), just very slowly. In my experience Dell seems to be doing more than other manufacturers that I have experience with, and it drains the battery a bit quicker. That can be avoided by removing the battery. Dell’s BIOS does other odd things, for example if the battery gets down to 3% then it boots the hibernating Windows system in order to wear down the rest of the battery and lose your session.
Blaming Vista for long install times when most of it is OEM shovelware is rather low. Who the hell uses the default OEM install anyway? First thing I ever do with a computer is wipe it clean.
Vista Business installed in about half an hour on my Dell laptop. Resume is practically momentary, the computer resumes from standby faster than it shows the "Dell" POST logo on power-on. And the only driver giving me grief is nVidia’s, but that’s pretty much par for the course with their products, as I’ve come to understand.
Clearly there are some driver writers who DO get suspend/resume right, meaning it can’t be impossible. Anyone who says so is just trying to blame someone else (usually MS) for their problems.
The thing that really annoys me in XP is when I go to "hibernate" and it starts going but then it just pops back to the desktop with a balloon showing an obscure HRESULT and saying "whoops, couldn’t do that". And then, to make matters, worse, it goes and *removes* the hibernate option from everywhere and won’t let me try again until after rebooting. Which is just insane.
I haven’t quite nailed down the trigger condition yet, but it seems to happen when I have too many processes open (or maybe the wrong process open) across multiple users. And it only started happening once I got 2GB of physical RAM — when I had 1GB, it never happened.
I hope it’s been fixed in Vista. Heck, I’m still hoping they’ll fix it in XP, though it seems unlikely.
So I’m not the first to point this out, but *if* (and I in no way believe they do) microsoft actually cared about consumers, they could do two things:
1 – add boot / restore speed tests to the WHQL test suite
2 – write the app described by the above blog, call it "Why does my laptop boot slowly", and list the offending drivers, devices, and contact information for the vendors’ presidents. Dump it in the control panel and encourage users to run it.
Ideally, some combination of #1 and #2. This would tell consumers who is at fault and hopefully lean on the manufacturers to fix it.
earl
Someone who knows where it should belong should actually forward that last comment to whatever internal / public microsoft newgroup / mailing list that is appropriate. I believe its an excellent suggestion
I’ve met many people – usually software managers – who think WHQL testing is a 1) waste of time/money; 2) an attempt by MS to control their market; 3) invitation for cheating by competitors
My standard retort is if, historically, driver writers had done a better job, MS would not have to institute WHQL. Although I’m inclined to agree with #2 in regards to DRM – that’s a stated goal of the Protected Video Path initiative.
Funny thing is, my Linux laptop running ubuntu resumes in less than 1s :)