For Your Protection

I rarely game these days but I do occasionally join my kids in play. Sometimes it’s Starcraft, sometimes Unreal Tournament, sometimes good old Minecraft.

But sometime they want to play something else online. Like when my son asked me to play Hypixel with him. And I joined. Only to be banned 2 seconds after – before even being able to do anything. Fortunately there is an appeal process and surprisingly it works fast. I had a response to my appeal within an hour. And that’s where the good news stops.

First they force you to go through the process of changing Minecraft password for no reason whatsoever. Instead of telling why you got banned, they will just point to generic list of reasons why you could get banned without any specifics on which of those reasons was the one for banning me. Although that did shed a bit of light as one of the reasons might be a VPN usage.

On my computer I have VPN turned on by default and I believe any sane person should do the same. While not bullet-proof, VPN does increase both privacy and security. However, looking over at Hypixel’s forum, getting banned for using VPN is quite common. Excuse is tracking cheaters but that doesn’t pass smell test for me. You are already using Minecraft account for this – and that costs money. Isn’t blocking Minecraft account actually more painful than indiscriminately blocking the whole IP range? Those wanting to cheat will simply use range you haven’t insta-banned.

In any case, my appeal was accepted. So permanent ban was changed into 30-day temporary ban in order “give you enough time to properly secure your account.” Their server, their rules I guess. However, suggesting that using VPN is somehow not “properly securing my account” is next-level of nonsense responses. Are they really training kids (and yes, most of their audience are kids) that VPN=not secure? I guess those advertisements really need you location that badly. :)

Surface Go Touchscreen Not Working in Ubuntu 19.10

Those using Ubuntu 19.10 might have noticed this suddenly stopped working. And this can be directly correlated with the latest kernel update.

If you dwelve into details, you can see the following with kernel 5.3.0-40 (previous, working version):

uname -a
Linux 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

sudo journalctl -b | grep multitouch
hid-multitouch 0018:04F3:261A.0001: input,hidraw0: I2C HID v1.00 Device [ELAN9038:00 04F3:261A] on i2c-ELAN9038:00
hid-multitouch 0003:045E:096F.0005: input,hiddev2,hidraw4: USB HID v1.11 Mouse [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input3

If you check it under latest kernel 5.3.0-42, you’ll see a bit of an issue:

uname -a
Linux 5.3.0-42-generic #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

sudo journalctl -b | grep multitouch
hid-multitouch 0018:04F3:261A.0001: report is too long
hid-multitouch 0018:04F3:261A.0001: item 0 1 0 8 parsing failed
hid-multitouch: probe of 0018:04F3:261A.0001 failed with error -22
hid-multitouch 0003:045E:096F.0005: input,hiddev2,hidraw3: USB HID v1.11 Mouse [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input3

If you browse kernel team Bugzilla, you’ll find there is already a bug report for this issue and issue has already been merged to kernels 5.5 and 5.6. Unfortunately, Ubuntu 19.10 uses a 5.3 kernel so we’ll need to wait a bit.

The next best thing is to temporarily downgrade our kernel. For this the easiest method is to just update /etc/default/grub to use third entry of the second menu (Advanced, old kernel) as the default:

sudo sed -i 's!GRUB_DEFAULT=.*!GRUB_DEFAULT="1>2"!' /etc/default/grub
sudo update-grub2

Once patch propagates to the current version of kernel, simply restore the default:

sudo sed -i 's!GRUB_DEFAULT=.*!GRUB_DEFAULT=0!' /etc/default/grub
sudo update-grub2

PS: To discover which menu entries you have available, you can use the following generalized command:

grep -Ei 'submenu|menuentry ' /boot/grub/grub.cfg | sed -re "s/(.? )'([^']+)'.*/\1 \2/; s/(submenu|menuentry) +//"

Ubuntu 19.10 on Surface Go

As I started traveling a bit more recently, I went into search for a small laptop I can carry with me. As an alternative to my 17″ work and 15″ personal laptop, I wanted to go much smaller. Here comes Surface Go.

It’s not a powerful device by a long shot and any heavy load is out of question. That is doubly so for the one I selected – with 4 GB RAM and only a 64 GB disk. What worked in its favor was a really cheap price (Craigslist) and reasonably mainline components ensuring Linux compatibility. Yep, I wanted to use this as my portable Linux machine.

The first step was to create a bootable media. I personally use Rufus if doing it from Windows. For those doing it from Linux, there is an excellent page with other options available. What you want is MBR-based FAT32 format. If you use GPT, all you’ll get is GRUB command line.

The easiest way to install Ubuntu is if you start from Windows. Go to Recovery Options and select Restart now. From the boot menu then select Use a device and finally use Linpus lite. If Linpus lite doesn’t appear, select EFI USB device and repeat the process. For some reason Linpus option appears every second boot for me. If you are using Ubuntu, there is no need to disable secure boot or meddle with USB boot order as 19.10 fully supports secure boot (actually Microsoft signs their boot apps).

From there on, you can proceed with Ubuntu installation as you normally would do. For me that meant going with Minimal and no other changes. If you select third party drivers, you will have to setup UEFI password but I’ve found that Surface doesn’t need such special treatment.

One issue that you will face is misbehaving wireless driver. For this you can either follow the guide on Reddit or install a custom package. I personally go with the package as it will restore driver every time system gets updated.

sudo apt install ./surface-go-wifi_0.0.3_amd64.deb

That’s it. Your Surface Go will boot Ubuntu now.

PS: If you do want to mess with boot order, start with the Surface Go powered off. While holding Volume Up button, press Power button, and then release Volume Up. This will give you UEFI menu. There you can change boot order and/or disable Secure Boot. To reset BIOS settings to the default values, use F9 key.

PPS: Between the time I wrote this post and its publishing time, any further travel became unlikely due to COVID-19. There goes my reason for getting this laptop. :)

Restoring Surface Go Windows from Within Ubuntu

Booting from the USB is easy enough if you have Windows installed. Just go to Recovery Options and restart from there. But what if you installed Linux on your Surface Go an you want to get Windows back?

Yes, you can meddle with BIOS an change boot order there. But there is an easier way – just use GRUB.

To enter GRUB on Surface Go, just press Escape multiple times while booting. Once there, press c to enter command mode. All magic will happen here.

First “magic” part will be finding USB drive. For that just write ls and you will be presented with a list. Depending how you had your drive setup, you might be able to recognize it. If you used MBR it will be something like (hd0,msdos1) and if you used GPT it will be slightly different (hd0,gpt1). Frankly, that’s the probably single biggest reason I use MBR for my recovery drives – since all else uses GPT, it makes it painfully obvious which drive is correct one.

With drive selected, we just need to “chainload” it:

set root=(hd0,msdos1)
chainloader /efi/Boot/bootx64.efi

And that’s it. You now booted of the Windows recovery USB without messing with boot order or secure boot settings at all.