BIOS Setting Change Fixes Crashy Intel NUC 5i7RYH

Yeah its been quiet on this site lately. Between releasing the much anticipated Planimate 8 and starting on Version 9, supporting finalising our Supply Chain Sim product, working on a new project that combines Azure, Docker, Dotnet and Linux, finally building myself a new preamp for my bass (still to be written up) and other electronic repairs, I’ve hardly had the time to write anything here.

My current desktop computer is an Intel 5i7RYH NUC with 16GB RAM and 2 SSDs in it for a total of about 700GB of internal solid state storage.

Its got enough speed (2 cores, 2 hyperthreads each) for my needs and best of all, it generally runs very cool and quiet, using a magnitude less power than a desktop. Its basically a laptop without the screen, keyboard and battery.


There was one thing though. Since I bought it in mid 2015, I found it surprisingly prone to lock up / crash. I expected a lot better from an Intel own product.

I went through phases of blaming Windows 8 and the various Windows 10 releases, the Realtek sound drivers and even power management, since upping the minimum CPU speed in advanced power settings to 30% seemed to improve it (clue here). Throughout 2016 it was tolerable, and I blamed crashes on the fact that I abuse the little thing by running multiple VMs doing compiling, editing, simulation and video playing simultaneously.

The sound got my attention because a few times it crashed on the onset of video playback, resulting in a fragment of the sound looping until I power-button-reset it. Using Realtek’s drivers seemed to work for a while.

After the 2017 Windows 10 Creators Update though, it started to get unbearable, crashes and lockups started happening daily. I’d kept the BIOS and drivers up to date (and reset it after upgradde), disabled drivers I wasn’t using, ensured I was on the most recent VMWare (since that is all the host system runs), and checked logs for useful errors.

Around this time I was interested to read about Intel’s Hyperthreading issues with 6th and 7th generation CPUs. My NUC has a 5th generation processor – could it have a similar issue? I turned off Hyperthreading in the BIOS.

The machine was horrible to use after turning HT off, I couldn’t do much while a big compilation was going. That CPU hog, Teams, would bring it to a crawl if anything else was going on while you typed a message. But no matter how hard I pushed it, with stuttering audio playing while compiling, it never crashed once for a fortnight.

I certainly didn’t relish keeping HT off and thought I’d explore the abundant BIOS options Intel provides in the thing. Plenty of adjustment on speed stepping and voltages.

Increasing the core voltage by 0.15V didn’t help. Nor did disabling the Turbo Boost. It didn’t take long to find out what didn’t work.

In my research, I came across an old article which mentioned spikes in voltages as frequency changes kicks in causing problems. I’d already tried running in Windows’ “High Performance” power mode where the CPU never clocks down and that didn’t help.

I noticed the Processor Core Voltage Mode setting has a dropdown, defaulted to “Offset Only”.

One of the other options is “Interpolated Offset”, could this smooth out voltage transients?
I selected it and a voltage offset of 0.1V for good measure.


And since then the NUC has been solid through some really crazy usage, like simultaneously compiling Planimate under Windows and Linux while docker containers build, with some HD video streaming in an alternate desktop so i can listen to it.

And no, a Windows update didn’t fix anything, I established the improvment during a quiet time for updates.

Intel went to the trouble to include so many tweaking options for this little machine. Could they have missed out on choosing the best defaults, or is this setting covering up a latent fault or cheap RAM? I suspect the latter.

Fast RGB Matrix Graphics on Arduino

My first Arduino project was this Rainbow Block Kit from Maker Studio,
It came with a good Uno compatible board and an 8×8 RGB LED
matrix and driver board (I’ve since bought more).

I got it working with the RainbowDuino software after some changes but
found it a bit slow, so I wrote my own library/driver for it which I’ve called “ARGB” as it does alpha blended graphics at good frame rates with up to 3 chained panels (though with 3 memory is pretty short given there is only 2K of RAM and my library works best with double buffering).

Here is my library in action, including the “disco clock” I’ve built for myself.

As the video was taken at 25Hz, it doesn’t do some of the effects justice as the panel refreshes far faster.

The ARGB library features fast line/box/circle/text drawing with RGB colour plus transparency, flicker free double buffering, fast data transfer to the panel (so more time for animation, text overlays) and real time clock timekeeping (useful so long as your Arduino has a crystal).

I’ve put the library (includes a simple demo) on github:

The display is refreshed at 125Hz with a line refresh rate of 800Hz. I’ve made my effects update at half the panel refresh rate, 62.5 Hz is fast enough for smooth colourful animations.

Apple //e Mouse Card Fix

My Apple //e mouse card was not being detected, and looking at its ROM (at $C400 when in slot 4), there was clearly a problem, the top 2 bits were random whereas the bottom 6 matched a ROM dump ( is a great resource).

I suspected a bad PROM, a common problem in equipment of this era. I arranged a replacement, a 2716 EPROM is compatible and Stephen from promptly burnt one and posted it to me.

Unfortunately it did not fix the card. Looking more closely at the hex dump, I realised the top 2 bits were being flipped to one OR zero, whereas bits in an aged PROM usually revert to 1 (confirmed by Stephen).

This didn’t leave much to fail, the card was being properly addressed for 6 of 8 bits to be working and continuity for all the data lines was good.

The one possible culprit was a 74LS245 bus transceiver, and of course it was the odd chip that wasn’t socketted.

Desoldering it from a double sided board with plated through holes was very tedious (big thanks to Oak given my vision). I took the approach of cutting the chip off first then working on each leg individually from both sides of the board. I cant say I recommend this, I was really worried given the through holes and fine tracks on the component side, but it measured intact after the holes were cleared.

The chip was replaced with a 20 pin socket and, thankfully, each pin had good continuity to its destination, no wirewrap wire hacks needed.

With a chip installed, the card has come good, I’ve left the new EPROM in there too.

Firefox 35 Custom High Contrast Fix

As I wrote in my last post, I’ve been compiling custom XUL.DLLs for a number of Firefox releases to get around the ridiculous restriction that if you are running Windows in High Contrast mode, then ALL WEB PAGES WILL BE DISPLAYED IN HIGH CONTRAST MODE,  making the “Allow pages to choose their own colors” check box broken and useless. Honestly who thought this was a good idea, clearly not a visually disabled person! What would have been wrong with detecting HC mode, asking and turning OFF the “allow pages to choose…” option, with a way to stop it asking? Or a least the current arrangement with a power user string to disable it.

After some futzing I found my custom compilation/fix only works if XUL.DLL and MOZJS.DLL from the custom build (of the Firefox 35 release source code) are copied, a little strange as I am using Visual Studio 2013 which is used for the Win32 releases now, but probably due to a different config.

In following up fixes to this issue, I found Firefox 37 has fixed it using a 3 way option picker. I would have stuck with the nightly release but the Custom Colors toolbar button that I use to toggle colors isn’t compatible with the new setup. That’ll need to be fixed by the time 37 is released.

Firefox 32 High Contrast Fix

Firefox updated itself to version 32 and my ability to turn the forced high contrast mode for pages when Windows 8.1 is running in HC mode disappeared, even within a sandbox as worked previously.

I compiled version 32 from source and applied the patch to use an extra configuration variable as detailed here. It worked but, as I found with previous compilations, it consistently refused to load Adobe Flash (the plugin crashes, leaving Firefox running). This would make it annoying to use as my mainstream browser.

I guess the crash is due to me using Visual Studio 2013 when the official compiler is documented as Visual Studio 2010. Or soemthing else. Its been that way since version 28 and persists with the latest nightlies and build environment.

It occured to me that the problem causing the Flash crash might be in a different DLL to the fix for the high contrast override, which compiles to XUL.DLL.

So I copied my compile of XUL.DLL to a stock release of version 32, and I now have both Flash and my colour override working.  Good times are back.

VMWare 10.0.1 Under Win8.1 Network Issues

A default VMWare 10.0.1 install under Windows 8.1 had some pretty serious issues by default.

Firstly I found network performance of new VMs was atrocious for VM to host shares in Bridged and Host Only mode. This turned out to be due to a new broken virtual ethernet device and the fix is to change “e1000e” to “e1000” in the virtual hardware line in the VMX file, ie: you want:

ethernet0.virtualDev = “e1000”

The other issue was that VMWare’s NAT and Host Only networks were detected as “public” and hence blocked by the host’s firewall. The fix involves deep registry hacking, as described here. Basically:

  1. Navigate to this key: HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}
  2. Navigate through the folders inside the previous key until you’ll find an entry called “VMNet“. (There will be one for each virtual NIC). You can also search for that entry using the find commands in the Edit menu.
  3. Add a new DWORD 32 bits value and name it *NdisDeviceType. Don’t forget the * as it is needed.
  4. Set its value to 1.
  5. Repeat steps 3 to 5 until both NICs are updated.
  6. Close regedit.
  7. Disable and reenable both NICs.

I love big nasty UUID’s, don’t you?

VMWare 10.0.1 has been out for months yet we have to resort to this kind of garbage. And Microsoft, if you cannot 100% determine that a network is “public” (particularly one which has “No Internet connectivity” like the VMWare host-only network, why not at least provide an advanced option somewhere for a user to set the network type instead of forcing us to have to dig into the guts of the system?

Still can’t get away from the twaking CONFIG.SYS mentality?




Thinking Out Of The Sandboxie

I need to work on computers with a light text / dark background colour theme, and for the last couple of decades I’ve been able to get Windows and most applications I use to follow suit.

Windows Vista introduced a new theme system which took away the control over UI element colours unless you used the High Contrast theme, very harsh and ugly compared to what I’d configured and used since Win 3.1 to XP. With support for XP ending, the time had come to upgrade.

I had high hopes for Windows 8.1. The High Contrast theme lets you configure UI element colours (menus, text, backgrounds) but for some nonsensical reason, window borders always follow the colour of the window title (even though there is a field for window border in the theme file). Nonetheless I came up with an acceptable theme to work with.

Things came unstuck when I installed Mozilla’s Thunderbird and Firefox. When these detect a system High Contrast (HC) theme, they switch to a hard coded and broken theme (since September 2013) which includes white on white text and menu bars that get garbled as you drag over them. Its horrendous yet after months and plenty of bug reports, its unresolved.

Worst though is that when running on a HC Win8.1 system, Firefox shows all sites using an internal theme which wrecks the CSS for many sites, making them unusable. The setting of the “Allow pages to choose their own colours” option is totally ignored. System HC? Then your pages are always HC in FF, not acceptable to me.

Experimenting with .THEME files I found I could create a theme file with the high contrast flag off but still using the AeroLite rendering framework. Whilst this made FF and TB look OK, the windows Control Panel and other system windows now had huge sploges of white on them, as Microsoft uses the HC flag to control whether UI colours are respected. Running this way would also be unacceptable.

I found I could make TB and FF run without the theming if I ran them in Windows XP Compatibility Mode. I could have lived with this if it wasn’t for the fact that they also insisted in running as Administrator when in compability mode, not what you want for a web browser.

I was pretty cornered and starting to consider compiling from source or hooking the calls to the check for HC mode, Win32 function SystemParametersInfo(). Then I remembered an application called Sandboxie.

Sandboxie allows you to run windows applications in such a way that any modifications they make to files or the registry are captured and retained in a separate “sandbox” folder, meaning the real files are not modified, but from the point of view of applications running through Sandboxie, the changes have been made and persist. Its great for web browsers to help contain exploits from messing up your real system. But could it help me with theme problems?

It took a minute to install and it created a shortcut I could use to run Firefox as sandboxed. From within Sandboxie I then launched Windows Control Panel and went to Personalisation and chose my modified dark theme which had the “high contrast” flag off – the theme I mentioned earlier that messes up the system Control Panel but fixes Firefox and Thunderbird.

Interesting. The selection was made but the system’s theme did not change to reflect the selection. Control panel still looked good. The system still saw HC mode as on.

Then I opened Firefox through Sandboxie. It saw the HC mode as off and had reasonable UI colours.

After ensuring email and web history folders were not included in the sandbox, I now have a very workable solution to Mozilla’s High Contrast theme problems, and with the sandboxing feature, additional security as well.

I like that you can browse the sandbox folder. You see all the folder structure and registry hives that have been modified from within the sandbox. With my data files not sandboxed, there is very little there except a few hundred K of registry data which stores the alternate non HC theme that exists only within the sandbox.

Using it is trivial. I’ve made another shortcut for Thunderbird which launches it through the sandbox and Sandboxie has lots of options to get it out of the way once you’ve set things up.

The only downside I can think of is that I’ll have to take care when Firefox and Thunderbird update. The changed program files will be sandboxed but I guess I’ll occasionally run them outside sandboxie when I want to bring the “real” installs up to date.

New HTPC – Shuttle XS35GSV3

The ASRock ION 330 HTPC had been a faultless performer for nearly three years but in late December, the combination of a hot summer, a warm amplifier underneath it and a flaky case fan caused it to cook itself, leading to it becoming prone to lock up for periods of time. I changed the hard drive, reseated cables and replaced the fan. None of this helped (EDIT: Both 320GB WD drives were faulty), It seemed to have lost the ability to control the case fan properly unless I kept it on maximum fan speed, making it intolerably noisy.

After a few attempts at fixing it I decided to replace it and was pointed to the Shuttle series of totally silent fanless PCs by work colleagues. I bought the Shuttle XS35GS V3  which promised a totally silent home theatre PC experience.

I’ve not been disappointed.

I thought I’d be adventurous and gave OpenElec a try,. This is a very optimised XBMC Linux distribution. I found I had to use a more “generic” build as there wasn’t a build for the V3 hardware. After struggling with networking and messed up graphics for a day, I decided to go back to the flexibility of the software set I’d used previously, that being: TV Scheduler Pro for TV recording, Zoom Player for playback and EventGhost for IR remote control.

I started with XP and it was “ok”, but  Zoom Player (now at version 8.5 vs. version 6 on the ION) had moved on to using the excellent LAV Video Decoders that offered GPU accellerated playback of hi-def content, something I’d achieved using MPC Video Decoder.

I really liked the quality of the LAV Decoder (DScaler is now obsolete for me) but I couldn’t get it to work with acceleration. I discovered it needed the use of the EVR Video Renderer under Windows 7, at least.

I decided to skip Windows 7 and bought an upgrade to Windows 8. Installing it went pretty smoothly, I had to “forcibly” install the drivers for the KWorld Dual DTV USB Tuner and the LinkSys Dual Band USB WiFi (the onboard WiFi of the XS35GS is 2.4G only).

Application wise, everything ran well and the much maligned start screen was a non-issue, I’ve set up buttons on my harmony remote to take me straight to Zoom Player’s navigator for either TV Recordings or my media  library. Most importantly though, GPU accelerated playback using the LAV Video Decoders and DXVA2 seemed to work.

It wasn’t until more critical viewing that we realised that *every* video played had a tear in the centre when there was horizontal motion. It was as if it was switching frames at precisely the wrong time. This started a big investigation for the cause.

The problem occured when using the EVR Renderer with either LAV Video Decoder (DXVA2 or software decoder) or the FFDShow. decoder. With the Shuttle using a Radeon 7410M, there wasn’t much choice in drivers to try as its a custom mobile chipset. The video driver did not have the usual option for VSync and I tried both RGB and YCbCr pixel formats, and setting the display framerate to match the video (something which fixes typical tearing).

I tried what drivers I could get to load on it and was at my wits end as everything else was great including smooth low CPU DXVA2 playback of 50FPS 1080P.

Then I tried a slightly older Zoom Player EXE (8.50 instead of 8.51) and the problem went away! Yet when I renamed the older EXE to the regular ‘zplayer.exe’ name, the problem came back. What the…

Looking at the Explorer options on the EXE, the cause soon became clear.

Zoom Player had been installed with the Explorer compatibility option “Disable display scaling on high DPI settings” enabled. This option helps older apps run on the new very high resolution displays.

I’m not sure why, but switching this option off caused the tearing to completely disappear. Playback is now smooth and after some colour calibration, I am very satisifed with the results.

Here is the newly installed Shuttle sitting next to my amplifier.


SPA3012 update

As a long overdue update to my last post here (a whole year ago), Linksys finally did release an update (spa3102_v5.2.13_FW) which I’ve been running since April 2012.

The ATA has been running flawlessly since then, with touchtone problems and dropped calls a thing of the past.