Slow SMB transfers in Mac OS 10.12.2

I’m using a 802.11ac WLAN to connect to my Synology NAS. With the last Mac OS 10.12.2 update the network performance was catastrophic when I tried to access the NAS via SMB. At first I thought this might have been caused by the WLAN connection but even with a Gigabit LAN connection my transfer rates were around 3-5MB/s.

After a short search online, I’ve a few hits describing the actual problem:

Apple uses their own version of SMB and enabled client signing to mitigate against Man in the middel attacks. Therefore all connections underly this signing process and are way slower.

Therefore I’ve disabled client-signing on my mac using this command:

printf "[default]\nsigning_required=no\n" | sudo tee /etc/nsmb.conf >/dev/null

This will write this content

[default]
signing_required=no

 

to the file /etc/nsmb.conf. After you’ve set this value you need to unmount all samba shares. If you’ll reconnect now, you’ll witness a much better performance, starting with faster loading of network shares.

You can revert this change with

sudo rm /etc/nsmb.conf

 

Installing Mac OS Sierra (10.12) on a MacbookPro 5,5 (Mid 2009)

Mac OS Sierra was released yesterday. However, our good old MacbookPro 5,5 (Mid 2009) isn’t officially supported anymore. Luckily, there are people who figure out what is necessary to patch the official installation so that it can be installed again 😉

I’ve backuped the Macbook and gave the given instructions a try. Instead of reinstalling everything I only updated from El Capitan to Sierra. After the first restart, the Macbook shut down, as it didn’t found a valid boot partition.

So I rebooted again to the patched installation media and ran the proposed “macOS Post Install…”. I’ve selected my type of Macbook and let it patch. Additionally I’ve ran the “Force Cache Rebuild” command and rebooted.

The Macbook booted to Sierra 🙂 However, the FaceTime camera wasn’t detected and I wasn’t able to get it working again. Since there was a “Legacy USB Support injector” I think this might cause the problem. The FaceTime camera is connected internally over USB so it seems to have some problems.

I don’t think this is a big problem. You’ll probably get this somehow fixed with a little time and patience. However, since I’m running a real Mac hardware (and no Hackintosh), I don’t want to fiddle around with such basic hardware problems.

Therefore I can only recommend you to leave your Macbook on El Capitan (10.11) as the largest supported OS. Seems that Apple wants to get rid of devices older than 7 years, even if they are still doing great (with a SSD and 8GB RAM).

Automount network shares on Mac OS for use in iTunes

I’ve moved my iTunes library from my Macbook’s SSD to my Synology NAS on a network share. This is quite easy and can be made inside the iTunes preferences pane. After you’ve changed the path for the iTunes Media, all iTunes managed media will be moved to the new location (assuming you let iTunes manage your files of course :)).

This allows you to have your iTunes library on your Macbook while all the large files are stored on the NAS. This is especially important for larger libraries as well as the newer Macbooks which only have a limited flash drive instead of larger harddisks.

However, there is one important problem with this solution: Once you’ve disconnected from this network share for whatever reasons and you try to start iTunes, you’ll have your iTunes Media folder reset to your user’s music folder on your boot disk. You’ll now need to reset the path to your files again, and this will again cause iTunes to check all files if they are on the right location and moves them if necessary.

I thought I’ve taken care of this problem with auto connecting to the network share with a Login Item. However, this didn’t help me much since I sometimes have disconnections to my network (e.g. when I’m on the road) and the network connection will only be created once during the login of your current user. So this doesn’t help me at all and caused me to look for another better solution.

So I’ve found this gist (the link is dead) and modified it a little bit to my environment. Therefore here’s my short list of modifications for using autofs in combination with AFP or SMB volumes:

If you now start up iTunes again, it will try to locate the media files in the /Volumes/music folder, like I manually specified it. However, autofs will now automatically mount the network share for me and iTunes won’t complain about a missing volume. This way I won’t ever need to take care of manually updating the path once I forgot connecting to my NAS 🙂

Update:
Hm, it seems that the trick with /../Volumes does not work anymore on Mac OS 10.11.4 🙁 If I try to list the content of the mounted volume an error message is returned:

ls: : Unknown error: 118

So I need to mount the volume in a different folder and need to change the path in iTunes again.

Update 2:
I’m not able to mount afp volumes anymore so I’m using smbfs like it is described here (the link is dead). However, this will require a user and password in the configuration file 🙁

Update 3:

Mac OS Sierra breaks the autofs configuration. I had to change it a little bit according to this SuperUser entry. The Gist is updated accordingly.

Update 4:

This still works on Mac OS High Sierra. However, make sure that you enter the credentials correctly and that you spare special characters, according to this blog:

Note: If you have a password longer than 8 characters, or if the password has special characters in it (like “! # $ % & ‘ ( ) * + , – . / : ; & < = > ? @ [ \ ] ^ _ { | } ~”), you may receive a “No locks available” error message and the share will not mount under /home. You will also receive a “No locks available” or similar “Host is down” error if the password is wrong or missing.

I’ve encountered the “No locks available” today and had an error in my password which blocked the auto mounter from opening the folder.

Sync Borderlands Prequel and Borderlands 2 savegames between Mac and PC

I really liked Borderlands 2. So much, that I played over 42 hours already 🙂 This happened all on my gaming PC. With my new Macbook Pro and the availability of Borderlands for Mac, I intend to play it in LAN mode occasionally when I’m visiting friends who also play Borderlands. However, I was shocked when I started Steam on my Mac and did not see the savegames from my PC, although Steam’s Cloud Synchronisation was active.

Borderlands 2 Steam Cloud Sync

A short research showed that the developers of Borderlands had this feature deactivated, because they cannot guarantee that the correct patch versions are applied to all platforms to the same time. This could lead to possible corruption of the savegames and so they disabled Cloud Sync although it is activated by default:

Q: Will I be able to sync my game saves between the Windows PC, Mac, and Linux versions?

A: Yes, but with a caveat: characters and saved games will NOT sync between Windows PC, Mac, and Linux via Steam Cloud.  Since the Mac and Linux versions of Borderlands: The Pre-Sequel may frequently be in an out of sync with the Windows PC version, syncing game saves across platforms via Steam Cloud has been disabled.  This will ensure saved game data will not be lost or corrupt due to incompatible in-game content or other unforeseen reasons.  Users do have the option of transferring game saves via physical media (like a thumb drive) if they wish.

 

Nevertheless, a clever user on the steam forum created a nice tutorial. He intends to use Dropbox with NTFS and HFS+ symlinks to link the savegame folder to Dropbox. He suggests to use the mklink command this way:

mklink /d "C:\Users\YourUserName\Documents\My Games\Borderlands 2\WillowGame\SaveData\NumericalID" "C:\Users\YourUserName\Documents\Dropbox\DesiredFolder"

What he did miss to tell you is that you’ll need an elevated command window with administrator rights. Just enter cmd on the Windows 8 start menu and select “Open as administrator” on the command prompt.

The next problem is the order of the folders. In his order, this will result in an error message stating that the link could not be created. However, if you look up the command on MSDN you’ll see that you must switch the order of the arguments. It is first the Link name (in your Dropbox folder) and then the Target (What do you want to link).

All other information in that forum is correct. You’ll need to link this numerical Id folder with your savegames to a Dropbox synced folder and do this also on the Mac. Be sure to create a backup before you create the links in case you overwrite your savegames. After that, it works. This will also work for Borderlands The Pre-Sequel!