Trackpad Disabled After Sleep/Suspend Following Upgrade to Ubuntu 20.04

Photo by Andrea Piacquadio from Pexels

As you may have guessed by my previous article, I recently upgraded to Ubuntu 20.04. Since the upgrade, I’ve had an issue where my laptop’s trackpad is disabled until I reboot–which is very annoying.

Today I set out to tackle the problem and found that this has been a recurring problem since at least 16.04, and it actually seems more surprising that I haven’t seen the issue until now! Luckily, there’s an easy solution.

I’m using a T440s, and this article about fixing the trackpad on a T450s was perfect. In this article, I’ll walk through my steps for confirming and fixing the issue.

First, I wanted to assert that I could reproduce the problem by performing the following steps:

  1. Reboot
  2. Confirm trackpad works
  3. Close laptop lid
  4. Open laptop lid
  5. Confirm trackpad is no longer working

Next, per the referenced article, I ran the following two commands to verify that they would re-enable a disabled trackpad:

$ sudo modprobe -r psmouse
$ sudo modprobe psmouse

Yay it worked! So, now I could put the permanent solution into place. I modified /etc/default/grub so that the GRUB_CMDLINE_LINUX_DEFAULT property included psmouse.synaptics_intertouch=0, then ran update-grub. These two tasks can be accomplished by running the following:

$ sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 psmouse.synaptics_intertouch=0"/g' /etc/default/grub
$ sudo update-grub

That’s it! I rebooted, repeated my repro steps, and confirmed that the trackpad was no longer disabled. Wonderful!

Custom Background in Microsoft Teams

Microsoft Teams has had the ability to blur your background for a while, but they just expanded this to allow the use of a background image instead of just the blur effect. Out of the box, you’re only allowed to choose from a selection of Microsoft-provided images, but support for custom images is there–you just have to know where to drop your images.

So, here it is. Copy your images to the following directory, and they’ll show up in Microsoft Teams when you enable background effects:

%APPDATA%\Microsoft\Teams\Backgrounds\Uploads

If the Backgrounds\Uploads path doesn’t exist on your computer, it might be because you haven’t used the background effects feature yet. Turn on your camera, pick a background image, and the folder should get created. Or just go create it yourself.

Microsoft’s images use 1920×1080, so I recommend following suit for best results.

Upgrade to Ubuntu 20.04

Image by rockiger from Pixabay

The newest LTS version of Ubuntu is scheduled to release on April 23. Once it’s released, upgrading is as easy as running a few commands. In this article, we’ll walk through the process of updating the current system and then performing the upgrade.

Before you upgrade, make sure your system is as up to date as possible. Do this by running the follwing commands:

sudo apt update 
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove

Now that you’ve confirmed you’re up to date, it’s time to do the upgrade.

sudo apt install update-manager-core
sudo do-release-upgrade

If you receive a No new release found message, it means the upgrade hasn’t been made available to you. It’s been noted that the upgrade path from 19.10 will not be enabled until a few days after release, and the upgrade from 18.04 LTS will not be enabled until a few days after the 20.04.1 release expected in late July. However, you can force the upgrade at your own risk by using the -d flag.

sudo do-release-upgrade -d

Change Default Application For File Type Via Command Line

While I was setting up Windows Terminal, I found that trying to modify settings would open a new instance of Visual Studio since that was my system’s default application for .json files. That’s a pretty heavy choice for what amounts to a text editor, so I thought I’d change my default app to Visual Studio Code. Should be easy, right?

The usual way to do this is through Windows Settings:

Settings > Default Apps > Choose default apps by file type

The problem is, when I did that, Visual Studio Code wasn’t an option!

That’s okay, though. We can change the default app through the command prompt. Open a command prompt in Windows Terminal (note: Command Prompt, not PowerShell) and run the following:

assoc .json=jsonfile
ftype jsonfile="%AppData%\Local\Programs\Microsoft VS Code\Code.exe" "%1" %*

Solution credit, here.

Windows Terminal, For a Handsome Command Line Experience

A co-worker was giving a demo a few weeks back, and my key takeaway wasn’t what it should’ve been. I left with, “Why did their command prompt look so much better than mine!?”

Now, I’ve admittedly done zero customization with my command prompt. I’ve been using the plain blue default PowerShell prompt for as long as I can remember. I learned they were using the new Windows Terminal. I invested a little time in setting it up & customizing, and I feel super cool now.

Scott Hanselman has a great article on how to get it & make it look good, and that’s a great place to start.

My journey deviates from his a little, though, for unrelated reasons. First, my Windows Store doesn’t load. Not a problem, though, since you can also install it using Chocolatey.

$ choco install microsoft-windows-terminal 

You can follow Hanselman’s steps for installing posh-git:

$ Install-Module posh-git -Scope CurrentUser
$ Install-Module oh-my-posh -Scope CurrentUser

And for updating your profile (run notepad $PROFILE) to include the following. Note that I prefer the Sorin theme for Oh My Posh:

Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Sorin

I also installed his suggested font, Cascadia Code PL, which can be obtained here.

My last step was to make a few more customizations via Windows Terminal’s profile settings (ctrl+, from Windows Terminal). I adjusted the color scheme, font size, and starting directory by adding the following:

"profiles":
{
    "defaults":
    {
        // Put settings here that you want to apply to all profiles
        "colorScheme": "One Half Dark",
        "fontFace":  "Cascadia Code PL",
        "fontSize": 10,
        "startingDirectory": "c:/source"
    },

Multiple Chat Windows in Teams (Workaround)

My company recently made the full switch from Skype for Business to Microsoft Teams. For calls, it’s fine and mostly feels the same if not better since I prefer the aesthetic of Teams. The one thing that drives me insane about Teams is that I can’t have more than one chat window.

This is particularly irksome when I’m on a call where somebody’s screensharing, and I want to have a side-chat or ask/answer a question from somebody outside the call. As soon as you open another chat, the screenshare is reduced to an unusably-small size, and switching back makes the other chat go away. There’s a similar problem with managing multiple conversations or team chats at the same time.

Here’s an easy workaround: use the Teams web client. Just login at teams.microsoft.com, and you can have as many windows as you want. This works pretty well for side-chats on a conference call, for example if you want to have a parallel internal conversation while speaking to a client or customer. If you have frequent contacts, you can even create bookmarks to specific conversations.

Use bookmarks for conversations or contacts you access frequently

Featured image photo by 🇨🇭 Claudio Schwarz | @purzlbaum on Unsplash

Tech For Kids: Mighty Music Player

Source

I don’t remember how old I was when I got my first Walkman, but I remember everything about it. I got it along with three cassette tapes: Beach Boys – Endless Summer, Heavy D & The Boyz – Now That We Found Love (single), and C+C Music Factory – Things That Make You Go Hmm (single). What a great collection.

My kids are getting old enough that I want to give them the same gift of music and control over what they listen to, but I wasn’t sure how to do it in the age of no-physical-media without also giving them access to all kinds of music that might not be appropriate for kids. (In other words, I didn’t want to given them access to all of Spotify.) However, it also feels silly to invest in something like a CD player and all the things needed to provide music on CDs.

The Mighty music player is exactly what I was looking for. It lets me select which playlists to sync to the device, and play all the songs offline. So I’m able to put music from Frozen 2, Tangled, The Descendants, and Weezer (my daughter’s favorite) all on the device, and she has all the freedom to play her own music. She uses it all the time.

You use the Mighty app to sync to your Amazon Music or Spotify account (subscriptions required) and choose which playlists to transfer. The device is then connected to your phone via Bluetooth to transfer data. The experience of syncing music wasn’t great. It would hang or stall a lot, and I needed to restart it. But once I got it set up, it was exactly what I wanted.

Once synced, the songs are good for offline play for a month at which point you need to re-sync the device. I’ve only done this once so far, and the experience was similar to that first sync. It stalled once, and I needed to restart, but once it was done we were back to good.

Despite the sync problems and frustrations I’ve had with the app, the device itself is really awesome. It holds something like 1000 songs, and having all of Spotify’s library to choose from is pretty incredible. My daughter loves it!