Friday 15 February 2019

Fruity Tips #3 - Got a Slow Boot Problem On A MacBook Pro?

My love affair with my new refurbished 2017 15" MBP was on the verge of needing a trip to Relate recently. Whilst it has been a brilliant performer and has easily coped with everything I've thrown at it over the past three months, it has had something of a teenage strop in the last few weeks. It has been taking ages to reboot and be ready for me to start to do any actual work.




I'm used to Windows machines taking an age between powering them up and being able to do anything productive - that was the primary motive for me making the move to a Mac. And I've never had any problems with MacBook Airs or iMacs in respect of boot time. Even the latest addition to the Apple Harvest was fine until a few weeks back. And then it suddenly started taking an age to reboot. I'd get the Apple logo and progress bar which would get to about 60-70% and then hang. I'd power down and re-power and the same thing would happen.

I hate it when this kind of problem occurs because you usually know it's going to take a lot of sleuthing and pain to find the root cause. And it's almost certainly going to take a lot of time and patience (and as I get older, patience is sometimes in short supply).

I started off with all the usual experiments:

  • Reboot in Safe Mode - the outcome was even worse. I nearly wore out my fingertips waiting for the logo to appear
  • Reset SMC - no change
  • Reset PRAM - no change
  • Reboot into recovery - result!
Once in recovery, I could at least test the SSD using disk utility and this showed there were no problems (but indicated there were 9 APFS snapshots, each of which took an age to verify). In addition, with access to the Terminal app, I also set the boot arguments to automatically start up in Safe mode and with verbose output. I started the laptop and retired to a safe distance rather than sitting there watching it and being tempted to interfere. I returned after about an hour and the MBP was indeed booted into Safe mode. Phew! I becoming was less concerned that this was a hardware issue and more of a software or configuration problem. I reset the boot argument and started again.

A reboot into Safe mode is sometimes all that is needed to fix a teething problem, but not so in this case. When I restarted in normal mode I still had the same problem. This time I left the laptop to its own devices and it took over twenty minutes to get to the login screen. In theory,  I could have things as they were. I generally keep my MacBook powered on, just putting it to sleep every night and waking it up every morning using a schedule set up in Power Manager. I only switch off the machine on a Saturday night, again, using an automated schedule which then wakes it early on Sunday morning. Since the machine is set to switch on before I wake up, I wouldn't see how long it takes to boot! Out of sight, out of mind, so to speak. 

But I already knew it was a problem, so I needed to resolve it. It's just the way I am, and who knows, it could be hiding a bigger problem just waiting to happen. Next step was to reinstall Mojave. I have a USB installation drive for such contingencies, so I booted that up (it booted almost instantly) and ran the installation. 

Still no improvement on the boot time. But since the USB drive boot was quick, it was becoming clearer that this was now either a problem with the SSD, which I deemed unlikely or it was a third party software configuration issue.

I started searching for similar reports of poor boot times and was kind of relieved to find I was far from alone. A boot time of twenty minutes was far from uncommon. One particular discussion on the Apple support forum ran to twenty-three pages (with no obvious resolution). One area that caught my attention was that the APFS snapshots could have been responsible and I went back to verbose mode to see if this was a problem but it turned out to be a red-herring.

Eventually, I happened upon a discussion about Little Snitch and some people reporting that they had isolated their boot time problems to a specific set of releases of Little Snitch. A support query on their web page concerning this problem runs to 7 pages. Since I was into my second weekend of trying to isolate the problem, I was willing to give anything a go, so I disabled Little Snitch and rebooted. Wham, bam and thank you, mam. I got back to the kind of boot time I was expecting, around 20-30 seconds (I have quite a lot of stuff that gets loaded at boot time). 

To try and prove the point and verify that this was the problem I re-enabled Little Snitch and went back to a twenty-minute reboot. A few days later,  Objective Development who own Litte Snitch released a new version which resolved the problem - a problem that Objective Development say they've been unable to recreate, which I find extraordinary. Nonetheless, Little Snitch 4.3 Build 5256 appears to have fixed the problem...For now at least! 


And it was just in time for Valentine's Day - so the machine and I could continue the love affair and no machines got massacred during the writing of this blog post!










Tuesday 5 February 2019

Warning: Suspicious User in the Users folder! Don't Panic?

Unless you physically glue up the ports on your computer, remove the wireless chips and all the other input capabilities, no matter how careful you are, it’s still possible to get caught out by unwanted surprises.



I was doing a bit of routine maintenance on my MacBook Pro over the weekend and I noticed an unusual item in the Users folder of my primary disk. At my local supermarket an “Unexpected Item In The Bagging Area” is the grocery shopper’s equivalent of an air raid warning, and is met with shivers, sweaty palms, red faces, and an overwhelming sense of wanting to go and hide in a deep hole. On a Mac, an unexpected User in the Users folder is even worse.

To make it worse, the unexpected user went by the name “tsninja”. Having any sort of ninja lurking, uninvited, on your computer does not bode well, and I immediately started panicking. How long had it been there, how did it get there, what was it doing there, and most importantly, what the heck had it been doing while it had been there.

What sane person creates a User account called 'tsninja'?
Let’s just add some context before going any further. I take precautions. I have firewalls in place, Little Snitch is installed and configured, I don’t spend my time surfing ‘adult’ sites, I have Malwarebytes set up to scan the laptop every day, the computer is protected with ultra-strong passwords and TouchID, and has never been accessible to members of the general public. In other words, it’s about as secure as it can be, within reason. But something had created this intruder user and I wanted to find out what.

Donning my best deerstalker, I began to investigate. Google didn’t proffer any useful indicators. I ran Malwarebytes again but it came up clean. I ran EtreCheck but nothing untoward there. I guess the smartest thing to have done now, would have been to attempt to delete the ‘fake’ user and get on with my life, but I couldn’t let it lie.

So I started to dig down into the tsninja folder, and this is what I found:

User folder tsninja appears to contain MS-Team configuration data
This didn’t look much like a normal User folder. A little further investigation on the internet suggested that the files at the lowest level of folders were configuration data for Microsoft Azure, and everything in the entire tsninja folder was timestamped on the same date and at the same time. Sure enough, I’d installed Microsoft Teams (for research purposes) at about the same time according to the system logs. By this time, some of the panic was beginning to seep away, but I really wanted a second opinion.

I asked some chums on the Mac To The Future (MTTF) Facebook group if they’d encountered anything similar. I got a response pretty quickly saying that they’d used MS-Teams for about six months but couldn’t reproduce the issue. I checked my fiancee's laptop because we’d also installed MS-Teams on her MBA. Nothing was showing up on her machine either. Signs of panic were beginning to reappear. My MTTF FB chums weren’t making any reassuring noises.

I decided to try a brute force experiment. I deleted the whole ‘tsninja’ folder. Interestingly it just let me!  Usually attempting to delete a Users folder would require a password at the very least. Anyhow it was gone, for now.

I relaunched MS-Teams and although it appeared to have to found a glitch it ran as expected. But lo and behold, as soon as I quit the programme, the ‘tsninja’ folder had reappeared in the Users directory. That was too much of a coincidence. But why was it showing up on my system but no-one else’s?

My only guess is that I had set my system up as the host for a Team, with my MBP effectively acting as a server, whereas my fiancée was a member of that team. The guys I was talking to on MTTF were also in a similar situation; they were members of other teams.

Ultimately, we collectively came to the solution that it is just shoddy programming by Microsoft. Despite (or maybe because of) Apple’s guidelines about where application support data files should be stored, Microsoft have a history of doing their own thing. In this instance, it’s cost me a bit of time trying to track down the root cause of the problem, and a few more ageing lines. And despite sending messages to the MS-Team product support people, they have declined to reply although I have now joined the MS-Teams community and started the discussion there. I’ll report back on any updates.

For now, I'm comfortable with my own explanation, and I'm not batoning down the hatches. But seriously, for a professional programmer writing business application software, creating a user folder called tsninja and sticking it in a reserved space should be a disciplinary offence. It's childish and unnecessary, and it's cost me a couple of lost days and an uncomfortable night. Time to grow up Micrsoft!



Wednesday 16 January 2019

Czeching out the i-tec Thunderbolt 3 Docking Station

If you’re going to buy a shiny new MacBook Pro you really should have the right supporting kit to go with it. After all, you wouldn’t buy a Ferrari and then never take it out of first gear, would you? Fast toys need to be paired with fast supporting tools! (NB - I would never recommend that anyone buys a Ferrari if they need an estate car, and the same mantra applies for computer peripherals; get the right tool for the job!)

Initially, I had my refurbished 2017 MBP linked up to an old Thunderbolt 1 Belkin Hub. A few weeks later I swapped out the Belkin for my OWC Thunderbolt 2 docking station which was a significant improvement. Since then I’ve been looking lustily at TB 3 docks, but they don’t come cheap.

The top contenders I was checking out were the CalDigit TS3, StarTech TB3, OWC 12 or 14 port docks, Elgato TB3 and the latest Belkin 3 dock. I had some quite specific criteria in mind:
  • SD Card slot (1)
  • HDMI slot (2)
  • Gigabit Ethernet
  • 3+ USB-A ports
  • 2+ TB3 ports
  • Less than £250 pounds
(1) I have SD card reader dongles but I wanted this feature built into the dock
(2) I only need two screens and the laptop is one of them. 4K and 5K video options are not important to me at present

This whittled out the Belkin and Elgato (no SD slot and too expensive), the CalDigit (DisplayPort rather than HDMI and too expensive), the StarTech (no SD slot or HDMI) and left the OWC docks neither of which met the price point I was looking for. I was resigned to staying with the current OWC TB2 dock and waiting for the prices to drop when I came across a new contender, the i-tec TB3HDMIDOCK.

i-tec is a Czech based company with a range of docking stations and adapters in their catalogue. I bought their USB 3.0 Dual docking station a few years ago when I needed to switch between my MBA and a Windows laptop that I’d been supplied with from a contract I was working on. This was well built and completely reliable and was great value for money compared to the competition.

In fact, i-tec had two TB3 docks listed the TB3HDMIDOCK and the TB3HDMIDOCKPLUS. The only difference was the PLUS model supports 85W charging compared to 60W charging for the standard model. And the PLUS model on Amazon UK was £25 more expensive. In the end, I found the standard version of the dock for less than £200 including delivery from a company called tekshop247. I put the order in on Thursday evening and it arrived by post on Saturday morning!

It took all of 30 minutes to unbox and install the new dock and most of that was clambering around under my desk to swap over the power bricks for the i-tec and OWC docks. Swapping over the attached devices was almost as easy. Ethernet, HDMI, 4TB USB-A hard disk and USB-A hub were straight swaps. My Lacie USB-C 5TB drive is now attached to the dock whereas it used to be connected directly to the MBP. A 1TB Buffalo Thunderbolt disk which I use as an additional Time Machine disk is now connected via the Apple TB2/TB3 adaptor to the MBP.
The rear side view of the i-tec Thunderbolt 3 dock

Strictly speaking, since the MacBook Pro is generally plugged into the mains these days I could use the dock to power the laptop directly, but I’m still using the original power supply with the First2savvv magnetic connector I mentioned previously.

Finally my Harmon-Kardon Soundstick II wired speakers plug into the front 3.5mm headphone jack on the front of the dock. This is the only thing I don’t like. I’d prefer the socket to be at the side or at the back rather than in the front. I can see why it’s positioned where it is for headphone users but it’s an aesthetic anomaly for me. This just leaves two spare front-facing USB-A slots and the SD card slot which was so important for me.

There is no software installation required, and even the ethernet connection worked first time without me having to cajole it into operation as I usually do. I did learn the valuable lesson that in order for externally powered peripherals to work properly, they have to be connected to the mains. I did forget that last step, which explained why the two front LEDs didn’t glow as I expected once all the bits were plugged in. The left hand LED glows green when power is supplied, and the right-hand side glows blue when Thunderbolt devices are connected.

The front view of the dock in situ (yes the monitor stand needs a dusting!)

The overall footprint of the i-tec dock is really quite small, measuring 229mm across, 87mm deep and 27mm tall. It can only be used in a horizontal orientation. I have mine raised off the desktop with a couple of wooden blocks which allows air to circulate and keeps the unit running relatively cool - it isn’t at all uncomfortable to put my hand firmly on the top even though it has been running 24x7 for the last four days!

Apple Harvest HQ 2019

Ironically, of all the docks I've looked at (and this also goes for dongles), all the manufacturers are backwards-looking and supplying USB-A slots rather than USB-C. In some respects, I would have prefered to have a dock with five or more TB3/USB-C slots and bought another bunch of adapters to deal with legacy USB-A devices. No doubt this will change in time, and at least this dock can support up to 5 daisy-chained TB3/USB-C devices.

In hindsight, perhaps I should have paid the extra £20 and bought the higher-rated charging version, but to be honest I'm not really bothered (and I never thought to look on the tekshop247 website!). At home, the laptop spends so little time on the battery that the charging is not an issue, and whilst the dock is quite small, the same cannot be said about the power brick, so it's probably not going to be going far in the future! The other point is that although I'm not bothered about 4K or 5K video at present, this dock does support both so it's relatively future proof should my needs change.

This is a really compact little dock that offers great value for money. The build quality is as good as that on the old OWC. If you're in the market for a budget TB3 dock, look no further.



UPDATE 2022-02-01: I now have both the 60 and 85W models - the higher powered one in Prague with me and the older one is back in the UK. Both continue to perform brilliantly!









Friday 11 January 2019

Fruity Picks #12 - Hyper Plan: Budget Visual Project Management

As a freelancer, I often find myself with my fingers in many pies. Currently, I’m doing some volunteer work for my local village museum, developing two websites, posting in my three blogs, and trying hard to finish at least one of the three books I’ve started writing. Managing my time is important to me, and with my background in project management, I like to have some semblance of a plan to keep track of what’s happening and when.

Whilst I am perfectly comfortable with software like MS-Project, it’s pretty much overkill for what I want but in the same vein, most ToDo applications aren’t quite good enough. I’m also a convert to visual planning tools having been using Kanban style boards in a number of consultancy gigs I’ve had.

When I came across Hyper Plan a few years ago I got quite excited, and after playing with it for a week or so, I’ve been using it as my project management tool of choice for my own work ever since.

Hyper Plan was created by Oryx Digital Ltd, a UK business owned and run by Andy and Claire Brice, and is aimed very much at people like me, who need flexible planning tools that are also affordable. Version 0.5.0 was released in beta at the end of 2014 and the latest version is 2.9.3 which went live midway through last year. The home edition costs £25 whilst the pro-edition is twice that but enables links (connections) between planning items. This is not a subscription model (thank goodness!) and is available on a 60-day trial.

If you are familiar with Kanban boards you’ll immediately feel comfortable with Hyperplan’s appearance. The screenshot below is for my writing activities.

My high-level, overall writing plan
As I mentioned, Hyper Plan is amazingly flexible. Rows and columns are completely user definable, and you can add as much or as little detail as required to manage your work. As items move through your defined workflow, you simply drag and drop them and the appropriate properties will automatically update. Planning items can be assigned to team members if you are in a bigger outfit than my one-man band, as can scheduled dates, detailed item descriptions and status flags. In the pro version, you can add timing constraints (connections) so that items are forced into a chronological sequence or can be linked by another relationship. Almost every property can be customised to your specific working practices - and it’s not often that a tool adapts to you rather than the other way around.

Almost everything is configurable


In addition, you can link to other Hyper Plan plans so it’s possible to maintain a master plan and directly access subordinate plans, although as far as I’m aware not changes will propagate between the plans so you still need to update items manually.

For Kanban purists, you can see the work in progress counts for each part of the workflow, but there is no way of limiting it automatically.

If you need to share your plans with a wider audience there are various output options available to you. Multi-user access is not currently supported but the developers have indicated that they will add this if there is sufficient demand. I suspect that for most people this will not be an issue.

This is such a great tool for managing work. I heartily recommend it, especially for freelancers, writers, web developers and anyone else involved in complex activities where you need to be on top of things. Download the trial version. You won’t be disappointed.




Thursday 10 January 2019

Fruity Picks #11 - Keyboard Maestro

In my last main post, I briefly mentioned Keyboard Maestro. Now over 17 years old, Keyboard Maestro was first released in 2002 by Michael Kamprath and became part of the Stairways Software portfolio in 2004. The latest version is 8.2.4 which was released in August 2018.

The software falls into the ‘must have utility’ categorisation, and it has appeared on every pretty much serious Mac users essential apps list for years. As the name suggests Keyboard Maestro enables the design and creation of macros to enable the automation of all kinds of routine functions.

I’ve been a casual user for many years but only recently started to investigate the power of the tool to help me fix specific problems I’ve encountered in my most recent daily work.

For example, I have created a macro to archive the Rapid Weaver project file I am using for our local village museum website. The macro is triggered from the Keyboard Maestro menu, copies the latest version of the RW8 project file to an archive folder,  unmangles the path and filename of the file, asks for a date to be entered and rebuilds the filename using this date.

The screenshot below shows the very simple macro I wrote to ensure that TotalFinder relaunches automatically whenever Finder restarts.

Keyboard Maestro editor window and actions

I use another macro to refresh the Weather Dock Express desklets on my screen which occasionally get overwritten. This runs invisibly in the background every couple of hours or can be forced to run on demand.

Keyboard Maestro is an incredibly powerful tool, with in-built debugging facilities, and a large library of built-in actions. It has logic and control flow features and can run embedded Apple Script within its macros. It's one of those tools that, the more you use it, the more you find you can do with it. There's a massive online manual and wiki and you have access to a community of users to assist and inspire you in your creative endeavours.

At the time of writing the software is available for about £35 (including VAT) from the Stairways Software Store.


Tuesday 1 January 2019

Technology Would Work Perfectly If It Wasn't For End-Users!

As we start another new year, I’ve been intrigued by a few discussions I’ve been party to during recent days. One was about upgrading to Mojave (macOS 10.14) and the other was about a smart home system that is very popular in the UK called Hive. The conversations were quite different yet they shared some key similitudes. Both indicated that there are large numbers of people who make key decisions about technical matters by casually surfing the internet and reading negative comments, primarily on social media.

In the two specific discussions I’m referring to, both on Facebook, the original posters were inclined to ignore the good advice and being swayed by both ill-informed suggestions or by completely misinformed statements.




By the end of 2019, it will have been thirty years since I first touched a computer. Strictly speaking, it wasn’t even a computer; it was a dumb terminal attached to a mainframe system in a different part of the city. Since that October day, I’ve witnessed staggering changes in the IT industry which I have ended up spending my life in.

The biggest difference, of course, is that back then, computers were anything but the consumer units that they have become today. The MBP that I’m writing this on is many orders of magnitude more powerful than the old ICL1900 I first used. In those days, before the infinite wisdom of the public was harnessed into the ultimate truth of today’s internet, if you had a problem you had to figure out a solution yourself. And so it has been for most of my working life. In general, you had to programme your way out of problems. Even today, many teething computer problems can be overcome with a bit of imagination and a couple of useful tools. Luckily, some of the smart people who write some of these tools are also generous enough to hang out on the internet and provide amazing advice to those of us who are prepared to do a bit of work and actually think about a problem rather than just expecting someone else to fix it for us.

Whenever you get a new Mac (or upgrade to a new OS) there are often a few things that don’t work quite the way they did. In an ideal world, you’d have the wherewithal to dig down and find out the root cause of the problem and fix it. Sadly, most of us don’t have that luxury these days. I recently found that my new MBP had a minor problem when it auto-switches from  Light to Dark modes (using NightOwl). For some reason, this switch forces a Finder restart and this, in turn, means that TotalFinder terminates. My solution was to use Keyboard Maestro to build a macro so that whenever Finder restarts, TotalFinder will automatically restart as well. It’s a seamless action and I don’t have to do anything.

My point is, that with a bit of imagination and a few readily available tools we can get over niggling problems with fairly simple workarounds. Sure, it took me a couple of hours to isolate the problem, research potential fixes and eventually create my own but was that a good enough reason not to upgrade to Mojave and solve a whole bunch of other problems. Clearly not. But many people out there seem to be looking for excuses not to do things which are pretty much common sense. And they are aided and abetted by others who are determined to make things worse - like the guy who stated that Mojave will not run 32-bit apps. Funny, that, because my version does!

After reading about the person who decided that they had read so much bad press about Hive in a Facebook Hive and Nest forum that they were going to go with a completely different system, I was reminded about the recent reviews I read on Amazon about products I have purchased and found worked perfectly. Although technology has become more prevalent in our homes and daily lives, the majority of people still don’t have any idea about how it works, how to install it correctly, or how to use it correctly. In many cases, they don’t even know why they’ve bought it. “I’ve just bought an Apple Watch - what does it do?”….

So it’s easy for people to buy something, plug it in and then sit back and complain that it doesn’t work rather than actually take the trouble to do it properly. Much of our technology is still emergent - it doesn’t always work exactly as it should, but for many people, it does for most of the time. They just don’t tell the rest of us, because they are quite happy getting on and using the time they’ve saved to do something interesting rather than whine and criticise things they simply don’t understand!

Are problems with Apple kit on the increase? Probably not. But there are now 100,000,000 Mac users all of whom have access to the internet and many of whom are all too ready to bad mouth the technology when it doesn’t work the way they expect. So problems become exaggerated and other people believe the negative hype.

For the record, I have Hive installed in my house and recently we installed it in my fiancee's house. 99% of the time it works perfectly, and I’d be happy to recommend it to a prospective buyer.

For many years I’ve held the belief that if end-users didn’t exist there wouldn’t be any issues with technology. That’s never truer than now!

Happy New Year!