Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Tuesday, July 4, 2017

Building a New Computer: Installing Software

By mid-2016 I wanted to retire Juno, my computer from early 2010. It had received an upgrade in the form of a larger SSD, but all the photos were still on a hard drive, and the 4 GB of memory wasn't sufficient when I was doing heavy photo editing, leading to interminable delays and annoying clicks as programs were swapped on and off the hard drive. It was time for a new computer.

A previous post covers the December 2016 hardware assembly for the new machine.

This post discusses software installation, and the next will describe my performance tuning efforts. Sneak preview: overclocking an i5-6600k in a small case with a 92mm cooler can be a challenge!

I hadn't installed Linux onto a computer for a few years -- I once had to restore the OS on my old computer after a botched upgrade to Ubuntu 15.10 -- so I stumbled a few times. In the rest of this post I'll run through the issues in roughly chronological order.

First I created a bootable USB stick with XUbuntu 16.10 on it, using the unetbootin utility on my old computer. (16.10 is code for 2016/October.) The first ISO image I downloaded didn't work, so I tried another source; that .iso file was larger and booted.

The BIOS/UEFI interface gave me two choices of how to boot from the one USB stick. My first choice didn't work, of course. The other did.

I followed my old procedure of creating a separate root and home partition, but the installs kept bombing out with errors such as "firmware started installer in UEFI mode but it looks like maybe the OS is already installed in BIOS compatibility mode." To make a long story short, I didn't realize I had to create a bootable UEFI partition. I dsicovered this by abandoning my attempt to do a custom install and accepting the installer's defaults, which worked, and then I could examine what it had done.

I decided I wanted to try running without a swap partition on the SSD, having a generous 32GB of RAM, so I disabled the swap partition. The SSD now has a 0.5 GB EFI system partition, a 915 GB main partition, and a 16 GB unused partition.

I tried to copy my files over to the new machine via FTP from the old machine, but the FTP process kept stumbling over odd file names. I finally used grsync to copy my files from a backup HDD.

There was BIOS/UEFI tweaking to be done. By default turbo mode for the CPU was disabled, for example, and the i7z utility was handy to verify the state of the system. Also, I had to enable memory "overclocking" for the RAM to be run at its rated 2400 speed rather than the default 2133. (Another reason for using a Z series motherboard.)

At a certain point the motherboard stopped recognizing DEL at the "Press DEL to enter BIOS" prompt. Mr. Google revealed that many people were forced to reset their motherboard to restore this, which I wasn't crazy about. I have an old PS/2 keyboard, with which the motherboard did recognize the key, but I preferred the modern USB keyboard. Fortunately the GRUB bootloader has an option for "system setup," which takes you back into the UEFI/BIOS.

I also set up a prettier GRUB splash screen (the Orion Nebula). I ended up changing several settings in /etc/default/grub, including GRUB_TIMEOUT, GRUB_BACKGROUND, and GRUB_GFXMODE. After updating /etc/default/grub it's necessary to sudo update-grub for it to take effect.

I encountered a race condition that prevented Dropbox from connecting at system startup. Mr. Google pointed me to a solution, and I added these lines to my startup shell, which stop and restart Dropbox:
# work-around dropbox/dbus bug 
#
( sleep 2; dropbox stop && dbus-launch dropbox start) &
Several times I needed to register the new computer with a service (Google and Dropbox come to mind.)

Something odd was happening with the audio. The monitor (also new) was connected to the computer via a DisplayPort connection, but there was no audio unless I fussed with the entirely separate "PC  audio" ports, disconnecting and reconnecting them. I eventually discovered that the monitor sensibly was expecting its audio through the DisplayPort cable, but the pulseaudio software on Linux was somehow defaulting to "PC audio" until some external event forced it to reconsider its options. The easiest thing for me to do was to change the monitor settings so that it used the "PC audio" instead.

Eventually I'll write the performance tuning post, discussing overclocking, changing voltages, torture testing, and cooling the CPU. It takes time to collect all that data!

Saturday, June 24, 2017

Building a New Computer: Hardware Assembly

By mid-2016 I wanted to retire Juno, my computer from early 2010. It had received an upgrade in the form of a larger SSD, but all the photos were still on a hard drive, and the 4 GB of memory wasn't sufficient when I was doing heavy photo editing, leading to interminable delays and annoying clicks as programs were swapped on and off the hard drive. A memory upgrade wouldn't have been economical; the six-year-old DDR2 technology was pricey when it could be found. Plus, Juno used a blow-down CPU cooler that blocked access to the memory sticks unless I removed the computer's guts from the case and removed the CPU cooler from the motherboard, a real pain. Not a quick swap. It was time for a new computer.

This post covers assembling the hardware for the new machine; later posts will cover software installation and performance tuning.

Here is a photo of the parts, acquired by mid-December 2016.
The case is a Jonsbo V2, also known as a Coolcube Mini, now discontinued. I'd been keeping my eye on one for a while at QuietPC in the United Kingdom, and snatched one in mid-summer just after the Brexit vote, when the value of the pound fell. It's a very small case; to go smaller I'd have to use a book-sized case that either had no fan or a skinny blow-down cooler.

Here's a lineup with a CD in its case, the Jonsbo V2, and the Lian Li PC-Q03, which, while still small, is larger in each dimension than the Jonsbo.

The other components were purchased as sales came up in late November and early December, which kept the total cost to ~$1,000. (The parts were purchased at either at NewEgg, which doesn't charge sales tax for Ohio, or at Amazon, when the sale price was right.)

  • ASRock Z170M-ITX/ac motherboard. Had to have a mini-ITX motherboard to fit this case.
  • Intel i5-6600K processor.  I wanted to tinker with overclocking and undervolting.
  • Noctua NH-U9S CPU cooler. Had to have something short enough to fit this case.
  • Samsung 850 EVO 1 TB SSD. Plenty of room for me.
  • 32 GB RAM (2x16), DDR4-2400, by GSkill. I thought it might be overkill to have 32GB, but it wasn't.
  • PicoPSU 160-XT power supply with 150 watt AC/DC brick.
In this photo, the CPU has been inserted, the red RAM sticks have been inserted, and two golden-colored bars for the CPU cooler assembly are on either side of the CPU. The red heatsinks on the RAM sticks are a bit much, but some folks like computer bling. They were on sale.

A reinforcing backplate is on the underside of the motherboard, connected to the bars on the top side.
For the first time I tried a technique called tinting. I spread a small amount of thermal paste across the mating surface of the CPU cooler, then wiped it off, leaving some "preliminary" thermal paste in any grooves.
I applied two thin lines of thermal paste on the CPU shield in an orientation recommended for the four-core Intel CPUs. But I can't find the link that suggested it. The "best method" of applying thermal paste is a subject of interminable online discussion.

In this photo all parts have been installed/connected, but sit outside the case. This way if the first power-on reveals a problem everything is easily accessible. I didn't install the WiFi/Bluetooth card, because this desktop machine will be hardwired. This saves a few watts of electricity, and room inside the case.

The first power-on went OK, so then I installed the motherboard in the case. Inside my skinny case this demanded some fussing and tilting.
The thick round black cables are part of the case, connecting the USB and audio ports on the side of the case to the motherboard. I have no idea why the manufacturer used such long cables in such a small case, unless the stiffness of the cables required some length to create flexibility. It turned out that to connect the SSD to a SATA port on the motherboard the best (least twisty) option was a left-handed right-angle cable, which I ordered and installed after this test.

It took some experimentation, but I finally arrived at a decent cable routing. Note the flat red cable connecting the SSD; that's the left-handed right-angle one.

Unfortunately this case had the wrong size hole drilled for the PicoPSU connector. It was a bit too small, so I could have drilled it out, but I was too lazy to remove everything from the case to allow drilling, so that connection (the black and while cable combination) just hangs out the back through the large hole that a traditional SFX PSU would have filled.

Those red heatsinks on the memory sticks had a curved profile that created a "hump" in the middle, reaching as high as the CPU fan. To avoid any vibration issues I shaved off a tiny bit of the fan frame.
The Noctua U9S, 125mm tall, was plenty short enough for this case. There was about 22mm to spare, so a larger cooler and fan might have been possible. Checking the geometry of a substitute would be important to avoid interfering with the RAM sticks.

Here is the assembled computer tucked under my standing desktop.

One unfortunate characteristic of this motherboard is that it blinks the power light while the computer is asleep (suspended to RAM). It's not a lethargic, nap-like blink appropriate to being asleep, but a quick, urgent blink that feels like a warning flash. Now I keep a book up against it!

Next step, next post: installing the Linux (XUbuntu 16.10) distribution and copying my files over from the old machine.

Friday, March 5, 2010

Assembling Juno: Installing and Results

With the first power-on, juno responded as hoped: the BIOS identified all the peripherals correctly, and then noted that no device contained any operating system to boot. I did a restart and went into the BIOS to change several settings (time, splash screen, boot order, etc.) and rebooted with a CD. Or rather, I tried to reboot with a CD. Even though I tried several bootable CDs, juno refused to even try to boot from them. It was as if juno would boot only from the first device and failed to check the others. Time to go into the BIOS again. But wait ... the system no longer responded to the DEL key. I couldn't get into the BIOS, even with several attempts! Eventually I had to switch a jumper to reset the motherboard to its factory default settings, and then, as if having enjoyed the attention, juno has never since failed to recognize a bootable device (including a USB memory stick) or to respond to the DEL key. I have changed most of the BIOS parameters again (one at a time), with no ill effect. Sometimes I think computers must go through a learning process when they first wake up or move to a new environment, and exhibit behaviors that disappear after a single baffling appearance.

The first job was to properly set up the SSD (solid state, or flash memory, drive). Including this part was one of the two less conservative items in juno's constitution. SSDs are relatively new, and early adopters (the last 18 months) have seen drives that slowed down over time, turned into expensive paperweights after applying a manufacturer's upgrade, and so forth. By now I hoped that the worst problems had been solved (or identified) by the truly early adopters. Because these devices, although blazingly fast compared to spinning platter hard drives, are very expensive, I stuck to a 40GB 'value' model by Intel (the writes are much slower than the reads, although still faster than a hard drive). I had to create a bootable CD from an image downloaded from the Intel website, in order to upgrade the device's firmware. Fortunately, this went without a hitch. Then I booted Ubuntu from a memory stick, and manually partitioned the SSD, not leaving that to the automated install. It gets very technical, but it's a good idea to align the partition with the SSD erase-size boundaries, and where possible, make file systems in those partitions with tweaks that also are driven by the erase block size. I hope that the next time I build a computer the SSD quirks will either be fixed, or compensated for by the operating system.

Then the Ubuntu install began. Here is the second of my two "leaps" -- I was installing 64-bit Ubuntu. Microprocessors began to have 32-bit capability in the mid-1980s, and 32-bit addresses meant that they, and programs that ran on them, could theoretically recognize up to 4 gigabytes of RAM. For the last several years processors have had 64-bit capability, although consumer machines typically continued to run with 32-bit operating systems and programs. However, with memory becoming cheaper and cheaper, and programs and data sets becoming larger and larger, 4 gigabytes of RAM could be a limitation. Also, for some tasks the 64-bit versions of the same program can be faster than the 32-bit. I decided to take the plunge and install the 64-bit version of Ubuntu with 4 GB of RAM in juno. For technical reasons that are historical -- PCs just grew that way from their origins in the 1970s -- a 32-bit operating sytem would actually be able to use no more than about 80% of that 4 GB.

The install went smoothly. (One does always need to tweak and individualize things.) I had been most apprehensive about Adobe Flash, because Adobe Flash for 64-bit Linux was available only as an 'alpha' to be downloaded from Adobe's web site. However, so far this has worked flawlessly, beyond my expectations. The other 64-bit issue was that there is no 64-bit version of Google Earth for Linux, at least not yet. Some have gotten the 32-bit version to run on a 64-bit system with some extensive workarounds, but for now I'm content to wait for a real 64-bit version.

At this point I noticed some oddities. The CPU temperature was 42°C, which I thought quite high for idle. Then I discovered that it was always 42°C, regardless of load or CPU speed -- the sensors were stuck. I gather this is a not-common but not-rare fault in some of the Intel processors of this generation. At least I was getting good temperature data from the combined controller and integrated graphics chip (nVidia MCP79), and from the 500 GB hard drive, so if things were getting hot I would have some warning.

The next oddity was that the BIOS showed my 1150rpm fans running thousands of RPMs faster than that:
Another sensor issue, fan quirk, or BIOS flaw, no doubt. It doesn't reduce the functionality of the system. I usually adjust the fan speeds several times at the beginning, to reach a balance between low-enough noise and good-enough cooling, and then leave them alone.

Through all this work the blue LEDs for the power button and the disk-activity indicator were bugging me. They were way too bright! So I put a little electrical tape over the disk activity light, blocking most of it, and put a disk of black construction paper in the center of the power button.
Here are a couple of images of at juno at work (taken with flash).

I should point out the small keyboard. It's a "Happy Hacking" keyboard for people, such as me, who don't use the numeric keypad, or have a small desk space, or prefer the traditional UNIX key locations for ESC, CONTROL, and the insidious CAPS LOCK.

Regarding the "faster" goal, I don't have any handy Linux benchmarks. Of course, with the SSD, booting now takes only 31 (plus or minus) seconds from power-on. Of that, 19 seconds are the motherboard waking up devices and taking inventory, and only 12 seconds to boot Linux and put up the login screen. Applications start a lot faster too. Let's just compare the specs. The prior computer, tbroma, had a CPU running at 2.13 GHz with a 667 MHz FSB (memory interface) and DDR2-667 memory. Juno runs at 2.93 GHz with a 1066 MHz FSB and DDR2-800 memory. It's gotta be faster!

What about the final goal, "cooler"? Well, tbroma would draw 42 watts when started up and logged in but not doing anything in particular, a state referred to as "idle". juno draws only 30 watts, measured by the same kill-a-watt meter. When running a CPU stress test program (from the Mersenne Prime search), tbroma, in the days when I could undervolt it, drew 77 watts. In the last year, when undervolting through Ubuntu finally became just too difficult, tbroma reverted to drawing 90 watts. juno sips 63 watts under that test.

And here's one of the best surprises. In tbroma's early days, I tried to get 'sleep' to work. Joan's iMac does 'sleep' very well; just hit a key or move the mouse, and in two or three seconds your desktop is back. I could never get tbroma to wake up properly from a sleep; it always thought it had been rebooted without a proper shutdown. Perhaps it was the motherboard, perhaps it was the operating system of three years ago, but I gave up on it. Guess what? Sleep on juno works, although it is not as slick as the iMac. I must press the power button, and eleven seconds later, after a few messages flash by on the screen, too fast to read, my desktop is back. (Complete with 'network disconnected' and 'network reconnected' notifications.) While asleep, juno draws only 5 watts! Heck, the power drain for just being plugged in while off is 4 watts. I've got juno set to automatically go to sleep after 30 minutes of no activity.

Can I repeat "faster, smaller, cooler" in two or three years? I think so. Smaller will be the biggest challenge, but it can be done, as with this system, which is about the same width and depth but shorter than juno. As infrequently as I use the CD/DVD drive, I could employ an external optical drive on those occasions where I needed one, which would free up space and reduce the cable count. As components get smaller and more capable, where's the limit?!

Sunday, February 28, 2010

Assembling Juno: Screwdrivers and cablegami

Juno is my new computer. It's named after the asteroid, not the movie -- I saw a news item about the opposition of the asteroid Vesta, and thought that among the four major asteroids (Ceres, Vesta, Juno, Pallas) that I liked the name Juno best.

I wasn't planning on building a new computer for at least another six to ten months, but my three-year-old machine, tbroma (short for theobroma, "food of the gods," a reference to chocolate) had developed a quirk. Nine times out of ten, when turning the computer on, it would have a) forgotten what time it was, and b) disabled the network interface (no Internet). This fault is typical of a weak CMOS battery, but I changed it twice and the problem persisted. I would have to intercept each boot to fix the settings in the BIOS, so it was time to accelerate my schedule.

I won't bore you with parts selection; as always, I found the Silent PC Review web site invaluable. Joan will tell you that I peruse the forums there almost every day. My goal was faster, smaller, and cooler (less electricity) than tbroma. With three years of technology advances, I ought to be able to do all three.

Here's a view partway through the assembly process. The CPU heatsink and fan are mounted on the motherboard, front fan attached, and cables from the front ports and status lights plugged in. A 2.5" (laptop style), 500GB hard drive is attached to a plastic frame (slot rafter). The rafter is supposed to snap into the orange expansion slot at the bottom of the board, but that would put the drive and plastic tabs where they blocked parts of the motherboard. (The rafter is cut to 60% of its original size because that's all I needed.)
The two plastic gadgets at the front and back (not permanently mounted yet) are fan controllers that let me dial the fans up and down in speed, to get the best balance of cooling and quietness.

The tray for the slim optical drive blocks a lot of the case from the top, so it was usually kept to one side, and the fit checked now and then.
The heatsink is a mid-size aftermarket model, the CoolerMaster Gemini-S. Here we see that it clears the northbridge heatsink and the memory cards, but not by a whole lot. Install the memory cards first!
Some CPU heatsinks mount to the motherboard with a push-pin system (similar to the one you see on the black northbridge heatsink above) that many find awkward. This one attaches with a nice, solid backplate and screws. You add the screws that are going to pass through the motherboard to the clips (shown below), screw the clips onto the heatsink, and then fasten from the back side of the motherboard; even though there are more steps involved than with pushpins, you're never required to do difficult things in tiny spaces. The screw shown below actually threads through the hole in the clip, so it's solidly attached when you're handling the clip.
To gain efficiency and room for the larger heatsink/fan assembly, I replaced the power supply that came with the computer case with a picoPSU. The AC-DC conversion is done in an external brick, just like when plugging a laptop into the wall, and a small voltage converter plugs into the power socket on the motherboard.
Here I've circled the port on the picoPSU that lets you plug in an additional cable set. Unfortunately, it points straight back at the blue memory heatsinks, only 1mm or 2mm away. I could plug the cable set into this port, but the cables visibly pushed against the memory and back against the picoPSU, so I dropped that approach and got a cable splitter to turn one SATA power cable into two.

Here's a look into the top as I transitioned into the cablegami stage. The fan controllers are permanently mounted, and the CPU power cable snakes around the heatsink (required an extension!) The splitter cable is in evidence at the edge of the heatsink, and the 2.5" hard drive has its data and power cables plugged in. But nothing is tidy(ish) yet.
Just to emphasize the complications from the optical drive, here's a photo. Look at the length of the optical drive power and data cables -- they're intended for much larger cases. I'm using a case for mini ITX motherboards -- smaller than a micro-ATX motherboard, which is smaller than standard ATX. You'll see exterior shots later of my earlier, micro-ATX case and this mini ITX case.
Here's a shot of the left side after some cablegami efforts. The Y-splitter, power cable headed for the picoPSU, one of the optic-drive cables, and the CPU power cable are all tucked in the 1" gap between the plastic raft and the edge of the case. Similarly, the black data cable to the second storage device, an SSD (solid-state drive, using flash memory) takes advantage of that gap.
Looking at it from the right side, we see that the airspace in front of the fan is more or less clear of cable clutter. The small wires are below the airpath. (The SSD is in the small bay hanging from the bottom of the optic drive tray.)
Here, the case is buttoned up. Black mesh (window screen material) is backing the vented areas to protect against dropped little screws and other disasters. I also used it to cover the hole where the original power supply was installed. Black construction paper (think scrapbooking) blocks part of the left vent to match the right vent. I don't have a high-powered graphics card throwing off heat on the left side, so it's best to focus the airflow where it's going to be needed. (The color differences are exaggerated by the photo flash. It's a decent match in ordinary light.)
Here is juno positioned next to tbroma, still in use. My computing philosophy now emphasizes compactness in all things except monitors!
Now it's time to power juno up, see what happens, install Ubuntu 9.10, and move my files over.