New Build: Problems and Solutions

This weekend, I put together a new mixed purpose desktop. This is my first AMD build, and so far I’m quite pleased with it. Sure, Intel offers greater performance in general, but truth be told, their processors are above and beyond what I was willing to spend. I built this desktop with a few things in mind: 1) Be reasonably future-proof, 2) have reasonable performance for the few games that I do actually play, 3) support hobbies that I delve into infrequently (I’m looking at you, Blender), and 4) handle the abuse I toss at it, including when I’m working. I really abuse my systems with work and with play, so whatever extra power I can get within a reasonable price range is going to improve my productivity immensely.

Of course, no build is without its teething problems. There’s always an adaptation period where new hardware simply doesn’t “feel right” for whatever reason. Maybe it’s not broken in, maybe there’s a tiny little issue that’s driving you absolutely insane, or maybe you simply haven’t gotten everything configured precisely to your specifications. Whatever the problem, if you’ve ever built your own computer for yourself, it’s to be expected. Sure, it’s one thing building systems for other people–you select components you know work well with each other and are unlikely to cause issues in the future. But that’s because the more problems they have, the more problems they’re going to give you when they ask for support.

But for yourself? Hah. That’s no fun. You’ve got to live sometime, man. Be adventurous. Buy enthusiast hardware. Select something without checking reviews, first. Be reckless.

Actually, I’m kidding. Never do any of these things unless you want to be sorely disappointed. Always, always, always research and review your hardware purchases before making them. But be mindful that no matter how careful you are in selecting your parts, you’re going to run into issues. It’s just the nature of the beast. There will always be some little issue that, once it hits, you’ll be thinking to yourself “Man, I wish I had Googled for X, then I would have known this was going to be a problem.”

Don’t fret. It happens. Just persevere, and you’ll fix it sooner or later. Take my most recent experience to heart, and keep in mind that I’ve built my fair share of systems over the years, although I’ve never made a switch between major component providers (e.g. Intel to AMD) before.

Here are the problems I ran into:

  • My hard disks would click between 5-6 times during shutdown before finally powering off. Furthermore, my hard disks would power down (shut off) every single time I restarted or rebooted the system. Obnoxious.
  • The Windows 7 SP1 installation failed every single attempt with the erro 0x800f0a12. The solution was about as inane as could be expected with a Microsoft product.
  • Google Chrome exhibited some inexplicable weirdness that I’ve never encountered before. Every time I searched something on Google, the links wouldn’t switch to their visited style and were a different shade of blue than normal.
  • Finally, hibernate/sleep/suspend (whichever you prefer) simply wouldn’t work.

TL;DR version of the solutions (spoilers, if you want to read the background stories!):

  • Disable AHCI support in your BIOS to resolve unexpected HDD power downs and clicking during shutdown.
  • When installing Windows 7 SP1, unplug all other hard disks in your system if you have multiple, bootable disks. If you have multiple bootable partitions, set the Windows partition as active using a tool such as fdisk.
  • Weirdness in Google Chrome can often be resolved by deleting cookies.
  • Gigabyte boards have problems with sleep mode. If fiddling with the power management mode of individual devices doesn’t work and you’re at your wit’s end, try changing the setting for hybrid sleep under advanced power management settings from Windows’ power management. It might just fix the problem.

Note: These problems aren’t specific to my board, but it is the first time I’ve encountered anything of the sort.

If you have the attention span of a fly, you’re finished. You won’t find anything else of any use in this post. For the rest of you who enjoy reading and appreciate a good story, you may continue. Hopefully this will be of some entertainment to you.

The System

The source of two of these problems is the motherboard I purchased. Rather, I should say that the source of two of these problems was operator error and how I had configured the motherboard. I purchased a Gigabyte GA-870A-UD3 for my build and promptly discovered that I was not alone–particularly with regards to the sleep problem. There’s an assortment of other hardware in this build, both new and old, that I brought over from my previous desktop–my keyboard, mouse, and a soundcard (I like the HT|Omega’s environments better than those that ship with the Realtek chip). The other items aren’t relevant. I know, because I swapped and removed just about every component I could in pursuit of my solutions.

Let’s start with the hard disks.

Hard Disks: Mysterious Clicking

The mysterious clicking of my hard disks on the Gigabyte board was mostly more of a nuisance than a concern. I’ve had enough drives die from the Click of Death to know from experience that this was different. More importantly, booting to Ubuntu cleared the problem. Whenever I’d shut the system down from Ubuntu, the drives would emit the same single click they normally would when parking and powering off on my old system. Rebooting wouldn’t power the disks down, either, except when I would restart the system from Windows. Clearly, Windows was the problem, but why?

After a few hours of fruitlessly searching for an answer, I finally stumbled upon this post. Someone else with a similar problem was experiencing unusual clicks on shut down with AHCI enabled. Incidentally, I had enabled AHCI support prior to testing this system out. What had I to lose by disabling it other than a few minutes?

Thus, I restarted the system (and cringed when the disks powered down again), entered BIOS, disabled AHCI support by setting everything back to IDE, and then tried it again. I shut the system down. No clicks. After another restart, I applied a few updates, rebooted the system from Windows–the lo and behold! The drives miraculously remained powered up through a restart!

As it turns out, the generic AHCI support in Windows must be somewhat flaky. Gigabyte recommends installing their AHCI drivers during the OS’ install, presumably for some of the features offered by the various SATA chipsets that ship with the GA-870A-UD3, but I can’t help wondering if installing their drivers would resolve the clicking as well. That is a test reserved for another day–and another drive.

Of course, the drives’ behavior was normal under Linux regardless of the state of AHCI in BIOS. But hey, Linux generally Just Works. Windows… well, not so much. Whatever. If there’s one thing Windows excels at, it is its ability to consistently lower my expectations. (Although I absolutely love the Windows 7 taskbar. It’s fantastic.)

As a side note, my last desktop always had AHCI support disabled. It used an Intel reference board (DP965LT) back when they still called them reference boards and not some flashy name to catch enthusiasts’ eyes. Yet that Intel board would do weird things on a reboot. Sometimes it would behave normally and restart the system. Sometimes it would turn itself off for 5 seconds before powering back up and restarting. Sometimes it would power the disks down, reboot, and then power them back up. It’s nice to have a system again where I don’t have to worry about placing additional wear and tear on my drives from something as innocuous as a reboot.

Windows SP1 Installation Failure: 0x800f0a12

I love Microsoft’s cryptic hex error messages. Rather than outright explaining what the problem is, it seems so much easier for companies whose management still lives in the 1980s to barf up numerical responses that require a lookup table. I’d even be willing to bet that same lookup table only exists in a printed copy rotting away in some dusty storage room. If you’ve ever diagnosed problems (quickly, I might add) from /var/log/messages (or kin, though I hate other loggers), you’ll understand the burning disdain I hold for numerical errors. Storage is cheap. Memory is cheap. Processing power is cheap. An extra 16-18 bytes isn’t going to kill anyone.

Then again, I guess 640K is enough for everyone, right? (Misattributed, see link.)

So, to the failure. 0x800f0a12 was beyond me. Worse, it was apparent that the error was also beyond some of the Microsoft MVPs who suggested fixes like this one. I encountered this issue on both my previous desktop and my current one–both clean installs–and couldn’t for the life of me figure out a solution.

That is, until I read another post that gave me an epiphany. Specifically, the pertinent part responsible for my eureka-moment was this snippet written by D. Charles Pyle:

You don’t need to run fixmbr, bootsect, bootfix, run repair from the DVD,etc., in instances like that I mentioned above, for this problem if you have a hybrid, single disk, or a single disk with multiple operating systems.

Just marking the Windows partition as ‘active’ made it work flawlessly because the Service Pack 1 installer looks to the active partition for some of the files that need to be updated. When it does not find them on the expected active partition it throws the exception and generates error 0x800f0a12.

Emphasis mine.

I mentioned before that I use Ubuntu. What I didn’t mention was that I dual boot Ubuntu and Windows 7 on the same system. However, both operating systems reside on separate drives. My Ubuntu disk is set as the first boot device, and because it’s more powerful than the Windows’ boot loader, I use Grub to switch between operating systems.

If Windows 7’s Service Pack 1 requires the Windows partition to be marked active before it’ll install, would it be possible that having BIOS initially boot to a completely separate disk be a problem for SP1? To test it, I powered my system down and unplugged the Ubuntu drive. With some animosity, I restarted the SP1 install.

Presto. It worked.

Two completely different systems, two operating systems, and precisely the same problem. All of it related to SP1’s requirement that it be the only OS in control of the system’s boot order. Very funny, Microsoft.

As an addendum to the words of Mr. Pyle, not only does Windows require its partition to be marked active (bootable), but it may also require being configured as the first (or only) disk from BIOS. In some cases, unplugging any other bootable disk in the system may be the only resort. If your attempts to install SP1 failed and your setup is somewhat analogous to mine, this may be your only choice. If you have multiple partitions on the same disk, you may need to set the Windows partition as bootable from fdisk. Although, I would recommend giving each OS its own separate disk. They’re easier to control and isolate that way.

Google Chrome: Let’s make Google Search Powder Blue

…and also hide what links the user has previously clicked on such that everything looks the same.

I admit. Whenever I reinstall Windows, I always backup my user directory. This way, I never have to reconfigure software. I simply reinstall and copy my user directory back over (typically in parts), thus maintaining most of my previous configurations. Whether it’s Chrome, VirtualBox, GiMP, or any number of other software packages, I would much rather take the time to backup and restore my settings than configure everything from scratch. Plus, I like my browser tabs (see above).

The habit was one that I inherited from Linux. In particular, the home directory on my Ubuntu install has lived through 2 Gentoo 32-bit installs, 1 Gentoo 64-bit install, 1 Gentoo 32-bit revert, and 2 Ubuntu upgrades (x64). In one particular case, I even copied my entire Gentoo install to an external drive on the offhand chance I’d have to revert it (I did), and it worked. Unlike Windows, Linux requires little magic to work, and almost any backup method involving copying files (with permissions!) will invariably work–or work well enough that the system can be restored to a usable state.

Unfortunately, I’m not sure what happens half the time when copying completely unchanged configurations between two Windows installs. Sometimes, it may work without a hitch. Other times, you’re left with inexplicable problems. Like my issue with Chrome displaying all Google search pages with the same powder blue link color, no visited link coloration, and no indication of my history, the problem appeared only after copying my Chrome configurations over from my previous Windows install.

I couldn’t find anyone with a similar problem. Those who had problems with Google search appearing weird were suggested to clear their cache (did that), change their Google history settings (not about to do that), or reinstall Windows (haha, really?). So, I did what any other enterprising individual might do. I moved my Chrome directory to another location and re-ran the browser. Crossing my fingers, I ran another search in the hopes I hadn’t somehow corrupted my Chrome install–or something more sinister.

Google search promptly appeared normal as if nothing happened. Strange.

So, I removed the new Chrome directory, replaced it with the old one, restarted the browser, and bam! Same thing–Google search was totally borked.

I hadn’t any idea where to start, really, so I figured that the next best option was to simply start deleting parts of the Chrome user directory to see what got restored and what was affected. My first step was to obliterate everything but the folders under %APPDATA%/Local/google/Chrome/User Data/Default. It’s just user data, right? The only moderately important things I could see were files that clearly stored my browsing history, cookies, bookmarks, and so forth. I had a backup anyway, so who would care if I deleted any of this? I then pressed delete, restarted the browser, and…

…it worked perfectly fine.

Really? Okay, this isn’t funny anymore. I restored the Chrome user data from backup again, launched the browser, checked search, and noticed it was broken. Again. Yes, Google. Blue is a lovely color, but powder blue was something I wore when I was still in diapers. I want something that’s going to show me where I have been. Colorizing every visited link the same as every unvisited link was driving me nuts.

Then it occurred to me: What if it were a cookie problem? Hah. Right. Sure. May as well give it a try, right? I’ve got all Saturday evening…

I opened up Chrome’s cookie list, searched for Google, deleted everything Google-related I find, and then pulled up Google search. Taking a deep breath, I typed out something clever, and pressed enter.

Sweet, beautiful a:visited tags, how I love thee! My problems had been solved by banishing the demons plaguing some cookie in the deep, dark depths of my user directory.

Really, Chrome, you could’ve just told me. Sheesh.

It’s time to Sleep… or Not

The last problem I had with this Gigabyte GA-870A-UD3 board is that I couldn’t get sleep, hibernate, or suspend working on it no matter what I tried. Various forums I stumbled upon where others were having similar problems with identical (or mostly identical) boards suggested disabling “Allow this device to wake up the computer” and enabling “Allow Windows to power off this device” along with various other things like unplugging every device from the computer, turning your keyboard upside-down over your eyes (don’t do this), and even reinstalling Windows (I’m starting to see a pattern). Not a single one of these suggestions worked.

Let me repeat that just to be on the safe side:

Not a single damn suggestion I ever came across solved the Windows 7 sleep issue with this Gigabyte board. Not even a thread on the Seven Forums, ironically marked SOLVED!, offered any helpful advice.

In fact, it wasn’t until I was browsing Microsoft’s Technet forums when I ran across a poster complaining about his system sleeping–but not coming out of sleep–that it dawned on me that the problem might have multiple facets. I don’t have a link to the article anymore, but the poster resolved his wake-up-and-smell-the-roses resume problems by disabling hybrid sleep from the Windows advanced power options. Hey, it couldn’t hurt, could it?

I dug around for a while and couldn’t find it in my power profile under “sleep.” Then I realized I had changed some of the settings in BIOS related to sleep in a futile attempt to cure my system’s malady. Another reboot later, and I had changed ACPI suspend from S1 (power on sleep) to S3 (suspend to RAM), then checked the Windows advanced power options. There it was–under “Sleep”–“allow hybrid sleep: enabled.”

The original poster had hybrid sleep disabled, and claimed that enabling it had fixed the problems with his system waking up. But what if my problem was just different enough that I hybrid sleep wasn’t working at all? It’s possible.

I disabled hybrid sleep, closed my few remaining applications, and clicked sleep. A few moments later, the LED-lit fans in my case shut off and the disks spun down. It was fast asleep.

There’s no real moral to this story in particular other than the fairly obvious realization that suspend, hibernate, or sleep is something like black magic. It works when it works, and when it doesn’t, there’s no telling why. My previous desktop, an Intel board and CPU, entered sleep mode perfectly fine most times (although it would wake up about 1 out of every 10 times for no real reason), but that was hardware from 2006. This Gigabyte board is fairly new, and judging by the number of similar problems out there, I can only surmise that sleep mode problems are pretty common among Gigabyte boards. Yet the weird thing is that out of the three systems I’ve built using Gigabyte boards, mine was the only one that exhibited this issue.

A Penny Saved…

However you have come across this post doesn’t matter much, but I certainly hope that some of the stories I have shared will help you in your particular adventure. Building your own systems is rewarding, and it can also expose software problems and configuration-related issues you never knew existed. The trick is patience. There is a solution, somewhere, if you know where to look. Sometimes, you may need to spend a few nights searching the Interwebs for similar problems, and reading those links that you do come across no matter how unrelated they seem. In some cases, one man’s solution may not work for you, but his suggestions may offer insight that you wouldn’t have come across any other way. Oddly, there are a lot of answers found by no other method than by accident, often using unrelated suggestions as a guide.

If you have also purchased a Gigabyte GA-870A-UD3 board and are experiencing similar issues with sleep mode and mysterious power-down clicks from your hard disks, I hope that the solutions I found will help you. I wasted many hours before I finally resolved my problems, and I would be delighted if this post helps you find a solution much faster. If it does, then I know that time wasn’t wasted at all.

No comments.
***

Force Font Smoothing in Chrome on Windows (Hack)

Update: May 2nd, 2012

This post remains for historical reasons, but what it was intended to fix is no longer applicable. All versions of Chrome since the latter v12 releases or early v13 releases should display smooth fonts of any size under Windows. If they don’t, you might need to adjust your OS’s font settings.

Update: June 21st, 2011

This trick no longer appears to work as of the latest Chrome release (12.0.741.100 as of this writing). In the comments below, Flix suggested using -webkit-transform instead to shift rendering to the GPU, but the effect is identical to the CSS hack listed here as far as I can tell. That is, neither works. Using a standard visible drop shadow does work, however.

Consider the rest of this post (mostly) useless and archived. The only way to achieve the desired result is to use drop shadows with no alpha. To illustrate the examples originally included in this post in addition to the suggestion below–and for historical value?–here is a screenshot:

You will notice that there is no marked difference between the first three. Only the fourth appears to be smoothed; it is also the only one with a visible drop shadow.

Twas fun while it lasted!

Original hack as I wrote it back in March–note that this trick no longer works:

I discovered something a couple months ago that was a curio, but it wasn’t until recently that I decided to experiment with it to see if I could (ab)use it. The best part is: It’s not hard, nor does it require any scripting at all. It’s still a hack, and I’ll explain why toward the end of this post. The solution? Use text-shadow; this appears to trick Chrome’s font rendering engine into smoothing the font, but you must use the blur radius:

.smooth {
    text-shadow: 0px 0px 1px rgba(0,0,0,0);
}

There. That’s all. Now you can enjoy (reasonably) smooth fonts across major platforms, provided your users are using Chrome. If you care to know a little bit more about how I discover this, keep reading. If reading is something you’re allergic to, you can continue on to something else.

The rest of the story

Obligatory disclaimer: I’m not much of a designer. I enjoy writing back ends more than I do UIs, but I do occasionally dabble in the world of web-facing user interfaces in addition to various UI libraries like jQuery and its myriad plugins. Sometimes, though, there is an intersection between the world of server software and user interfaces. Occasionally, I notice things that I haven’t read elsewhere; of course, this is such a rare circumstance that I tend more often than not to simply assume I’ve completely lost my mind and go about tending to other chores.

So, let’s talk about font smoothing in Chrome. If you haven’t discovered this already or haven’t read the musings of someone else who has, I’ll quickly share the basic premise. Simply put, larger font sizes look ugly in Chrome (Windows). I don’t know the technical aspects behind this, and Chromium on other platforms isn’t susceptible to the same shortcomings, but if you’ve carefully designed a site on some Unix-like OS like Mac OS X or some flavor of Linux with sub-pixel smoothing enabled, you’re going to be sorely disappointed with the fonts on Windows. While this hack doesn’t work for other browsers–Firefox 4 appears to smooth all fonts and MSIE 8 just ignores what we’re going to do–it does work exceptionally well for Google Chrome.

The trick? Use text-shadow. As it turns out, dropping a shadow behind a particular snippet of text forces Chrome to smooth the font. Here’s a before and after sample with a fairly standard drop shadow (text-shadow: 1px 1px 1px #ccc):

Now, obviously, it’s inappropriate to have a drop shadow on everything. Sure, you can match the drop shadow with the background color of the parent(s) containing the text, but what happens if the background contains a gradient or an image? Worst case, your text ends up with a halo; best case, it just looks a little fuzzier than normal. Here’s an illustration of the halo effect using bright red as the drop shadow (text-shadow: 0px 0px 1px #f00):

Ah, yes, you say. But you don’t need the blur radius argument!

I’m glad you suggested that. Let’s try turning it off (text-shadow: 0px 0px 0px #f00):

Whoops. Here we encounter a problem–the only way to force font smoothing in Chrome is to enable the blur radius. Without it, the fonts appear just as jagged as before. (Note: This occurs regardless of the X and Y offsets. Try it–you can move the drop shadow anywhere, and the text will still remain as it was without a shadow.)

Fortunately, there’s a trick you can use to fib the font smoothing without background bleed. In this example, I have created a CSS class as follows:

.smooth {
    text-shadow: 0px 0px 1px rgba(255,0,0,0);
}

Using RGB plus alpha, we get this result with absolutely no bleed through of the drop shadow. Yes, even with bright red:

Of course, my cautious inclinations suggest to me that it’s best to match the colors to your background anyway, but for browsers that honor text-shadow, support for rgba() is included as well and as such, the text shadow will never appear.

This trick is a hack, because it appears to coerce Chrome’s font rendering engine into smoothing fonts that it would ordinarily ignore. Comparing other Webkit-based browsers on Windows (Arora and Safari, specifically) appears to suggest that Chrome uses a hybrid rendering scheme that is a cross between a built-in rendered and Windows’ default. For instance, Safari will render everything as a jagged text if the default (Windows rendering) is selected but will switch to smooth font rendering if any other mechanism is selected. Arora provides no such option, nor do many non-Webkit browsers like Opera. Obviously, you should only apply text shadows to text that you intend to use a drop-shadow on or other similar visual effect, and using this trick on small fonts (~12pt) will produce text that is almost unreadable. While there’s nothing inherently wrong with (ab)using text-shadow, you’re probably much better off using it as it was intended!

This trick does not work for any other browser on any other platform than Google Chrome for Windows. Tested with Chrome v10.0.648.151.

6 comments.
***