READ FIRST: Installing kubuntu-desktop on WSL2

October 12, 2024 0 By addshore

This post is meant as a warning, DONT DO IT, without some research first.

But if you end up here, you have likely already made the mistake ;)

It in this case is, “this” is…

sudo apt install kubuntu-desktop

Before you attempt this, do some reasearch, head the warning, and be casefull (maybe even backup your disk so you can undo the mess if you make it ;).

If you have already done this and partially bricked your Ubuntu installation, don’t worry, you can fix it!

Symptoms

  • apt, dpkg, service commands and more basically unresponsive and hanging
  • Extremely slow boot times
  • System never seems to entirely boot correctly
  • sudo su etc might also not work

Reading

Ultimately, these 2 posts helped me unbrick my system

You’ll find that these issues also highlight possible ways of continuing past the issue and managing to install the package (though I decided to not try this tonight).

Fix summary

I had to wsl --shutdown my system.

From Windows switch the boot user to root right away as sudo seemingly was failing.

ubuntu config --default-user rootCode language: JavaScript (javascript)

Boot Ubuntu again…

Try to remove the package, which spent 30 seconds reaching 2%, then jumped to 41% a few minutes later, and maybe 5 minutes later again finally completed.

apt remove --purge acpi-support

You might find that deleting this file will speed things up?

rm -rf /etc/acpi/events

Once the remove command has completed, you can likely --shutdown again, switch your user back, and then boot up mostly normally :)

My journey

While at OggCamp 2024 I decided to give installing kubuntu-desktop a go on my WSL2 install.

During the install, I noticed various packages hang while trying to install.

These were…

  • acpi-support
  • whoopsie
  • secureboot-db
  • geoclue-2.0

Things hung, and everything was feeling a bit off

I cancelled the install, went to uninstall everything, but everything was hanging and not uninstalling.

I tried rebooting, and Ubuntu seemed to take an age to come up, and once it did, nothing was behaving properly.

I looked in dmesg, but nothing was particularly notable. I tried deleting packages one by one, but that was also basically locked up. After some hours of debugging and looking around, I eventually stumbled onto the GitHub links above and found how to get myself out of my pickle.

(Very glad that I didn’t have to reinstall)

apt remove --purge acpi-support
rm -rf /etc/acpi/events

Rebooted, and tada, yay!