ubuntu-wsl2-systemd-script icon indicating copy to clipboard operation
ubuntu-wsl2-systemd-script copied to clipboard

Is there a way to undo this?

Open abalter opened this issue 3 years ago • 2 comments

I don't need systemd to run anymore, and I'm occasionally running into problems at boot. How do I undo the changes this script makes?

abalter avatar Oct 04 '22 17:10 abalter

I updated wslg on latest (!!!) Windows 11 with the new systemd support (check first!):

In Powershell !

wsl --shutdown
wsl --update

# there should be a message, that an update occured, if not you are on the old version
# Check:
wsl --version
WSL-Version: 0.70.0.0
Kernelversion: 5.15.68.1
WSLg-Version: 1.0.45
MSRDC-Version: 1.2.3575
Direct3D-Version: 1.606.4
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.22621.674

I used the uninstall script.

In Ubuntu ! See: https://github.com/DamionGans/ubuntu-wsl2-systemd-script/pull/43

Then in Powershell ! wsl --shutdown

After that I had to enable systemd in wsl.conf::

In Ubuntu !

sudo -e /etc/wsl.conf
[boot]
systemd=true

In Powershell ! wsl --shutdown Systemd than run for 100% CPU, which I could fix with systemd running with 100% and does not respond : https://github.com/microsoft/WSL/issues/8867

In Ubuntu !
sudo ln -s /dev/null /etc/systemd/system/acpid.service
sudo ln -s /dev/null /etc/systemd/system/acpid.path

In Powershell ! wsl --shutdown

apos avatar Oct 14 '22 09:10 apos

Run this script to uninstall

https://raw.githubusercontent.com/DamionGans/ubuntu-wsl2-systemd-script/dee9b7f604d7a4f4f0294a8dbb9b942fe0aedda9/uninst_00.sh

totszwai avatar Jan 28 '23 02:01 totszwai