Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 24.04 on WSL2 makes Windows 11 super slow #11522

Open
1 of 2 tasks
Eng-Fouad opened this issue Apr 26, 2024 · 47 comments
Open
1 of 2 tasks

Ubuntu 24.04 on WSL2 makes Windows 11 super slow #11522

Eng-Fouad opened this issue Apr 26, 2024 · 47 comments

Comments

@Eng-Fouad
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3527]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-2

Distro Version

Ubuntu 24.04 LTS

Other Software

No response

Repro Steps

Just install Ubuntu 24.04 from Microsoft Store.

Expected Behavior

It should work as with Ubuntu 22.04 LTS

Actual Behavior

Both Windows and Ubuntu become slow and you have to wait few seconds/minutes for actions to be completed.

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Eng-Fouad
Copy link
Author

Debugging logs:

Ubuntu 22.04 (The PC runs normally): WslLogs-2024-04-26_22-34-57.zip

Ubuntu 24.04 (The PC runs super slow): WslLogs-2024-04-26_22-36-30.zip

For both tests, I did the following:

  • Install Ubuntu from Microsoft Store.
  • Launch Ubuntu terminal.
  • Enter Username/password for the new user.
  • Ubuntu setup completes and it is up and running.
  • Close the Ubuntu terminal/
  • Uninstall Ubuntu from Windows settings.

The PC becomes really slow after launching Ubuntu 24.04 terminal. Even setting username/password of the new user took few minutes to complete.

Copy link

Diagnostic information
Multiple log files found

@rmanzman
Copy link

rmanzman commented Apr 27, 2024

I have absolutely the same problem. And I want to note that this problem appears both after updating from 22.04>23.10>24.04 and after clean installation of 24.04 from Microsoft Store.

I had to go back to 22.04 for now, it is more stable.

@elsaco
Copy link

elsaco commented Apr 28, 2024

This must be an issue with the store version of Ubuntu 24.04. If an image from https://cloud-images.ubuntu.com/wsl/releases/24.04/ is being used there are no system slowdowns.

rootfs used for testing: ubuntu-noble-wsl-amd64-24.04lts.rootfs.tar.gz

ubuntu@texas:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

@rmanzman
Copy link

rmanzman commented Apr 28, 2024

If an image from https://cloud-images.ubuntu.com/wsl/releases/24.04/ is being used there are no system slowdowns.

That doesn't help, unfortunately.
I tried to use: https://cloud-images.ubuntu.com/wsl/releases/24.04/current/ubuntu-noble-wsl-amd64-24.04lts.rootfs.tar.gz

  • Unpacked tar from gz
  • Typed in PowerShell:
    wsl --import Ubuntu-24.04 \path to folder where i want the distro to be installed\ \path to tar-file\
  • And launched distro with:
    wsl -d Ubuntu-24.04

Ubuntu starts, but still slows down the system.

BTW,
wsl --install Ubuntu-24.04 --web-download
have the same effect

@artyomboyko
Copy link

I have same problem. When I run WSL 2 Ubuntu 24.04 my Windows 11 Pro freezing!

@datnguyent93
Copy link

datnguyent93 commented May 7, 2024

sysinfo.txt
I did the same set up today and had to wait for 5 min for the PC to get back to normal operational speed

@felikcat
Copy link

felikcat commented May 11, 2024

wsl --unregister Ubuntu-24.04 can unfreeze Windows, but will remove all data inside of that distro. For me, the slowdown was permanent.

Here are the logs for me running across the same lockup/extreme slowdown problem:
WslLogs-2024-05-10_17-08-45.zip

@CarlosNihelton
Copy link
Contributor

Is the slow down only noticeable at installation/registration or at any time?
Have you tried disabling systemd or checking if there is a particular unit that's taking a lot of time and CPU?

@datnguyent93
Copy link

Is the slow down only noticeable at installation/registration or at any time?
Have you tried disabling systemd or checking if there is a particular unit that's taking a lot of time and CPU?

It happens during both installation and start up wsl.
Nothing significant showed in the task manager, hardware utilization is low and whole OS just feels unresponsive.

@artyomboyko
Copy link

The problem occurs right after installation during startup. When trying to open Task Manager or CMD, they freeze. I was unable to uninstall using wsl --unregister ubuntu-24.04... I had to reinstall Windows 11. For information, I have an Intel Core i7-12700 processor, Windows 11 Pro (licensed!).

@artyomboyko
Copy link

@rmanzman Your experiment suggests that the problem is clearly in the Ubuntu 24.04 image (whether we downloaded it or transferred it as a file). Thank you.

@magpte
Copy link

magpte commented May 13, 2024

Happens both on my laptop and desktop, AMD cpus

@artyomboyko
Copy link

@magpte If you can run CMD, unregister Ubuntu 24.04 by using the command wsl --unregister ubuntu-24.04.

@Supportic
Copy link

The problem occurs right after installation during startup. When trying to open Task Manager or CMD, they freeze. I was unable to uninstall using wsl --unregister ubuntu-24.04... I had to reinstall Windows 11. For information, I have an Intel Core i7-12700 processor, Windows 11 Pro (licensed!).

I am having the exact same issue. Booting up wsl with Ubuntu24.04 makes the windows 11 system unresponsive. Running a i7 14700k with latests win updates and WSL 2.2.4.0 . (installed via wsl --install Ubuntu-24.04 --web-download)

Switching back to Ubuntu22.04 solves the issue but that should not be the goal. The issue lies in the 24.04 image.

@HuanCheng65
Copy link

HuanCheng65 commented May 24, 2024

I met exactly the same problem.
I updated from 22.04 to 23.10 and then to 24.04, and just after the update and reboot I didn't meet any problems, but after I hibernate the computer and bring it back and then turn on wsl it makes the whole computer run very slow and there is no noticeable increase in cpu or memory usage etc.
I have an AMD Ryzen 5800H CPU and 40GB memory.

@conan
Copy link

conan commented Jun 3, 2024

I've had a similar problem and narrowed it down to systemd - could you try removing systemd=true from the [boot] section of /etc/wsl.conf and see if it makes a difference?

@Eng-Fouad
Copy link
Author

I've had a similar problem and narrowed it down to systemd - could you try removing systemd=true from the [boot] section of /etc/wsl.conf and see if it makes a difference?

Indeed. Changing systemd=true to systemd=false fixed the problem for me. It was fixed immediately after saving changes on the file /etc/wsl.conf, and I did not have to restart the system. Thanks for discovering the real cause.

@elsaco
Copy link

elsaco commented Jun 4, 2024

Could someone affected by the slowness run systemd-analyze blame and post the output? With Windows 11 and Ubuntu 24.04 can't repro.

System manager output on my setup:

ubuntu@eleven:~$ systemd-analyze blame
515ms landscape-client.service
492ms cloud-init-local.service
368ms cloud-init.service
327ms cloud-config.service
288ms cloud-final.service
214ms snapd.seeded.service
199ms [email protected]
174ms dev-sdc.device
174ms dpkg-db-backup.service
160ms snapd.service
157ms systemd-resolved.service
147ms logrotate.service
142ms e2scrub_reap.service
121ms wsl-pro.service
104ms rsyslog.service
 78ms systemd-logind.service
 61ms systemd-timesyncd.service
 45ms systemd-udevd.service
 45ms dbus.service
 38ms wsl-binfmt.service
 37ms systemd-udev-trigger.service
 33ms dev-hugepages.mount
 32ms dev-mqueue.mount
 32ms sys-kernel-debug.mount
 30ms sys-kernel-tracing.mount
 27ms keyboard-setup.service
 26ms modprobe@dm_mod.service
 26ms [email protected]
 26ms [email protected]
 24ms systemd-journal-flush.service
 21ms systemd-tmpfiles-setup.service
 19ms systemd-journald.service
 19ms modprobe@efi_pstore.service
 19ms [email protected]
 19ms [email protected]
 17ms systemd-remount-fs.service
 17ms sys-fs-fuse-connections.mount
 15ms systemd-sysctl.service
 14ms systemd-modules-load.service
 14ms systemd-tmpfiles-setup-dev.service
 14ms systemd-tmpfiles-setup-dev-early.service
 13ms console-setup.service
 10ms snapd.socket
  7ms [email protected]
  7ms systemd-update-utmp.service
  6ms systemd-update-utmp-runlevel.service
  5ms e2scrub_all.service
  4ms setvtrgb.service
  3ms systemd-user-sessions.service

and host info:

ubuntu@eleven:~$ hostnamectl
 Static hostname: eleven
       Icon name: computer-container
         Chassis: container
      Machine ID: 282597efbd0e4878bf930f6eaf3d80c3
         Boot ID: 7efd8011bea041e387ce822aa10b8cd2
  Virtualization: wsl
Operating System: Ubuntu 24.04 LTS
          Kernel: Linux 5.15.153.1-microsoft-standard-WSL2
    Architecture: x86-64

@Eng-Fouad
Copy link
Author

Eng-Fouad commented Jun 4, 2024

Could someone affected by the slowness run systemd-analyze blame and post the output? With Windows 11 and Ubuntu 24.04 can't repro.

27.363s cloud-init-local.service
25.897s wsl-pro.service
  225ms landscape-client.service
  176ms cloud-init.service
  173ms cloud-config.service
  158ms cloud-final.service
   96ms snapd.seeded.service
   93ms dev-sdc.device
   77ms systemd-logind.service
   64ms snapd.service
   57ms systemd-resolved.service
   37ms systemd-timesyncd.service
   35ms systemd-udevd.service
   34ms rsyslog.service
   30ms systemd-udev-trigger.service
   26ms systemd-journald.service
   19ms keyboard-setup.service
   18ms [email protected]
   16ms dbus.service
   15ms sys-kernel-debug.mount
   15ms [email protected]
   15ms dev-mqueue.mount
   15ms dev-hugepages.mount
   14ms systemd-modules-load.service
   14ms sys-kernel-tracing.mount
   14ms [email protected]
   14ms modprobe@dm_mod.service
   14ms [email protected]
   13ms systemd-remount-fs.service
   13ms e2scrub_reap.service
   13ms systemd-journal-flush.service
   13ms modprobe@efi_pstore.service
   12ms systemd-tmpfiles-setup-dev-early.service
   10ms systemd-update-utmp.service
    9ms systemd-tmpfiles-setup.service
    5ms systemd-sysctl.service
    4ms sys-fs-fuse-connections.mount
    3ms systemd-tmpfiles-setup-dev.service
    3ms systemd-user-sessions.service
    2ms setvtrgb.service
    2ms console-setup.service
    2ms wsl-binfmt.service
    1ms systemd-update-utmp-runlevel.service
    1ms snapd.socket

Also, sudo systemd-analyze returns:

Startup finished in 54.962s (userspace)
graphical.target reached after 54.796s in userspace.

@Eng-Fouad
Copy link
Author

More debugging:

fouad@FOUAD-PC:~$ sudo journalctl -u wsl-pro -f
Jun 05 01:09:56 FOUAD-PC wsl-pro-service[349]: INFO Daemon: connecting to Windows Agent
Jun 05 01:09:56 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Connecting"
Jun 05 01:09:56 FOUAD-PC wsl-pro-service[349]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/fouad/.ubuntupro/.address": open /mnt/c/Users/fouad/.ubuntupro/.address: no such file or directory
Jun 05 01:09:56 FOUAD-PC wsl-pro-service[349]: INFO Reconnecting to Windows host in 4 seconds
Jun 05 01:09:56 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jun 05 01:10:00 FOUAD-PC wsl-pro-service[349]: INFO Daemon: connecting to Windows Agent
Jun 05 01:10:00 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Connecting"
Jun 05 01:10:00 FOUAD-PC wsl-pro-service[349]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/fouad/.ubuntupro/.address": open /mnt/c/Users/fouad/.ubuntupro/.address: no such file or directory
Jun 05 01:10:00 FOUAD-PC wsl-pro-service[349]: INFO Reconnecting to Windows host in 8 seconds
Jun 05 01:10:00 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jun 05 01:10:08 FOUAD-PC wsl-pro-service[349]: INFO Daemon: connecting to Windows Agent
Jun 05 01:10:08 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Connecting"
Jun 05 01:10:08 FOUAD-PC wsl-pro-service[349]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/fouad/.ubuntupro/.address": open /mnt/c/Users/fouad/.ubuntupro/.address: no such file or directory
Jun 05 01:10:08 FOUAD-PC wsl-pro-service[349]: INFO Reconnecting to Windows host in 16 seconds
Jun 05 01:10:08 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jun 05 01:10:26 FOUAD-PC wsl-pro-service[349]: INFO Daemon: connecting to Windows Agent
Jun 05 01:10:26 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Connecting"
Jun 05 01:10:26 FOUAD-PC wsl-pro-service[349]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/fouad/.ubuntupro/.address": open /mnt/c/Users/fouad/.ubuntupro/.address: no such file or directory
Jun 05 01:10:26 FOUAD-PC wsl-pro-service[349]: INFO Reconnecting to Windows host in 32 seconds
Jun 05 01:10:26 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jun 05 01:10:59 FOUAD-PC wsl-pro-service[349]: INFO Daemon: connecting to Windows Agent
Jun 05 01:10:59 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Connecting"
Jun 05 01:10:59 FOUAD-PC wsl-pro-service[349]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/fouad/.ubuntupro/.address": open /mnt/c/Users/fouad/.ubuntupro/.address: no such file or directory
Jun 05 01:10:59 FOUAD-PC wsl-pro-service[349]: INFO Reconnecting to Windows host in 60 seconds
Jun 05 01:10:59 FOUAD-PC wsl-pro-service[349]: DEBUG Updated systemd status to "Not connected: waiting to retry"

@Eng-Fouad
Copy link
Author

Preventing wsl-pro and cloud-init-local from running seems it resolves the issue for me:

sudo systemctl mask wsl-pro
sudo systemctl mask cloud-init-local

@Eng-Fouad
Copy link
Author

Eng-Fouad commented Jun 4, 2024

Well well, I think I found the root cause for this issue. It is Kaspersky's fault. Once I shutdown "Kaspersky Premium", everything works smoothly (with enabling wsl-pro and cloud-init-local).

Does anybody know how to configure Kaspersky to prevent this issue?

Edit: If we disable "System Watcher", the issue disappears. Not a perfect solution though. I will stick with disabling wsl-pro and cloud-init-local.

@rmanzman
Copy link

rmanzman commented Jun 5, 2024

I'm using Kaspersky Small Office Security.

Debugging with System Watcher enabled:

27.394s cloud-init-local.service
27.181s wsl-pro.service
  311ms landscape-client.service
  249ms cloud-init.service
  242ms cloud-config.service
  216ms cloud-final.service
  134ms dev-sdc.device
  119ms snapd.seeded.service
   77ms snapd.service
   59ms rsyslog.service
   59ms systemd-resolved.service
   48ms systemd-udevd.service
   45ms systemd-udev-trigger.service
   41ms systemd-tmpfiles-setup.service
   40ms systemd-journald.service
   39ms systemd-timesyncd.service
   36ms systemd-logind.service
   35ms keyboard-setup.service
   20ms systemd-journal-flush.service
   18ms e2scrub_reap.service
   14ms dev-hugepages.mount
   14ms dev-mqueue.mount
   14ms dbus.service
   14ms sys-kernel-debug.mount
   14ms sys-kernel-tracing.mount
   12ms [email protected]
   12ms modprobe@dm_mod.service
   12ms [email protected]
   12ms modprobe@efi_pstore.service
   12ms [email protected]
   12ms systemd-tmpfiles-setup-dev-early.service
   12ms [email protected]
    9ms systemd-modules-load.service
    9ms systemd-remount-fs.service
    7ms systemd-sysctl.service
    6ms systemd-update-utmp.service
    5ms systemd-tmpfiles-setup-dev.service
    4ms systemd-update-utmp-runlevel.service
    4ms console-setup.service
    4ms sys-fs-fuse-connections.mount
    3ms systemd-user-sessions.service
    3ms wsl-binfmt.service
    2ms setvtrgb.service
    1ms snapd.socket

Startup finished in 55.211s (userspace)
graphical.target reached after 54.993s in userspace.

Debugging with System Watcher disabled:

439ms cloud-init-local.service
399ms landscape-client.service
263ms cloud-init.service
255ms cloud-config.service
233ms cloud-final.service
136ms dev-sdc.device
126ms snapd.seeded.service
 95ms wsl-pro.service
 81ms snapd.service
 70ms systemd-resolved.service
 68ms systemd-logind.service
 66ms rsyslog.service
 60ms [email protected]
 51ms systemd-udev-trigger.service
 48ms systemd-udevd.service
 44ms systemd-timesyncd.service
 39ms systemd-tmpfiles-setup.service
 37ms systemd-journald.service
 36ms keyboard-setup.service
 25ms e2scrub_reap.service
 22ms systemd-journal-flush.service
 15ms dbus.service
 14ms dev-hugepages.mount
 14ms dev-mqueue.mount
 13ms sys-kernel-debug.mount
 13ms sys-kernel-tracing.mount
 12ms systemd-tmpfiles-setup-dev-early.service
 12ms [email protected]
 12ms modprobe@dm_mod.service
 11ms [email protected]
 11ms modprobe@efi_pstore.service
 11ms [email protected]
 11ms [email protected]
  9ms systemd-modules-load.service
  8ms systemd-remount-fs.service
  7ms systemd-update-utmp.service
  6ms systemd-sysctl.service
  5ms [email protected]
  4ms systemd-user-sessions.service
  4ms systemd-tmpfiles-setup-dev.service
  4ms console-setup.service
  4ms systemd-update-utmp-runlevel.service
  3ms sys-fs-fuse-connections.mount
  3ms wsl-binfmt.service
  3ms setvtrgb.service
  1ms snapd.socket

Startup finished in 1.498s (userspace)
graphical.target reached after 1.262s in userspace.

@rmanzman
Copy link

rmanzman commented Jun 6, 2024

I've got a feedback from the kaspersky support:

"Kaspersky for Windows": https://support.kaspersky.com/kaspersky-for-windows/21.17/43520
"Kaspersky Small Office Security": https://support.kaspersky.com/KSOS/8.17/en-US/43520.htm

  • Microsoft Windows 11 Home (21H2, 22H2, 23H2)
  • Microsoft Windows 11 Enterprise (21H2, 22H2, 23H2)
  • Microsoft Windows 11 Pro (21H2, 22H2, 23H2)
  • Microsoft Windows 10 Home (versions: 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2)
  • Microsoft Windows 10 Enterprise (versions: 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2)
  • Microsoft Windows 10 Pro (versions: 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2)

Restrictions: Windows Subsystem for Linux 2 (WSL2) is not supported.

@Supportic
Copy link

I've got a feedback from the kaspersky support:

"Kaspersky for Windows": https://support.kaspersky.com/kaspersky-for-windows/21.17/43520 "Kaspersky Small Office Security": https://support.kaspersky.com/KSOS/8.17/en-US/43520.htm

  • Microsoft Windows 11 Home (21H2, 22H2, 23H2)
  • Microsoft Windows 11 Enterprise (21H2, 22H2, 23H2)
  • Microsoft Windows 11 Pro (21H2, 22H2, 23H2)
  • Microsoft Windows 10 Home (versions: 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2)
  • Microsoft Windows 10 Enterprise (versions: 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2)
  • Microsoft Windows 10 Pro (versions: 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2)

Restrictions: Windows Subsystem for Linux 2 (WSL2) is not supported.

If it's not supported, their task would be not to interfere with any related WSL2 process so I can use WSL2 without Kaspersky.

@rmanzman
Copy link

Received a feedback from Kaspersky Lab Support:

Dear user, the issue will be fixed in version (21.19). The new version is expected to be released in about 4 months.

@privacyguy123
Copy link

So this is now a Kaspersky problem and not a WSL2 with Ubuntu 24.04 problem? Am I misunderstanding something here?

@andylamp
Copy link

andylamp commented Jul 29, 2024

I am facing the same issue, it is really dreadful - though in the particular PC that this is encountered I have ESET installed rather than Kaspersky.

Disabling it seems to not really work but the issue is exacerbated when resuming from sleep. The log output for the wsl-pro service when using sudo journalctl -u wsl-pro -f command is as follows,

Jul 29 10:07:51 TR wsl-pro-service[219]: INFO Daemon: connecting to Windows Agent
Jul 29 10:07:51 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Connecting"
Jul 29 10:07:51 TR wsl-pro-service[219]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/andylamp/.ubuntupro/.address": open /mnt/c/Users/andylamp/.ubuntupro/.address: no such file or directory
Jul 29 10:07:51 TR wsl-pro-service[219]: INFO Reconnecting to Windows host in 2 seconds
Jul 29 10:07:51 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jul 29 10:07:53 TR wsl-pro-service[219]: INFO Daemon: connecting to Windows Agent
Jul 29 10:07:53 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Connecting"
Jul 29 10:07:53 TR wsl-pro-service[219]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/andylamp/.ubuntupro/.address": open /mnt/c/Users/andylamp/.ubuntupro/.address: no such file or directory
Jul 29 10:07:53 TR wsl-pro-service[219]: INFO Reconnecting to Windows host in 4 seconds
Jul 29 10:07:53 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jul 29 10:07:57 TR wsl-pro-service[219]: INFO Daemon: connecting to Windows Agent
Jul 29 10:07:57 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Connecting"
Jul 29 10:07:57 TR wsl-pro-service[219]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/andylamp/.ubuntupro/.address": open /mnt/c/Users/andylamp/.ubuntupro/.address: no such file or directory
Jul 29 10:07:57 TR wsl-pro-service[219]: INFO Reconnecting to Windows host in 8 seconds
Jul 29 10:07:57 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jul 29 10:08:05 TR wsl-pro-service[219]: INFO Daemon: connecting to Windows Agent
Jul 29 10:08:05 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Connecting"
Jul 29 10:08:05 TR wsl-pro-service[219]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/andylamp/.ubuntupro/.address": open /mnt/c/Users/andylamp/.ubuntupro/.address: no such file or directory
Jul 29 10:08:05 TR wsl-pro-service[219]: INFO Reconnecting to Windows host in 16 seconds
Jul 29 10:08:05 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jul 29 10:08:21 TR wsl-pro-service[219]: INFO Daemon: connecting to Windows Agent
Jul 29 10:08:21 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Connecting"
Jul 29 10:08:21 TR wsl-pro-service[219]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/andylamp/.ubuntupro/.address": open /mnt/c/Users/andylamp/.ubuntupro/.address: no such file or directory
Jul 29 10:08:21 TR wsl-pro-service[219]: INFO Reconnecting to Windows host in 32 seconds
Jul 29 10:08:21 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jul 29 10:08:54 TR wsl-pro-service[219]: INFO Daemon: connecting to Windows Agent
Jul 29 10:08:54 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Connecting"
Jul 29 10:08:54 TR wsl-pro-service[219]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/andylamp/.ubuntupro/.address": open /mnt/c/Users/andylamp/.ubuntupro/.address: no such file or directory
Jul 29 10:08:54 TR wsl-pro-service[219]: INFO Reconnecting to Windows host in 60 seconds
Jul 29 10:08:54 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Not connected: waiting to retry"
Jul 29 10:09:55 TR wsl-pro-service[219]: INFO Daemon: connecting to Windows Agent
Jul 29 10:09:55 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Connecting"
Jul 29 10:09:55 TR wsl-pro-service[219]: WARNING Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/andylamp/.ubuntupro/.address": open /mnt/c/Users/andylamp/.ubuntupro/.address: no such file or directory
Jul 29 10:09:55 TR wsl-pro-service[219]: INFO Reconnecting to Windows host in 60 seconds
Jul 29 10:09:55 TR wsl-pro-service[219]: DEBUG Updated systemd status to "Not connected: waiting to retry"

Masking the services as indicated above, again does not work... Geneally speaking system snappyness is severely affected overal - this has to be a bug of some sorts.

edit: removing Ubuntu 24.04 distribution fixes the slugginess - Ubuntu 22.04 works as expected... this is a MAJOR pain....

@AntiO2
Copy link

AntiO2 commented Jul 29, 2024

Same Issue. I have a computer with a commercial version of Kaspersky installed, and it got stuck when booting Ubuntu 24.04 LTS using WSL2. Switching to Ubuntu 22.04 worked for me

@andylamp
Copy link

andylamp commented Aug 1, 2024

The issue still persists for me... even with the latest updates.

@kien-truong
Copy link

Adding these files to Kaspersky exclusion helps me a lot.

C:\Windows\System32\wsl.exe
C:\Program Files\WSL\wsl.exe
C:\Program Files\WSL\wslhost.exe

It still slows down a bit during start up compared to no Kaspersky, but at least the system is not complete unusable like before. Advice from Kaspersky forum:

https://forum.kaspersky.com/topic/kis-temporarly-hangs-the-entire-os-for-10~15-minutes-when-using-intellij-with-wsl2-38375/

@mxkpp
Copy link

mxkpp commented Oct 21, 2024

Has this been resolved? Ubuntu 24.04.1 LTS was released Aug 29 2024, two weeks after the most recent comment here, in case that has any bearing.

@artyomboyko
Copy link

@mxkpp Good day. I tried it again a couple weeks ago. It seems to have solved the problem. I am now using Ubuntu 24.04 on Windows 11 Pro (WSL2) and everything works. I have an Intel CPU (just in case there is a difference for AMD).

@mrjbom
Copy link

mrjbom commented Oct 21, 2024

@mxkpp, In my case, disabling the antivirus helped

@artyomboyko
Copy link

I use Kaspersky antivirus (last version). Everything works fine without any additional antivirus manipulation.

@mrjbom
Copy link

mrjbom commented Oct 21, 2024

@artyomboyko, I use kaspersky too. Disabling it solved the problem. Other people have also complained about it.

@artyomboyko
Copy link

@mrjbom Really? That's weird. It's working for me without any modifications.

Image

@kien-truong
Copy link

It worked without disabling Kaspersky too, the problem was some operations became very slow, especially during the initial startup of WSL 2.

Now, if it isn't slowing down for you now, then great. But my permanent solution is to delete Kaspersky from my computer, not worth the headache.

@mrjbom
Copy link

mrjbom commented Oct 22, 2024

@artyomboyko In my case, I tried reinstalling WSL and Hyper-V, tried running WSL without Hyper-V, tried installing the latest version of WSL, tried different versions of Ubuntu, but only disabling Kaspersky helped.

@andylamp
Copy link

I have not tried it, had a very bad experience last time and lost quite a bit of time setting up the distribution then having to remove it. I'll wait a bit until there is enough feedback that this works and try again aftwards.

@rmanzman
Copy link

It seems to have been fixed.
I've got 24H2 update for W11 yesterday, maybe that did the trick, idk.
Using K.Premium without disabling.

@Q0011er
Copy link

Q0011er commented Oct 25, 2024

Kaspersky Internet Security v 21.3.10.391 (m)
Windows 10 22H2 19045.4894

Today (25/10/2024) update my wsl ubuntu to 22.04.5 LTS from microsoft store.
Recive the same problem - lagging windows 10. Previos ubuntu worked fine.
Turning kaspersky off help me too. I'm shoked. Kaspersky WTF!!!

UPDATE: migration to kasperskiy standart solved my problem

@byroniac
Copy link

Hey, this is way out of my knowledge base, but could any of this be related to this? My WSL Ubuntu kernel is cgroupv1. It is maddening because both "systemd-analyze blame" and "systemd-analyze critical-chain" START at 30s elapsed, and I cannot help but wonder if this is why? I am not an expert, so could any expert take a look? systemd/systemd#32998

@byroniac
Copy link

byroniac commented Nov 13, 2024

Well, I used this trick mentioned over here, and it removes the 30s delay but now I have trouble running snaps and flatpaks in WSL.

https://github.com/spurin/wsl-cgroupsv2?tab=readme-ov-file#configure-wsl-to-use-cgroupsv2

.wslconfig:
[wsl2]
kernelCommandLine = cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1

@yemisie
Copy link

yemisie commented Dec 18, 2024

While the Ubuntu 24 lts is a very stable OS. its WSL version is a bit buggy with high slowness. this behavior is not so stable. meaning sometimes everything runs smoothly. and sometimes it act very crazy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests