Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Saturday, June 13, 2009

Workaround for Some Instances of Win 7 WiFi Problem

One of the very few real broken bits in the Win 7 RC is a WiFi problem. The current thread on Microsoft TechNet is here.

On at least a few laptops, the following is a dependable if annoying workaround.

  1. Turn off the WiFi with the laptop hardware switch (“airplane mode”)
  2. Open Start –> Computer –> Manage –> Device Manager –> Network Adapters
  3. Right-click and disable the wireless adapter
  4. Wait a bit and verify the OS has completely lost the wireless adapter (by watching the icon in the tray)
  5. Turn on the WiFi with that hardware switch
  6. Right-click and re-enable the wireless adapter
  7. Wait … potentially a couple of minutes for Windows to find the appropriate network, connect, and recognize the route (if applicable) to the Internet

This maneuver is a hassle, to be sure. But it seems to work 100% of the time on some laptops (including mine) and it is much more convenient than rebooting, which is the only other dependable solution.

Tuesday, June 09, 2009

Windows 7 RC, One Month In

A month ago, not long after the RC was released, I wiped my ol’ Server 2003R2 notebook (yes), and installed Win7 x64. Time to try a consumer OS on the machine again, finally go 64-bit, and jump without a net (I had a big client demo coming up and decided it would be sink-or-swim with 7).

First, a word about this laptop. Bought in the holiday sale period of ‘07 just for client demos and occasional web surfing, it would take a whole new, um, “lower end” category of Microsoft “Shopper” commercials to capture the spirit of this baby: for $299 I got a mobile Celeron (1.6 GHz, one core, no HT) and 512MB of RAM. Billed as “Vista Basic Ready,” it was being discontinued due to … not really being Vista Basic Ready. Well, duh. I had given up on Vista after my 3.6GHz desktop choked on it, so I put another GB in the laptop and loaded Server 2003R2 (using unofficial XP drivers I grabbed off the net).

So … Windows 7.

Upon install, all of the hardware was supported perfectly, which isn’t a huge surprise since 7 uses Vista-era drivers and this hardware ensemble was originally targeted for Vista.

Except for a compatibility issue with AVG Anti-Virus (which I’ve written about before), it has worked almost perfectly with everything I’ve thrown at it – ranging from Office and Visual Studio 2008 to Alfresco Enterprise (yes, a Java server app), Google Earth, and Ruby. Overall performance has been excellent and better than I would have expected. No, I wouldn’t play games on this machine, and the 5400-rpm hard drive can be a drag just as it is on most laptops.

The two big negatives I’ve seen are as follows and will hopefully be fixed by RTM time.

First, there is a well-documented issue with WiFi. On a cold boot, Windows does just what you want it to do with the WiFi. But, after waking from sleep or hibernate, or trying to switch networks a few times, it just cannot seem to sort itself out. Most of the time you are forced to reboot to get a working connection. This bug is all over Microsoft’s Win 7 feedback forums, I’m just too lazy to look up a link right now. So hopefully it will get a fix.

Second, the integration with other default browsers (I use Chrome) is broken in a bunch of places. Many of the cases where the shell is called to supply a browser to a specific URL do not work (e.g., menu options in twhirl, connections to the web from Office Live). In addition, Windows doesn’t want to associate local .html (or .htm) files with Chrome. Sometimes I can get these things fixed, but then they revert (perhaps partly a result of Chrome’s auto-updates).

These cases all work fine on XP and don’t require in-process loading (suggesting it’s not a x86/x64 issue). It’s inconvenient, and the anti-trust folks will be back after Microsoft if they don’t make other browsers first-class citizens soon. So this bug should get squashed.

Aside from those two admittedly very annoying issues, this is a really solid, fast, and elegant operating system. How serious is the “Microsoft tax” issue on OEM PCs? I don’t know, but if I do pay such an implicit tax on a new machine, I’ll be a heck of a lot happier if I can get a Win 7 license out of the deal and not a Vista license for my trouble.

Thursday, May 14, 2009

Windows 7 and AVG == Unhappy CPU Usage

The title pretty much says it all.

Backstory is that I ran Windows 7 in a VM without any anti-virus while doing some evaluation, and I was impressed by how sparing it was of resources.

Then I installed the RC on my (underpowered old) laptop, figuring it would be a good replacement for Server 2003 (which is resource efficient but not exactly designed for laptops).
The RC used somewhat more memory -- it appears to be able to adjust its memory footprint depending on the host hardware, which is cool -- and a ton more CPU.

The CPU usage was suspicious because it's rare to find software that consistently pins a CPU with actual work, and because the usage was high priority -- coming from kernel space or a library tied tightly to kernel hooks. It was also suspicious because Microsoft plans to sell a version of 7 on netbooks, which are even more underpowered than my two-year-old bargain-o-matic laptop.

Turns out AVG, generally a fine anti-virus product, struggles with Windows 7 and often insists on every available CPU cycle, while the end user sits there wondering why context menus won't even open anymore.

After a bit of Googling, I removed AVG and installed Avast, and 7 is screaming along on the laptop now.

Note the retroactive Windows 7 hardware subsidy: this laptop was discontinued by the manufacturer in '07 because it shipped with Vista Basic but proved so slow as to be completely unusable in that configuration. The new OS basically injects value into the old machine.

Monday, April 13, 2009

Random Bit: Sysprep Re-Writes Boot.ini … Not Always Correctly

I discovered the hard way that Microsoft’s sysprep tool (for configuring machine images) re-writes (at least some of the time) the boot.ini file, the file which tells the Windows initial bootloader which OSes are installed on which devices and partitions.

The new boot.ini contains the same OSes as the old one, but it specifies a different default, and a zero timeout for the user to choose what to boot.

I can imagine some reasons why sysprep might want to do this, based on speculating how I might deploy enterprise images.

Only the thing is, if I were going to re-write boot.ini, I would at least check to see which OS was currently running and maybe make that the default. As it is, sysprep made a different OS the default – it picked the “first” OS in the device tree even though that is not the OS I was trying to sysprep. This behavior seems more like a bug than a feature.

In any case, if this happens to you, there was no long-term damage done -- you can just reconfigure the boot.ini file by hand and restart.

Monday, April 06, 2009

Enable “Modern” (Themed) Common Controls in Hybrid WPF/WinForms Apps

Here is a quick hint to save someone from a bunch of Googling:

If you are building a WPF app, you may find that you need or want to also use some Windows Forms windows. In my case, I was adding a form just to host a WinForms control, so there was no point in creating a WPF form just to host the WinForms Host container in order to add the control. A more common scenario is you want to invoke a built-in Windows dialog box, which is not natively a WPF object.

If you do this, it will work, but you will notice that some controls are rendering their old-fashioned look and behavior – you’ll be zapped back to the era of Win 2000 or the earliest .Net apps that lacked the benefit of comctl32.dll version 6. Square edges, no mouse-hover behaviors, etc.

The short answer for how to fix this is that you need to add a call to System.Windows.Forms.Application.EnableVisualStyles().

Add it once, somewhere early on. It’s ideal (though not always necessary) to do this before you start instantiating the WinForms objects.

Apparently the template code for WinForms projects contains this line, and depending on your POV, that’s either “low level boilerplate that an app developer shouldn’t have to care about” or “the kind of thing that kids nowadays just take fer granted with their magical IDEs and WYSI-whatnot, virtual memory and lazy programming habits.”

I was also particularly motivated to write this post because the most accurate (and earliest) Google hit I found on this topic was to one of those scam programmer support boards, where they wanted me to sign up for a trial with a credit card just to see the discussion thread on this issue.

Which is half insane if they could persuade me that had the right answer inside, but 100% insane since there was no way for me to know that their “answers” weren’t way off topic from clueless n00b who thinks a HWND is what you pull to keep the rain out of your office.

Friday, March 27, 2009

Harm Reduction in Windows 7

Guest mode … kid mode … whatever you want to call it, is brilliant.

But more than that, it’s an interesting admission that (1) you can’t fight the power of the darknet and (2) you might as well empower people to behave in a way that minimizes the damage, whether or not you approve of what they’re doing.

If I had a dollar for every individual who ever swore they never go near warez or pr0n or questionable media downloads, and ended up with a mucked up machine … or worse, a machine that transmits their passwords and SSN to a bad guy …

Even with an older OS, like XP, one can achieve a fair degree of isolation and protection by using a patched up Firefox or Chrome on top of a plain user (not admin) account. There are still holes by design; e.g., a user could fill up the hard drive or install software that persists in certain places. And I’m sure there are serious security flaws that allow code downloaded as user to escalate itself to admin … perhaps even coming from a “drive-by” Javascript source via Firefox/Chrome … but such threats seem to be pretty darned rare if everything is patched up and prophylactic protections are applied (e.g. Spyware S&D’s “immunization”).

Guest mode (and IE 8 “In Private” browsing) appears to close many of the remaining holes.

What we need now is an education campaign to convince people to segregate their online activities. But besides not knowing how to create these low-privilege accounts, a lot of people I know refuse to admit they ever visit the darknet. Or the visits are rare and they “hope for the best.”

Let’s pre-configure – by default -- a second account for ever power user (or admin) on a machine. At login time, offer the guest (more protected) account along with some description of when it might be a good idea to use it.

I’m not sure the best way to label the buttons, because it’s a bit hard to explain how the more secure, more protected mode is paradoxically for the more anonymous, more dangerous behavior; while the “less protected” mode is for normal operation which might involve vital personal data. I’ll let the UX wizards sort this part out.

Friday, February 06, 2009

Windows 7 Keeps Suspending in VMWare? Change Your Power Settings

I'll admit, I fell right into this one.

My Win 7 VMs kept suspending while I was off working on another machine. I'd come back to the host machine and see VMWare Workstation idling with the Win 7 instance frozen in suspend.

Hmmm... Doh!

The default power configuration for Win 7 -- even when on the machine is "plugged in" -- includes dropping into sleep mode after half an hour.

This, thanks to VMWare, translates into a "Suspend Guest" operation.

Maybe Vista shipped a default power configuration like this. I don't remember it being the case, but, to paraphrase Pulp Fiction, "[Vista] may [save power] like pumpkin pie, but I'd never know 'cause I wouldn't [run] the filthy mother****"

Monday, January 12, 2009

Windows 7 Product Name is Missing a Feature

I didn't feel strongly one way or the other about the Windows 7 product name (i.e. "Windows 7") ... until recently when I wanted to troubleshoot the Azure SDK on Windows 7. (Apparently Azure on 7 has worked with the M3 build for at least one intrepid forum poster, but it's not behaving with the beta build for me at the moment.)

I started searching newsgroups, forums, blogs, etc., and realized that "Windows 7" is not a great search term.

On an engine like Google you can put quotes around it, specifying exact phrase, but some other full-text search systems don't seem to want to keep the Windows and the 7 together. Or perhaps they have an index by single words, and they link the results together to match your phrase later, but once you throw in other terms like SDK and Azure, the matching engine becomes a little more promiscuous, offering you a "promising" combo of Azure, SDK, and Windows ... or SDK and 7 ... as a higher-ranked match. Making it, in any case, rather harder to find what you want.

One-word product names, like "Silverlight," "Vista," and "XP" work a lot better for this kind of search.

Which is perhaps a reason that folks include the release name with the version number on products such as Ubuntu (Hardy Heron, Intrepid Ibex, etc.)

So ... what would be a good nickname to put next to Window 7?

Sunday, January 11, 2009

Another Windows 7 Milestone: Bounce vs. Hibernate vs. VM Suspend Times

Lately I've started running the Windows 7 Beta for some development experiments, using VMWare's fantastic dual-screen support. As I've written before, the general experience is great, even under virtualization with 1GB of RAM, and having it wall-to-wall on multiple displays makes the illusion more convincing.

An interesting thing I've noticed is that my old habit, when I want to stop working in a VM and free up the resources, is to suspend the VM. This action is roughly (but not exactly, depending on the VM you're using) equivalent to "hibernating" a laptop (S4 power state) -- memory is mapped out to a file and the device is powered off.

I usually do this because this hibernate/wake is faster than a shutdown/boot-up, not because I'm trying to save my actual work state (open apps, etc.) Especially with Windows server, but even with XP and Linux, this approach is the faster way to hop in and out of a work session. On the laptop, it's a way to save the battery power involved in a longish hard boot.

In Windows 7, VM suspend/resume (==hibernate/wake) seems to be slower than shutdown/boot. That is, even with no user apps running (which could take up an arbitrary amount of memory and thus lengthen the map-out / map-in time), boot seems faster. I say "seems" because I have only 2 machines to play with, and they are not clean images just for this test, so I won't pretend they represent absolute objective truth.

What does this mean?

It would appear that the boot process has been cleverly streamlined so that a cold machine gets to a running, usable state before all of the additional services and apps have fully loaded and gotten running, and that this is orchestrated using knowledge that a white-box VM player doesn't have.

Some folks may point out that having to reboot an OS is itself questionable ... and indeed the boot is optional -- I only reboot my XP desktop every couple of months when some security patch or other requires a restart.

But in the world of laptops and netbooks, things are different: every minute of juice is valuable, so there's always the consideration of the cost of a hibernate/wake vs. sleep vs. leaving it on with the LCD off. And that equation has just gotten a little more interesting: for Win 7 on a laptop, if you're not going to be using the machine for a while, it may turn out to be faster and use less power to do a shutdown, and just reboot later.

While this may seem like a fairly inconsequential gimmick about boot times, it is a step in the right direction as we look at the huge array of gadgets we all use and which eat a ton of phantom power. The Windows PC is kind of the holy grail for a fully-off / instant-on experience, and Win 7 appears to take a measurable step in that direction.

Thursday, November 06, 2008

Windows 7 Puts on a Good Show

I took Windows 7 for a quick test drive yesterday. My main goal was to see whether the performance would be so brutally bad as to make me relive my Vista experience.

For those who haven't read my Vista posts, the short version is: early Microsoft developer releases had unbearably bad performance; Microsoft made excuses ("debug build" etc.); turns out the RTM was nearly as bad. I made an honest attempt to run Vista but, as a developer, I just couldn't bear the excruciating waiting, knowing that I could be screaming along in XP. I run XP (or Server) to this day for my development.

Just the Vista-like look of the early Windows 7 bits made me anxious -- I wasn't expecting a lot. I set it up in a VMWare VM with 768 MB of RAM and no VMWare tools (= minimal video perf) in order to torture the OS. Naturally, things would be better running on the metal in a new machine designed for Win 7.

Install was very fast and seamless. I could see a difference right away in perf: even the shell in Vista runs slow, and this one was snappy. I saw the new-and-removed UAC, and I liked.

To add some more load, I installed Visual Studio 2008, which is a fairly heavy app. In addition, it was Visual Studio that had made me give up on Vista in 2007, so I thought it was fitting to try it again.

Inside Visual Studio, I opened a WPF windows project. Mucked around with the GUI editors, built, debugged ... and it cruised along nicely in the VM. Next, I set up an ASP.Net web project, and got that going in debug mode with the integrated server. Finally I started to feel some minor slowdown -- but it appeared I was running out of RAM with my 768MB VM. This was not a huge shock, since my install of Win 7 was consuming about 450MB RAM at idle, with no user apps running.

The 450MB RAM usage is a little disturbing, but, hey, even fast RAM is cheap. And my Server 2008 setup was idling at about 350MB with few services enabled, so I suppose this usage is to expected.

Overall, I was very happy with my Win 7 preview. I could see myself actually using this as my OS and not cursing all the time, which was a pleasant surprise.

The big unanswered, and unanswerable, question is: how similar will this experience be to the final RTM of Windows 7?

On one hand, Microsoft might have released this preview "stripped down" -- either to make it run better on today's hardware, or just because the additional components with which it will ship are not yet ready for public consumption. In that case, future builds might be slower.

On the other hand, still smarting from Vista, Microsoft might adjust the previews in the opposite direction -- a sort of "under-promise, over-deliver" thing -- lest anyone see a later build and say anything except "wow this is fast."

Thursday, October 16, 2008

Listen to Early Windows 7 Feedback, Even From Developers

At the upcoming 2008 Professional Developers Conference, Microsoft will be showing Windows 7 to developers.

My bet is that the 160GB portable hard drives they are handing out to distribute preview bits will actually contain Virtual PC images of Windows 7 in various states or configurations. Such a setup will be more convenient to try, even if it does narrow what aspects of the OS can be seen.

In any case, Microsoft would do well to pay attention to the feedback it receives from these developers.

We know all of the reasons why geeks can make poor proxies for "real end users." Nonetheless, I recall the 2005 PDC, when Microsoft gave us the latest beta of Windows Vista. A chorus of complaints arose from many who tried the new OS. It's way too slow; it doesn't work with the hardware we have; we can't explain the 10-odd different SKUs to our customers.

Do these sound familiar? They should, because they're uncannily similar to the problems "real end users" found -- and continue to find -- with Vista.

At the time, the 'softies at the conference, who are generally open, approachable, and humble with regard to technical matters, didn't want to hear these complaints about Vista. I was rebuffed more than once: the SKUs haven't been ironed out yet; the beta build is a checked debug build, so of course it's slower. Well, maybe. But I found it to be little slower than the release build on the same hardware. Either way it was unusable.

I think everyone's learned from the Vista experience -- and that includes Microsoft, ISVs, consumers, PC builders ... and Apple.

Let's try it differently this time around, starting with feedback from PDC.

One last thing: it would make sense to release the Windows 7 preview to the general public at the same time. Why? It'll be on the file-sharing networks instantly, where there is a greater chance of folks downloading a trojaned image, etc. So it will help everyone to have an official distro from Redmond instead.

Tuesday, September 09, 2008

Presentations from SF Flash Hackers August '08

A couple of weeks ago I gave two mini-presentations to the SF Flash Hackers group, on topics I've talked about here before ... but I figured I'd post the slides to slideshare.

Here are slides about porting a large Windows app (Mindjet MindManager 7.2 with Connect) to run in the browser via Flash (developerd with Flex):

 

And here are slides on generating ActionScript 3 code from UML class diagrams using my VASGen tool -- which is really a contribution building on two existing tools, the Violet UML modeler, and the Metaas ActionScript 3 meta-library (in Java):

As3 Code Gen from Uml
View SlideShare presentation or Upload your own.

Wednesday, September 03, 2008

Amazon EC2 to Support Windows Server AMIs

Jeff Barr, Amazon Web Services Senior Evangelist, just finished giving a talk at "The AWS Start-up Event – San Francisco" in which he showed slides listing upcoming plans at AWS, including support for Windows Server.

This is an exciting development, as Windows Server / ASP.Net make for a fantastic if potentially expensive platform. Now Microsoft has to step up to the plate and come up with a pay-as-you-go, per-cycle or per-cpu-hour licensing scheme.

One of the things that makes ASP.Net interesting is that it lives in a nice middle ground between Java, which is extremely fast (in EC2, this means less expensive per transaction) and has great "enterprise" capabilities but is cumbersome to develop with, and, say, Rails, which is quite slow and has poor enterprise app cred but is very pleasant and lightweight to develop with. ASP.Net, especially with the MVC framework and forthcoming support for Python and Ruby in addition to C# and the other .Net languages, seems to combine extreme performance, easy development, and access to as much "enterprise" as you need while offering lightweight alternatives like LINQ and SSDS.

My point isn't to make a commercial for ASP.Net, but to point out that if Microsoft can get their licensing in order, they might catch up in the cloud world through fast, cheap development cycles plus faster (and hence cheaper) runtime operation on a given machine instance than some competing platforms.

Just to be fair, cloud vendor enomalism has run Windows Server on EC2 before, by virtue of the Qemu emulation software (on top of Linux). But if we're talking about maximizing efficiency, wasting cycles on another layer of emulation (EC2 instances are of course virtual to begin with) doesn't sound like the way to go.

Wednesday, August 06, 2008

[How] Will Microsoft Weather a Perfect Storm?

Last week's article What Is Microsoft So Afraid Of? is meant to be provocative ... but it is also real reporting.

Thinking about the situation Microsoft is in, I believe the firm has, at a high level, quite a lot to be worried about ... a sort of perfect storm of high-level business trends, many of which transcend any individual product or feature. Big trends are harder to debug and then patch on Tuesdays.

Here are the issues:

  1. Declining importance of the desktop OS. As people spend more and more time in their browsers, the OS underneath it matters less. The trend is definitely toward more browser-based apps, even if they employ Flash or Silverlight or other acceleration technologies. Offline support is moving slowly but together with cloud (Mesh?) storage, will make the local filesystem less important.
  2. Rise of OS X as a real competitor -- between publicity, 'time to sink in,' and the decreasing premium that Apple charges for a Mac over a similarly equipped Dell/Acer/Toshiba laptop, OS X is a real and growing threat to Windows.
  3. Bill's off to save the world. For a while now, Bill has been the good cop (hey, stop laughing, I'm serious) to Steve Ballmer's bad cop. Now that Gates has retired to work on philanthropy, and Ballmer's the CEO, we're seeing more dumb-ass bad-cop stuff like the Mojave experiment, and less brilliant product strategy. Microsoft needs a good cop to pair off with Steve.
  4. Vista failure. The .Net platform was one of the smartest, most successful things Microsoft has ever done, an enormous accomplishment that brought enterprise IT shops and other developers along. Following that up with Vista isn't just bad at the retail (license selling) level, it shakes enterprise confidence in MSFT, and ticks off developers. From a developer POV, most of the cool stuff in Vista was gutted, or moved somewhere else ... or never really worked very well (WPF), after years of build-up. Now MSFT desperately needs devs to buy into "the next thing," and they're hesitant.
  5. Silverlight stuck in transition: Silverlight 2 is an awesome technology... but it has two problems: First, small penetration, unknown/unpublished penetration numbers, and no specific numeric commitment by MSFT to create penetration on PCs. Second, folks are sceptical that Silverlight on Mac really has a future. If that's in doubt, it seriously impacts the choice to use Silverlight because of #2 above. I can say that I've already had more than one client interested in doing serious work on Silverlight 2, but they insist on installed base projections (not download numbers) to make the business decision, and I don't blame them.
  6. Rise of console gaming: PC gaming was always a key part of the "latest and greatest" PC/OS/component ecosystem, plus it helped press down Mac adoption. As consoles (including Microsoft's own Xbox 360) gain, this relative benefit of the Wintel client platform goes down... and yet MSFT still has to spend a ton on R&D if they intend to keep the PC gaming client (DirectX and hardware integration) decent. So less bang for the buck there.
  7. Rise of USB. Now that practically everything runs over USB, it's easier for device makers to offer Linux, MacOS, etc. drivers (the upper layers can often be just user-space apps). So on the peripheral front there is less Windows differentiation in terms of hardware choices, and less lock-in.
  8. Reluctance to innovate with server licensing model. Most startups dream of going big, and they assume they'll do so on an open-source stack -- not because Windows Server isn't a killer product ... but because the current licensing for Server makes it a non-starter for cloud services or for architectures designed around cheap, flexible horizontal scaling. An easy fix is to add auditing to the core WMI counters and create a Windows Server SKU that costs $0 per CPU and $0 per client ... but to stay in compliance you average your ASP.net transaction count, or SQL size/complexity + operation count and then cut a license renewal check. Make it free (as in beer, with online-only support) for the first few thousand page views per month for a typical app, and it'll rapidly start taking over a big piece of the startup and cloud/on-demand computing world.

All this said, big companies tend to have nine lives (even if Yahoo! seems intent on burning through all nine of them). So I'm not about to count Microsoft out, or suggest an "over-the-hill" tipping point is at hand. Just some big decisions, both strategic and tactical, that ought to be made well and soon.

Thursday, May 15, 2008

Vista Performance: It Really Is That Bad

I try to stay away from the rant post, it's too easy and doesn't contribute a lot. But I feel myself succumbing, so at least I'll try and mix in a little useful material with my rant.

I just spent some significant time trying get Vista to behave on my wife's laptop. By behave, I mean not make it impossible for her to surf the web with Firefox because the CPU was pegged most of the time and the HDD never spun down.

First, some facts:

  1. I'm as close to a Microsoft fanboy as you'll find in the Bay Area. They do great stuff. I'm an ecumenical kind of guy, so I also so like Ruby and Flex and Java and Linux (wait 'til my next MySQL post). I.e., I'm not married to Microsoft, but I think they have done some amazing engineering in the last 10 years and it's a pleasure to work with almost all of their late-model products.
  2. This machine, while not blazing by 2008 standards is only a few years old, does have a 3 GHz HT proc, multiple gigs of RAM, nVidia graphics, plenty of hard drive space, etc. In fact, it ranks in the 4.x range on Vista's own "performance estimate" in every category except graphics. Which shouldn't matter because Aero Glass is turned off, and my wife isn't a gamer.
  3. Just to cover all the bases, it's plugged in and not configured to ever step down the processor or anything like that to save power. And there's almost no software on it. It's basically Firefox and MS Office, Grisoft/AVG, whatever Windows Update considers critical, and not much else. My wife runs under a non-admin account because she neither wants nor needs to install or configure anything on it.
  4. An early-ish adopter, I was forced to abandon Vista after seeing it run cripplingly slowly on a 3.5 GHz, 5+ rated desktop. As a developer, watching this machine churn while it tries to decide which UAC prompt to throw next wasn't acceptable, since I had XP on the same box (dual-boot) and could measure that XP was easily 25% faster. But the wife liked Vista's look and feel, actually preferred it to XP, so cool, didn't think perf would be a big issue for her.

Ok, so the performance was all gone to heck. I checked all the obvious background tasks that could be going nuts, virus scans, disk indexing and all that. Found a few services and tasks that had caused problems before and disabled all of them. Can't imagine why they're running by default. What ever happened to configuring services to run based on their actually being needed by something the user wants to do?

The killer this particular time was the 'network location awareness service' and the DNS caching service. First, NLA. According to MSDN (full info here), this service is 'vital for computers or devices that might move between different networks.' First, I'm not sure I believe that; so far, the computer seems to work better without it. The little icon (and service) that would take 5 minutes to realize the machine was actually on the Internet (you know the icon) is now dead, and apps connect right away. Funny how that works.

Just for the sake of argument, let's pretend that it really is 'vital for computers moving between different networks.' Here's a clue: (1) it doesn't take much monitoring for the machine to realize it's always on the same network in my house, so (2) shut this stupid service down, (3) if another network is detected or the old one is unavailable, maybe then spin this beast up and (4) monitor your own resource usage -- if the service starts using 50%+ of the CPU all the time, for whatever reason, and the network isn't ever changing, why not shut it the #$% down at that point?

I could make the same argument for DNS cache. Although it boggles the mind how a service this simple could ever be using a real percentage of a modern CPU. I turned it off. I guess Comcast will hate me now for making an extra 25 lookups a day.

I'm not going to get into the argument that there shouldn't be lots of services on the machine -- after all, most of the myriad services have little performance impact and at least in Vista are supposedly less likely to compromise security. Although I would prefer a 'configure to run after deciding it's useful and not harmful' self-management approach.

I just wonder, if a pristine machine like this one, well configured etc., scoring generally 4 in the Vista perf scale, and whose only sin is being 2005 vintage, gets mucked up this badly from such mild use, there are truly some problems with Vista, both for home users and businesses, that are more serious than I would have believed.

Ok, so I promised I'd try and offer a little useful info. Once again, for the sake of SEO

Some possible fixes for Really Bad Perf in a basic Vista machine:

  • go into the task scheduler and get rid of tasks you don't want to run;
  • look at the Network Location Awareness and DNSCache services (I'm not gonna say kill them unless that's what your particular machine needs ... but look at them);
  • if you haven't quashed Aero already, turn it all off and see if that helps;
  • and if you're running Vista Ultimate, and you don't actually ever use Media Center, go and kill all the tasks and services related to MC because Vista isn't smart enough to notice that you don't need 'em, and I've caught them hogging a ton of resources.

Last, not to get into the 'uphill to school both ways thing,' but a 700+MB working set with no user apps running??? You just want to say, "Man, have some self respect and get on a treadmill once in a while..."

Sunday, May 11, 2008

Ghost of Christmas Yet to Come: Alternative Futures for Windows

Sun's OpenSolaris demos and pleas ("put in on your laptop -- really!") last week got me thinking about the desktop OS, or more precisely the boot OS ...

Some folks have hypothesized that 'Windows 7' will be ultra-modular and may introduce a new API scheme while supporting the old ones via virtualization.

I think this is the right idea, but can be taken much further, with benefit to the entire industry/ecosystem.

Consider:

  1. The desktop will remain critical, as long as NVidia and Intel keep loading cores and cache onto chips, while keeping the price low and the power consumption efficient. Unless/until mobile broadband gets faster, more reliable, higher penetration, and about a 90% price cut, the desktop (or laptop or palmtop) is where a lot of computing will happen.
  2. Windows will remain vital for a majority of desktop users: businesses keep Windows to keep their legacy line-of-business apps running. Those workstations also run Office. Users want to run Office at home. There are also gamers who haven't migrated to consoles.
  3. (and this is the fun part): Windows doesn't have to be that desktop, and that desktop doesn't have to be Windows. Breaking them apart properly can create more value Microsoft (in terms of equivalent or greater revenue, with lower costs), and opportunity for everyone else (Apple, Sun, Linux distros, device makers).

What I am basically proposing is that Windows be so extremely modularized that many (eventually most or even all) flavors of it run only in virtualization on top of ... well ... anything.

Having Windows be the Ring 0 (or -1) operating system is hard and expensive and in most cases no longer necessary. It also doesn't pay well. Making an operating system run well on every cheap piece of hardware, taking the blame for the blue screens caused by other folks' faulty drivers, and being the "buck stops here" guy for security and resource management is neither cheap nor easy.

So I say: ditch it!

Could this work? In most cases, yes.

Businesses don't need Windows per se. What they need is an operating system that is supportable and manageable and can run their legacy Windows apps without incurring a bunch of additional cost.

What would a minimal Win32 Lite OS look like? The XP Embedded system builder is all about figuring that out. The Wine, Mainsoft, and Mono folks also have pretty good data on which APIs are critical for which sorts of apps. I'm not suggesting running a port of Win32 (or .Net), just that those folks have real good familiarity with which APIs and services are critical for running a user's apps, and the dependency chains between them. I don't claim to have that info at my fingertips, but we know that an upper bound for client software is XP Pro. From there we can subtract a lot.

So businesses could be running Linux or OpenSolaris or Mac OS, and run a SKU of Win32Lite in VirtualBox. Microsoft wins, because they only deliver and debug against a small set of virtual hardware devices, and can charge around the same amount as they currently do for the license (on an annual amortized or subscription basis) and support. As long as they produce a great implementation and great APIs to develop against (they've got a big headstart for desktop apps), there's no reason they wouldn't keep selling licenses.

Some security issues are lessened, because the virtualization layer is senior to the VM. Similarly with deployment, monitoring, resource management, etc. And hardware has migrated (and continues to migrate) to the USB bus, which is supported via the VM.

What about consumers? The rise of web applications doesn't mean the desktop is irrelevant -- all the apps in Flash, Silverlight, and Java make that clear. But those are browser plug-ins, which don't rely on Windows being underneath them. Home users may well want the latest Microsoft Office 2007, so Wine isn't their solution ... they'll buy a different SKU of Win32Lite to run office and their handful of random non-Web apps... maybe some of the Adobe products.

For the few cases where performance is important (let's say a non-linear editing tool for hacking HD videos), a simple user-mode service on the underlying host can deal with big number crunching or disk-file-shuffling jobs in cooperation with the VM. Again, most legacy consumer gadgets don't need to care about the "real" OS, since they're on USB and they're proxied through to the VM. Most of them will play nice with other-OS class drivers (such as 'mass storage' or 'image acquisition') anyway, so users may not need Windows at all for them.

So who isn't covered by these basic configurations? Folks with real custom hardware (strange ISA or PCI cards and the like) and hardcore gamers.

I have a feeling the 'real custom hardware' will show up more in businesses, which can lean on Microsoft's 10-year-plus support lifecycle policy. Even in slow industries, that should provide enough time to at least plan a migration.

For gamers, well, there are at least 3 options for Microsoft, all of which can provide revenue:

  1. Drive innovation in 3D acceleration under virtualization ... Fusion already supports DX9 Shader 2, and with Microsoft's contribution I'm sure the perf could get vaguely close to unmediated DX.
  2. Encourage gamers to migrate to a console... not a loss for Microsoft if they can bulk up margins even a little on the XBox
  3. Offer a DirectX-on-the-Metal version of Windows, to be run from a bootloader next to a 'productivity OS' ... and I'm thinking DX-on-the-Metal is not that dissimilar from XBox anyway.

And one more thing:

Sooner or later, if the must-boot-on-the-metal requirement has been gone from Windows, hardware changes will make it so that Windows no longer can boot on commodity metal.

The architecture shift will inevitably happen before some businesses are ready to make a switch (don't believe this? go look at the airlines). For some businesses, there may be expensive retro boards (just like there were Z80 boards for running CP/M in 65xx and x86 machines), but eventually we'll need to run Windows in a VM on top of some hardware emulation.

I don't think it's in the least unreasonable to expect emulated x86 hardware to run as fast at that point as real hardware does today. We'll call it MAME Enterprise Edition.

Saturday, April 26, 2008

DVD Flick Installer Needs to Rewrite a System Library Why?

I feel bad ripping one in the crew that builds DVD Flick, a well regarded open source tool. From what I can tell, this is a fully-open, Sourceforge-hosted, quick-authoring tool similar to the excellent ConvertXToDVD.

During its installation, though, it attempts to overwrite the richtx32.ocx file in the windows/system32 directory. Richtx32.ocx is a Microsoft-authored GUI widget component (an AcitveX library) present in all or most Windows systems.

Trying to overwrite this is bad on so many levels. Who knows which version of this lib is being supplied by DVD Flick? The installer definitely doesn't compare versions and make an intelligent choice, or it would have chosen not to even try on my systems, where everything is up to date. So it's an old version, maybe one with bugs or security vulnerabilities, that could compromise my system because any process might load this code up.

Not to mention it appears to the user that the app needs to alter their system in order to continue. Since they trust this app (it's been written up in blogs like LifeHacker), they start thinking "oh, sometimes free apps I download off the Internet need to overwrite my system libraries, no big deal" ... all the UAC in the world won't be able to overcome that mentality (although theoretically Vista has other protections to remedy this specific problem).

I tried to think of any justification for this behavior, but I couldn't. True, there are aspects of the ActiveX/Registry/DLL Hell problem that can make something like this a little tricky, but there are workarounds as well.

Starting with the easiest fix: include a legit Microsoft merge module containing the latest DLL version, and first, in the installer script, check the installed lib version/signature to see if it's necessary to install a new one at all.

The other possibility, that DVD Flick isn't trying to update this library, but needs to install its own version on top of the existing one, with some extended functionality, would be even more ridiculous... I entertained this idea for a moment, but it appears not to be the case.

Saturday, April 12, 2008

A Hint in the Quest for S3 Suspend on Windows

Unlike most geeks I know, when I'm working, I don't like to put on headphones and listen to music. I concentrate and focus better in quiet places. So when I put together a new PC, one of my top priorities was quiet. Quiet case, quiet cooling, low power consumption (relative to horsepower) and S3 suspend.

Since I switch between a few different boxes, multiple power supply fans churning in a small room is a loud problem. Plus, S3 is a great user experience (instant restart, exactly where you were) and enviro/energy-bill friendly (far less power consumption than an S1 fake suspend).

Google around and you'll find lots of tips for S3:

  • First, you need to be running the ACPI HAL underneath Windows. Typically not a problem, but you can check under Device Manager / Computer node.
  • Second, check that your BIOS ACPI setting allows S3 (e.g., mine has as option "S1 Only" that would prevent it from going S3 if it were selected)
  • Windows XP normally omits a registry entry (USBBIOSx) required for S3 because apparently some hardware can't wake from it via USB devices. Why that warrants disabling a sleep mode that I've always woken up with the big ol' power button I don't know.

Check the BIOS before you install Windows and the ACPI HAL immediately afterward, because conventional wisdom is you may need to reinstall the OS if you want to change these items.

I did all this stuff, still no S3. What next? There's a Microsoft command-line utility called DUMPPO.EXE which outputs a bunch of useful power management status stuff and lets you set power policy as well.

When I ran it with the cap argument, it produced a report that said no suspend modes were available on my hardware at all! Huh? Whah?

At the bottom of the report is a separate line about a legacy driver. It was the default VGA driver that XP uses on install, since I hadn't loaded the real nVidia driver yet.

Hmmm...

I installed nVidia's latest and rebooted -- all of the power options were now enabled. DUMPPO also reported all of the suspend modes available.

So... first, bad, bad Microsoft for defaulting virtually all video hardware to a legacy driver that breaks the OS's own power management. Maybe there's a fix for that in XP SP3.

But second, check ALL of your drivers -- chipset, sound hardware, and video at least, and don't bother testing S3 until after you've gotten your drivers installed.