microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.55k stars 823 forks source link

WSL sometimes gives dconf error when it boots after Windows boot #10947

Open maicol07 opened 11 months ago

maicol07 commented 11 months ago

Windows Version

Microsoft Windows [Version 10.0.23606.1000]

WSL Version

2.0.15.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Boot Windows and open WSL (or a graphical app with WSLg)

Expected Behavior

No errors

Actual Behavior

Gives dconf errors in the shell:

(process:1209): dconf-WARNING **: 11:05:45.029: failed to commit changes to dconf: Could not connect: No such file or directory

(process:1212): dconf-WARNING **: 11:05:45.031: failed to commit changes to dconf: Could not connect: No such file or directory
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

(process:1304): dconf-WARNING **: 11:05:46.140: failed to commit changes to dconf: Could not connect: No such file or directory

(process:1307): dconf-WARNING **: 11:05:46.141: failed to commit changes to dconf: Could not connect: No such file or directory

(process:1310): dconf-WARNING **: 11:05:46.143: failed to commit changes to dconf: Could not connect: No such file or directory

After running a command:

(process:1733): dconf-CRITICAL **: 11:06:24.137: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1733): dconf-CRITICAL **: 11:06:24.137: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1733): dconf-CRITICAL **: 11:06:24.138: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1733): dconf-CRITICAL **: 11:06:24.138: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1733): dconf-WARNING **: 11:06:24.138: failed to commit changes to dconf: Could not connect: No such file or directory

(process:1737): dconf-CRITICAL **: 11:06:24.139: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1737): dconf-CRITICAL **: 11:06:24.139: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1737): dconf-CRITICAL **: 11:06:24.139: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1737): dconf-CRITICAL **: 11:06:24.139: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1737): dconf-WARNING **: 11:06:24.139: failed to commit changes to dconf: Could not connect: No such file or directory

(process:1740): dconf-CRITICAL **: 11:06:24.140: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1740): dconf-CRITICAL **: 11:06:24.141: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1740): dconf-CRITICAL **: 11:06:24.141: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1740): dconf-CRITICAL **: 11:06:24.141: unable to create directory '/run/user/1000/dconf': Permission denied.  dconf will not work properly.

(process:1740): dconf-WARNING **: 11:06:24.141: failed to commit changes to dconf: Could not connect: No such file or directory

Also WSLg apps are glitched

Diagnostic Logs

WslLogs-2023-12-29_10-25-48.zip

github-actions[bot] commented 11 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

Closed similar issues:

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

OneBlue commented 11 months ago

Thank you @maicol07. Do you have systemd enabled in your distro ?

maicol07 commented 11 months ago

Thank you @maicol07. Do you have systemd enabled in your distro ?

Yes

OneBlue commented 11 months ago

Do you still see those errors with systemd disabled ?

maicol07 commented 11 months ago

I'll let you know in some days

maicol07 commented 11 months ago

@OneBlue so it seems I don't get the error anymore but WSLg apps can't start (i.e. xclock), which might be related to the dbus and glitching issue from the OP.

koppor commented 10 months ago

I do have systemd enabled and I see the same issue, too. (Currently, I don't know how to disable systemd).

My application is an alpha version of GitButler.

maicol07 commented 10 months ago

@koppor add the following to /etc/wsl.conf to disable systemd:

[boot]
systemd=false
koppor commented 10 months ago

Same behavior with

[boot]
systemd=false
DavyG-SSG commented 10 months ago

Hi @koppor, I don't know if that will help you, but I had the same issue and many problems with some apps, like Gedit or Tilix, not saving my configuration. I found this on stack overflow : https://stackoverflow.com/questions/20285697/error-in-spawning-a-dbus-launch-what-is-that I added this line to my .bashrc : export $(dbus-launch)

It solved all of my problems :)

maicol07 commented 9 months ago

I confirm @DavyG-SSG fix works! I don't know if it's a temporary fix or not, but it works!

b14ckyy commented 8 months ago

I have the same issue and can confirm the fix from @DavyG-SSG A permanent fix on WSL side would be nice though as I have not had this issue before december with the same application.

awakecoding commented 3 months ago

I'm hitting the same problem here with Ubuntu 22.04 in WSL and Remote Desktop Manager for Linux, but I guess all applications using dconf are equally affected. Both workarounds of disabling systemd or adding export $(dbus-launch) to .bashrc worked. We do need a proper fix though