Thursday, 3 June 2021

PS/2 mouse not working via KVM with Windows XP

I've been trying to get a couple of old PCs and servers running recently. I have (or at least plan to have) them connected up to a KVM switch so I don't have to faff around plugging and unplugging the keyboard / video / mouse when I want to switch to a different machine.

But the Pentium 4 era Windows XP machine doesn't seem to accept the PS/2 mouse when it is plugged in via the KVM. Plug the same mouse directly into the PS/2 port on the PC and it is fine, just not via the KVM. I initially thought it was a dodgy cable (I checked plugged one of the servers into the same ports on the KVM, and the mouse worked fine, so I knew it wasn't the KVM). So I purchased another couple of cables, which arrived today - but still the same issue.

I've now found the cause / fix for this, so I thought I'd post it here. In the BIOS Advanced > Peripheral Configuration > Mouse Contoller had to be set to Enabled.

The BIOS on the particular machine gives a helpful description of the meaning of this setting. You can set to Disabled to disable the PS/2 mouse port and free up an interupt input (IRQ). Mine was set to Auto, which is meant to free the interupt input if no mouse is plugged in, but use it for the mouse if one is detected. So it must be that due to the KVM, the mouse prescence wasn't being detected and so the PS/2 mouse port was being disabled. Changing the setting to Enabled (always enable to PS/2 port for mouse) fixed the issue.

Sunday, 9 May 2021

RTL9210 NVMe USB3.1 vs SATA SSD

Quite a while back I bought a "USB3.1 Type-C Enclosure" for use with my Corsair Force MP510 512GB NVMe drive. After I purchased it, I found that it was only going at / below USB 3.0 speeds, but with a different NVMe drive installed, it would work at 3.1 speed (or at least above 3.0 speeds). I'd not managed to find any fix for this, so I've just been using it since then at the USB 3.0 speeds.

I've been working lately with my web development site files on my home PC's internal SSD, which isn't great as it means I can't take them to work (or anywhere else) with me. Previously I had been using a Sandisk Extreme USB 3.0 memory stick, but I'd been having quite a few issues with that (it's quite a few years old now), hence why I had moved them to the internal SSD. This weekend I was trying to tidy up my web development files, so I thought I would move them to the MP510 NVMe drive in the USB 3.1 caddy, which I currently just use for various VM VHDs. It wouldn't be as fast as the internal SSD, but at least it would be portable and faster / more reliable than the USB stick.

I thought I would take a look again at seeing if I could fix the issue with the speed, and another problem it has, which is dropping connection when on a USB 3.1 socket. First thing I tried was updating the ASMedia USB drivers for my motherboard to the latest version. Unfortunately that made no difference.

The board for the NVMe to USB caddy uses a Realtek RTL9210 chipset. I managed to find a firmware update to 1.23.15.111620 for the chip. (Finding the firmware update for this and the latest USB drivers for my motherboard was a pain - it seems you have to find them on third party sites and the manufacturers don't release them directly. Yes, motherboard manufacturers do have driver updates on their sites, but these tend to be old ones.) The update went fine, after doing this I ran CrystalDisk Mark on the drive, then unplugged the drive to move it from the USB 3.0 socket it was curently plugged into, to a USB 3.1 socket.

But the disk didn't show up, and when I went into Disk Management it said the disk needed initialising. I tried rebooting, unplugging and re-plugging a few times, tried it in a different PC, but no luck. So I took the drive out of the caddy, in order to try it bare. Unfortunately my PC only has one M.2 slot, and this is used for the boot drive. So I couldn't test it in there.

I looked through all my adapters, hoping for an NVMe riser cable or PCI-e to NVMe riser cable, but the closest I had was a "NFHK N-M201 Ver. 2.0" PCI-e to NVMe M.2 card. I plugged this into a x4 speed slot on the motherboard and thankfully the drive did show up okay.

MP510 NVMe drive via PCI-e to NVMe adapter card

I then tried a PCIe x1 - PCIe x16 riser, with the cable and x16 slot board outside the case (to allow for easy plugging / unplugging of the drive without opening the case up). Then plugged the PCIe to NVMe board into this. This worked, but speeds weren't great.

MP510 NVMe drive via PCI-e 1x to 16x riser and PCI-e to NVMe adapter card

I had issues with my PC refusing to boot, but eventually tracked it down to my use of a USB 2.0 extension cable that only had a single 4 pin USB connected into it, leaving 4 bare pins. As I had been messing about inside my PC I think I must've moved this cable so the pins were touching something metal and shorting out. I couldn't find any electrical tape that wasn't rubbish so I just covered up the bare pins with some selotape to resolve the issue.

Next I tried a simple PCIe x1 - x1 riser. For some reason they had made it with the end of the slot blocked off (so you could only physically fit a x1 card into it). So I had to dremel out the end of it to let the x4 size PCIe to NVMe adapter fit. But this gave the same results as on the x1 - x16 riser.

MP510 NVMe drive via PCI-e 1x to 1x riser and PCI-e to NVMe adapter card

I then tried a Crucial MX500 1TB SATA SSD I'd purchased recently and not used, with a SATA to USB 3.0 adapter. But this just crashed Crystal Disk Mark. So then I tried it connected via SATA, and the speeds were actually better (at least for sequential reads and writes) than the NVMe drive.

MX500 SATA drive via SATA

After that I tried again with the NVME to USB caddy in a USB 3.1 port, and it now worked. But results weren't any better.

MP510 NVMe drive via RTL9210 NVMe to USB in USB 3.1 socket
MP510 NVMe drive via RTL9210 NVMe to USB in USB 3.0 socket

So it looks like my way forward is just using the SATA SSD connected via SATA. I'm not sure why the NVMe drive in the PCI-e adapter is so slow, particularly on the x1 risers. The only thing I can think of is if the N-M201 PCIe to NVMe adapter card was actually PCIe 2.0 speed rather than 3.0 - but I'm not sure how that would be possible when it's nothing more than traces from the PCI-e slot to the M.2 slot and an LED.

The MP510 drive attached to a PCIe - NVMe adapter, inserted into a PCIe 1x - 1x riser, the empty PCIe 1x - 16x riser, and MX500 connected via SATA.

Saturday, 13 March 2021

Alesis Melody / Harmony 32 keyboard is the same model

I've been looking at getting a (music) keyboard for my niece's 6 year old birthday. Ideally I was looking for one that doesn't require external power and has built-in speakers (i.e. doesn't require external speakers). Just to make it easy for her to use without having to plug various things in each time she wants to use it. I imagine she will mainly use it plugged into the mains power, but having the option of using it on batteries as well is nice.

Unfortunately finding a 'good' keyboard at a reasonable price that is not merely a midi controller wasn't that easy. Most midi controller keyboards are pretty decent, but not suitable as she doesn't always have access to a computer / tablet to plug it into. It would also complicate the process in that she wouldn't be able to just turn the keyboard on and play.

I started looking at the Korg Volca FM. This offers a large range of adjustments to the sounds you can make, plus a nice range of built-in sounds. The keyboard is only very small, but I would think it would be fine for a 6 year old. It also includes an arp and looper. Polyphony is limited to 3 notes, but for the price (~£100) that's not bad. The main issue with this is that adjusting the sounds seemed quite complicated with quite a bit of menu diving.

I then looked at the Yamaha Reface DX and CS keyboards. The CS keyboard has a good range of sliders that she could have fun playing around with to adjust the sound. But it doesn't have any built-in sounds. The Reface DX has a good range of built-in sounds (presets), and allows adjusting the sounds, but this requires menu diving. Both have speakers and can use battery power. Used they can be had for around £250. Reviews on both models seemed very positive.

I then found the Novation Mininova. This combines the best of both the reface DX and CS - loads of preset sounds plus lots of knobs, buttons and sliders to immediately adjust the sound with no menu diving needed. Plus a vocoder that I'm sure my niece would love. The problem was that it requires mains power and separate speakers. Plus the cost, like the Reface models, is around £250 used.

I also thought if I got her such a good keyboard she wouldn't have as much fun when visiting me and playing on my keyboards. I may get a Mininova myself though as they do look fun to use.

Finally, I found the Alesis Melody 32 keyboard. This is much more of a 'toy' keyboard, but for a 6 year old I think many of these 'toy' features will be appreciated. It has loads of voices, rhythms and some drum buttons (something missing on the synths), demo patterns, performance recorder, and MIDI. Plus the price was good - only £40.

Unfortunately I couldn't really find many reviews of this keyboard. It's further complicated by the fact that it seems to be marketed (and labeled) as both the Melody 32 and the Harmony 32. They both have pages on Alesis' website, and you can see they have the same content apart from the name change: https://www.alesis.com/products/view2/melody-32 and https://www.alesis.com/products/view2/harmony-32. They even went as far as changing the name on the product shots - and did a good job, I can't tell which ones are the originals.

It's missing a lot of features the more expensive keyboards and synths have, e.g. no pitch bend, no velocity sensitivity, and not even octave up / down buttons. The buttons also apparently don't send MIDI, only the keys. But for the price, and for a 6 year old, it seems like a good deal to me. It won't be a keyboard she can grow with as much, but it also won't be a case of spending lots of money for features she may never use. I just have to hope it works okay and doesn't break easily.

Sunday, 3 January 2021

Annoying

This morning I found my VM I use for my web development work wouldn't boot. When I viewed it in Virtualbox it would get as far as EXT4-fs error loading journal then stop. Unlike my previous issues I've had, it wasn't even getting as far as being able to mount the filesystem read-only.

I first ran a Windows chkdsk on the physical disk the VM HD was stored on, which said it fixed some issues. I then rebooted the PC, but still had the same issue on starting the VM.

With no way to get to a console with the VM in its current state, I had to wait for ages while I downloaded an Ubuntu ISO, as I didn't have a linux ISO handy to boot the VM from. After eventually getting that downloaded, I booted from that and ran an fsck, which fixed various issues. I also ran e2fsck -C0 -p -f -v /dev/sda1 as per Fix EXT4-fs error loading journal - I'm not sure if this step was necessary, but I thought it wouldn't hurt to run it since the error I was getting was related to this.

With this done I managed to boot the VM okay.

While I was waiting for the Ubuntu ISO to download I decided to take a look at an HP Pavilion 360 laptop that I'd reinstalled Windows on but was missing some drivers. From looking up the vendor and device IDs for the missing drivers I knew these were the Intel Bluetooth and Trusted Execution Engine drivers. The drivers on HP's website (both Win 10 and Win 8) didn't work, neither did any Intel drivers I could find.

Both HP and Intel's software that is meant to automatically find and install updated drivers for your system didn't find the correct drivers either. (Actually the HP software was one of the first things I installed on it when first setting it up after reinstalling Win 10, and it only found 1 driver I think out of the many that were needed).

The drivers listed on HP's website for the laptop seem pretty bad - the card reader drivers didn't work and I ended up having to find some from a Lenovo website to install.

So today I figured I'd put back in the original drive (I replaced the original SSHD with an SSD to try and speed the laptop up as it is extremely slow, though it didn't actually help much). Then in device manager view the driver files for the bluetooth and TXE devices, find them, and copy them. Then put the SSD back in, and install the copied drivers.

But after getting the laptop unscrewed and apart, and removing the SSD, I realised that this was a pretty stupid way of doing it. Why not just boot off the SSD, have the original disk on a USB to SATA dongle, then tell Windows to look for the drivers on the original disk. So I tried that but the original disk kept losing connection.

So I ended up having to plug the original disk via SATA to USB into my PC, copying the system32 (and I also copied the system and SysWOW64 dirs in case) onto a USB stick, then putting that USB stick into the laptop so it could grab the drivers from there. Thankfully though, this did work and I now have all the drivers on the laptop.

Before finishing with it, I ran hwinfo on it to see if the CPU temps were getting really high, but they weren't. Around 40-50 when idle, or 50-60 when watching a YouTube video. So I still don't know why it's so slow.

I did manage to get some work done in the afternoon. Then in the evening I had an annoying issue where I couldn't get one of my local dev sites I was trying to work on to load. So I spent ages trying to fix that, in the end it turned out that some of the .htaccess rules had been removed, messing things up. This was with a WordPress site, I presume either WordPress or a plugin had updated the file and removed some of the rules needed for the site to be accessible. This must've happened at least a day ago as my backup from yesterday was the same, I had to grab the .htaccess file from the live site to get my local site up and running again.

So I didn't get much work done today, but it wasn't a total disaster / waste of time.

Saturday, 2 January 2021

Sappy 2021

Unfortunately it seems the eM Client software I set up with all my email accounts about a month or two ago was only a trial. And so I am now without easy access to my emails. I looked again to see if there are any suitable mail clients, but the only one I can find is Evolution, which doesn't work on Windows. And since I haven't got my new Ryzen 5900X processor I ordered in early Nov when it came out yet, I can't build my new PC with a linux OS I could use Evolution on.

So today I've been working with my main personal and work accounts (1 each) open in Outlook online. When I went on 'open an additional mailbox' on my work account, it comes up with a "Open another mailbox" prompt. If you click in the text input, it then pops a box with a list of "Suggested contacts", all of whom are people I communicate with over email, and none of which are additional mailboxes I have access to.

So evidently MS thinks you'd like to try and open one of your contact's mailboxes rather than one of your own. I'm sure many people would find viewing their contacts' mailboxes quite interesting, but I would guess that MS doesn't actually allow that. I think the reason for showing your suggested contacts as to which mailbox you'd like to open is more just a case of Microsoft logic.

In the evening I made some whole grapefruit muffins, and after trying one I realised why I couldn't find any whole grapefruit muffin recipes - they are quite bitter (particularly in aftertaste). So I made some cream cheese icing to go with them that helps subdue the bitterness a bit.

I also spent ages on Ali Express putting together a shopping basket of parts to hopefully make something like a DIY Roland Handsonic. The end cost was nearly $100 though, it's amazing how quickly the cost adds up for a few cheap parts. It seems Ali Express have also started adding an extra 20% on top of the order at checkout, presumably because the UK is no longer in the EU. Though I don't really know why that would make any difference.

I didn't need to purchase any of the parts now - they're not on some special super deal or anything. But with the length of time things take to get here from China, I thought I might as well get it all ordered, then in a couple of months, if I do have any time, I can look at the project instead of having to wait then for parts to arrive or having to pay much higher prices from UK sellers.

Sunday, 29 November 2020

Exchange 365 stupidity

My current email host is shutting down my account shortly, they did give me plenty of notice, I just haven't had any time to do anything about it. I don't really have any time to do anything about it now, but the issue is forced since I can't carry on working with no email.

Previously I had investigated possible solutions, the ideal would be my own email server with someone like DigitalOcean, but I don't have the time to set that up. So instead I decided to go with Exchange 365 as this is very cheap at only £3.60 a month for unlimited shared mailboxes. I have multiple mailboxes over multiple domains, and I am the only 'user', so this works out far cheaper than other providers that charge per mailbox.

But of course, with it being an MS product, getting it set up wasn't simple. I do have to give them credit for their Email migration tool though, this was simple to set up and worked well (as far as I can tell). The limit of 35MB per message does seem rather stingy, and wouldn't suit some people, but max message size with my current email provider is far stingier than 35MB, so it was no problem for me.

The first problem I had was setting up my account in Thunderbird (the email client I use). Info I had read said I needed to use the ExQuilla (paid) add-on. Thankfully you can install this without paying, as I couldn't find any way to get this working with my shared mailboxes.

After reading more info, it seemed to be the consensus was that you should setup the accounts in Thunderbird using IMAP rather than using Exchange. So I got my first mailbox set up using the guidelines here: Office 365 Exchange Online - How to access a Shared Mailbox using Thunderbird or other IMAP client, but I couldn't send and was getting something like unknown error sending of the message failed due to unexpected error 80004005 when sending a test email.

Searching the web about this brought up various things. One was about setting up an 'app password', but Microsoft's own articles about how to do this give instructions that are not possible to follow or contain links that go to dead ends. I would guess either MS have moved the location of where an app password can be set up and not updated their documentation, or it is something for personal MS accounts only, or its been removed.

I managed to turn off 2FA for my account via the Azure AD web admin: https://portal.azure.com/ > Azure AD > Users > Multi Factor Authentication (link along the top) > check the user > disable (under quick steps). BTW if you click the 'service settings' tab, here is where you can check that 'app passwords' is enabled, which it was for me already, but as I mentioned, there doesn't appear to be anywhere you can create an app password.

In any event, this had no effect. I tried using the domain.mail.protection.outlook.com address as the SMTP server, but still got nowhere.

So I tried sending an email via powershell, first with the domain.mail.protection.outlook.com address (and port 25), then with the smtp.office365.com server and my main 365 account:

$Cred = Get-Credential
Send-MailMessage -From 'me@myaccount.onmicrosoft.com' -To 'adifferentemail@somewebsite.com' -Subject 'Test mail' -Credential $Cred -Port 587 -SmtpServer 'smtp.office365.com' -UseSsl $TRUE

When the Get-Credential prompts for your user details, you just enter the user and password for your main O365 a/c. This was actually very helpful as it gave me a much more useful error message:

Send-MailMessage : Mailbox unavailable. The server response was: 5.7.606 Access denied, banned sending IP
[my.ip]. To request removal from this list please visit https://sender.office.com/ and follow the directions.
For more information please go to  http://go.microsoft.com/fwlink/?LinkID=526655 AS(1430)

After doing this, you are told it will take 30 minutes to get your IP removed from MS' blocklist. However, after 30 minutes I was still getting the same message. So I tried again, but this time from my shared mailbox address, requested the unblock again (using my shared mailbox email address), and after another 30 minutes I was a bit further. I was now getting:

Send-MailMessage : The SMTP server requires a secure connection or the client was not authenticated. The server
response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

This didn't make any sense, as I wasn't sending anonymous email, I was providing the credentials. After much more searching I found a solution that fixed it - the advice was to go to Office 365 > Users > Active Users > Click on the user name > Mail tab > Manage Email apps > Ensure Authenticated SMTP is checked. Now in my case it was ticked, but after saving the settings (despite making no changes) I could now magically send the email. I have since turned back on 'Enable Security defaults' in Azure AD (one piece of advice was to turn this off) and re-enabled 2FA, and it is still working.

So it seems the final setup is:

  • Create shared mailbox, add an alias to it and ensure your main account has full access to it (which it should be default).
  • Go to your user in Office 365 admin, and save the 'Manage email apps' setting (ensuring that Authenticated SMTP is checked).
  • Settings for IMAP Configuration:
    EMAIL ADDRESS:
    shared@anotherdomain.com (shared mailbox)
    IMAP SERVER:
    outlook.office365.com 993 SSL
    USERNAME:
    user@maindomain.com\shared-mailbox (user\shared mailbox alias)
    PASSWORD:
    main user's password
  • Settings for SMTP:
    SMTP SERVER:
    smtp.office365.com 587 TLS
    USERNAME:
    user@maindomain.com (main username)
    PASSWORD:
    main user's password

Additionally, it seems that you actually get users created for each shared mailbox, and you can use these accounts to directly login and send email. But I'm a bit confused on this if the account is just having a trial period, and after that only the main user account will be able to access the shared account. It would be weird if for £3 a month you actually got unlimited users and mailboxes (up to 50GB total storage), just that all mailboxes must be set as shared.

Oh yes, another annoyance was when setting up the account on my phone (Gmail app), I added the account as an Exchange a/c (not IMAP) and used the email of the shared mailbox but credentials of the main user. But the actual mailbox it added was that of the main user (it showed the email address of the shared mailbox though). Adding it again using the credentials of the (unlicensed) user for the shared mailbox did work.

When signing up for Exchange 365, I also found it rather disingenuous that they described it as being reliable - they are almost constantly having problems with Exchange 365 services. Thankfully most of the time the problems aren't with actual email delivery, but sometimes that does go down as well (usually they have it back up after a few hours).

So far I've only migrated one account, so I've now got the rest of my accounts to migrate. Hopefully I've now got things sorted so the rest will be smoother.

I also almost forgot to mention that many of the answers.microsoft.com forum threads that came up in the search results would just load with We are sorry, the thread is not available at this time. Basically everything MS is broken.

Tuesday, 1 September 2020

Vagrant Read-only file system fix

When I booted up my main VM today, it would boot part way and then I'd get:

==> default: Configuring and enabling network interfaces...
C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/net-scp-1.2.1/lib/net/scp.rb:398:in `await_response_state': scp: /tmp/vagrant-network-entry-1598986668: Read-only file system (RuntimeError)

Followed by a load of errors. When accessing the machine via Virtualbox, I would also get quite a few read only file system errors after logging in.

Eventually I found the solution was to run a file system check (accessing the machine via Virtualbox):

sudo fsck -C /dev/sda1

(Where /dev/sda1 is the filsystem partition). This found numerous errors, which I just had to put 'y' in to let it fix them. It ran pretty quickly, probably done in a minute. After that I rebooted the VM, logged in and didn't get any errors. Shut it down, then booted it normally via vagrant up, and all working so far.

A good explanation of why the filesystem may become read-only is here: Ubuntu VM “read only file system” fix?.