alistairphillips.com

I’m : a web and mobile developer based in the Manning Valley, Australia.


Link Dump
Links for 20 June 2022
Links for 12 April 2022
Links for 31 March 2022

It seems that the last time I listed links was back in 2013, so it's time to resurrect this. At least this way I can manage to keep my Instapaper list manageable.

TIL about git switch.🤯

Ever did a bunch of changes in a codebase, only to realize that you're working on master?

git switch -c <new_branch>

Creates a new branch and brings you local changes over.

WSL2 and WSLg preventing Windows 11 from sleeping

I recently experienced an issue where a freshly installed Windows 11 system was not going to sleep. It was a very similar set up in terms of software to my previous Windows 10 machine which did not seem to have any issues.

Searching online I found https://thegeekpage.com/fix-windows-10-sleep-mode-not-working-solved/ which led me to the extremely useful powercfg -requests command. Using this I noticed a WSL entry for msrdc.exe. I guessed that this must have had something to do with Microsoft Remote Desktop connection - but from Linux.

Armed with this I was able to find https://github.com/microsoft/wslg/issues/380 whose title of "Displays do not go to sleep when WSLg is enabled" summed up my problem.

As I did not need WSLg support in WSL2 I followed https://github.com/microsoft/wslg/issues/380#issuecomment-939187821 to disabled it. A reboot later and all sleep issues were resolved. Hopefully the original issue is resolved before I would like to use GUI applications in WSL2.