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

wsl 2 - Getting “Failed to connect to the bus: Could not parse server address” error when launching google chrome or any electron app #7915

Open
1 of 2 tasks
mwoodpatrick opened this issue Jan 10, 2022 · 43 comments

Comments

@mwoodpatrick
Copy link

Version

Windows version: 10.0.22000.376

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.74.3

Distro Version

20.04.3 LTS (Focal Fossa)

Other Software

electron 16.0.6 or Google chrome Version 97.0.4692.71 (Official Build) (64-bit)

Repro Steps

Install and start google chrome on wsl2 and start

Expected Behavior

browser should come up without error

Actual Behavior

google-chrome
[8405:8442:0110/140553.266744:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[8405:8441:0110/140553.276538:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8405:8441:0110/140553.277982:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8405:8441:0110/140553.329491:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8405:8441:0110/140553.329632:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8405:8476:0110/140553.499766:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[8405:8476:0110/140553.499863:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[8405:8476:0110/140553.500048:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[8405:8476:0110/140553.500124:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[8405:8476:0110/140553.500170:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[8448:8448:0110/140555.058357:ERROR:sandbox_linux.cc(378)] InitializeSandbox() called with multiple threads in process gpu-process.
[8405:8441:0110/140636.457250:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8405:8441:0110/140636.457371:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8405:9002:0110/140641.065898:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(

Diagnostic Logs

No response

@mwoodpatrick mwoodpatrick changed the title wsl 2 - Getting “Failed to connect to the bus: Could not parse server address” error when launch electron - wsl 2 - Getting “Failed to connect to the bus: Could not parse server address” error when launching google chrome or any electron app Jan 10, 2022
@mwoodpatrick
Copy link
Author

Note chrome and electron apps do start but they give the above errors

@benhillis
Copy link
Member

@mwoodpatrick - are you using WSLg or a third party xserver on Windows?

@mwoodpatrick
Copy link
Author

wslg, xdpyinfo shows

name of display: :0
version number: 11.0
vendor string: Microsoft Corporation
vendor release number: 12010000
maximum request size: 16777212 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst

@ghost ghost removed the needs-author-feedback label Jan 11, 2022
@mwoodpatrick
Copy link
Author

starting dbus using

sudo service dbus start

did not help

@ssbarnea
Copy link

That error is making our GHA workflows hard to debug as there are tons of it. If anyone know a workaround for it it would be great.

@mbwhite
Copy link

mbwhite commented Mar 4, 2022

Likewise I'm seeing a lot of these errors, when running test on our Electron based app.

The cyrpress test tool makes reference to it in http://www.apimirror.com/cypress/guides/guides/debugging,
And there is some hope offered here https://x410.dev/cookbook/wsl/setting-up-wsl-for-linux-gui-apps/

I would hope that the new WSLg will help here; or use multipass rather WSL.

@rajann44
Copy link

I am getting these error with Cypress + Github Actions. Any solution for this?

@OmarLomsadze
Copy link

any updates?

@RestOp
Copy link

RestOp commented Jun 11, 2022

also interesting

@PLopezD
Copy link

PLopezD commented Jun 21, 2022

Would also appreciate some help with this - im running into the same issue

@StephaneRavet
Copy link

StephaneRavet commented Jun 22, 2022

Same error with a fresh WSL install.

npx cypress open
[842:0622/130355.318602:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[842:0622/130355.318681:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[1017:0622/130355.388099:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[1017:0622/130355.390256:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
[842:0622/130356.093104:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[842:0622/130356.100823:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
^C[1017:0622/130359.490904:ERROR:connection.cc(66)] X connection error received.
[1017:0622/130359.490881:ERROR:connection.cc(66)] X connection error received.

I tried distros : Ubuntu22, Ubuntu20, Debian. The same.

@elsaco
Copy link

elsaco commented Jun 22, 2022

Here are steps to get dbus functionality on Win10/WSL:

- set `DISPLAY` env variable
- start `dbus` service
- set `XDG_RUNTIME_DIR` env variable
- start `dbus` user session

This will fix ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory

Sample run on Win10 and vcxsrv using current WSL endpoint IP address:

- export DISPLAY=172.19.48.1:0
- sudo service dbus start
- export XDG_RUNTIME_DIR=/run/user/$(id -u)
- sudo mkdir $XDG_RUNTIME_USER
- sudo chmod 700 $XDG_RUNTIME_DIR
- sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
- export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
- dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

This can be added to .profile or .bashrc however the IP changes with every WSL restart. Win11 users don't need to worry about setting DISPLAY it's done by wslg.

When lauching google-chrome there are no more dbus errors, just some power daemon related (ignore them) and some extension not being supported:

tux@RIPPER:~$ google-chrome
[1603:1687:0622/090500.809467:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1603:1687:0622/090500.809580:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1603:1687:0622/090500.809665:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1643:1643:0622/090501.718820:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

And if you install upower the only error when starting google-chrome is:

tux@RIPPER:~$ google-chrome
[2313:2313:0622/092753.743901:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

@ayushverma14
Copy link

I am trying to launch vs code installed on wsl ubuntu installed on windows machine .Getting the same error and vs code is unable to start

[18017:0708/124642.570768:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[18017:0708/124642.570908:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[18017:0708/124642.572659:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[18017:0708/124642.572681:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[18017:0708/124642.628617:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[main 2022-07-08T07:16:42.707Z] [File Watcher (node.js)] Request to start watching: /home/ayusver/.config/Code/User (excludes: <none>, includes: <all>),/home/ayusver/.config/Code/User/settings.json (excludes: <none>, includes: <all>)
[main 2022-07-08T07:16:42.719Z] Sending env to running instance...
[main 2022-07-08T07:16:42.720Z] [File Watcher (node.js)] Started watching: '/home/ayusver/.config/Code/User'
[main 2022-07-08T07:16:42.721Z] [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/ayusver/.config/Code/User/settings.json'
[main 2022-07-08T07:16:42.827Z] Sent env to running instance. Terminating...
[main 2022-07-08T07:16:42.828Z] Lifecycle#kill()
[main 2022-07-08T07:16:42.828Z] Lifecycle#onWillShutdown.fire()

@StephaneRavet
Copy link

I am trying to launch cypress from my wsl project :

npx cypress open
[2069:0708/111639.476991:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2069:0708/111639.477091:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2069:0708/111639.480470:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[2069:0708/111639.480516:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[2069:0708/111639.575912:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[2241:0708/111639.606803:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[2241:0708/111639.609824:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
[2069:0708/111640.314047:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[2069:0708/111640.441276:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

@ms0uto
Copy link

ms0uto commented Sep 26, 2022

Launching chromium from void linux causes the same behaviour.

[6769:6795:0926/204512.848653:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[6769:6795:0926/204512.848734:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[6769:6795:0926/204512.848775:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

@Jester3141
Copy link

I had this issue and it turned out that SELinux was causing chrome not to be able to access certain things through dbus. (errors were seen in the dbus log noting the selinux/chrome connection) Solutions are to either, add the appropriate selinux permissions to chrome or to disable selinux.

@desaijay315
Copy link

Is this issue resolved? After installing google-chrome , getting the below issue

image

@desaijay315
Copy link

I had this issue and it turned out that SELinux was causing chrome not to be able to access certain things through dbus. (errors were seen in the dbus log noting the selinux/chrome connection) Solutions are to either, add the appropriate selinux permissions to chrome or to disable selinux.

@Jester3141 - Ill give this a try

@StephaneRavet
Copy link

Cypress now launches correctly after migrating to Windows 11 (which adds WSLg).

@sam-mfb
Copy link

sam-mfb commented Oct 27, 2022

Here are steps to get dbus functionality on Win10/WSL:

- set `DISPLAY` env variable
- start `dbus` service
- set `XDG_RUNTIME_DIR` env variable
- start `dbus` user session

This will fix ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory

Sample run on Win10 and vcxsrv using current WSL endpoint IP address:

- export DISPLAY=172.19.48.1:0
- sudo service dbus start
- export XDG_RUNTIME_DIR=/run/user/$(id -u)
- sudo mkdir $XDG_RUNTIME_USER
- sudo chmod 700 $XDG_RUNTIME_DIR
- sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
- export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
- dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

Is line 4 a typo, i.e., should it be sudo mkdir $XDG_RUNTIME_DIR?

@mikaello
Copy link

mikaello commented Nov 10, 2022

Here are steps to get dbus functionality on Win10/WSL:
...

This seems to help, but does not work completely, I now got errors like:

[5675:7:1110/161554.189115:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[1110/161556.373605:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[1110/161556.373667:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)

... and the webpage crashes. Has someone solved this?

I am running google-chrome in Docker in WSL through xserver.

@Grkmus
Copy link

Grkmus commented Nov 24, 2022

I have a similar problem. I am running cypress via wsl2 with GUI. It actually opens but after running couple of tests, it become really slow and eventually does not respond at all. When I check the wsl2 console I see this message Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") Any update on this?

@joracine
Copy link

joracine commented Dec 4, 2022

Figured out how to fix this part:

This is because you're using the wrong IP. When entering the IP, make sure to use the Windows IP, not the IP from ifconfig or hostname within the WSL, as this is a WM's IP. Here's an update config ready for bashrc that also fixes the USER typo:

export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
sudo service dbus restart
export XDG_RUNTIME_DIR=/run/user/$(id -u)
if [ -d "@XDG_RUNTIME_DIR" ]
then
  sudo mkdir $XDG_RUNTIME_DIR
  sudo chmod 700 $XDG_RUNTIME_DIR
  sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
fi
export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

@SirLouen
Copy link

$ sudo service dbus start
Redirecting to /bin/systemctl start dbus.service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

How can you start dbus without systemd?

@elsaco
Copy link

elsaco commented Dec 22, 2022

@SirLouen if you type systemctl cat dubs.service there are the ExecStart and ExecReload commands. Also dbus-daemon --help will show the options for starting the daemon.

@SirLouen
Copy link

@SirLouen if you type systemctl cat dubs.service there are the ExecStart and ExecReload commands. Also dbus-daemon --help will show the options for starting the daemon.

$ sudo systemctl cat dbus.service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

@elsaco
Copy link

elsaco commented Dec 22, 2022

@SirLouen you could just look at the unit file in /lib/systemd/system/dbus.service:

elsaco@RIPPER:~$ cat /lib/systemd/system/dbus.service
[Unit]
Description=D-Bus System Message Bus
Documentation=man:dbus-daemon(1)
Requires=dbus.socket
# Do not stop on shutdown
DefaultDependencies=no
Wants=sysinit.target
After=sysinit.target basic.target

[Service]
ExecStart=@/usr/bin/dbus-daemon @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
OOMScoreAdjust=-900

@SirLouen
Copy link

cat /lib/systemd/system/dbus.service

Not exactly there

$ cat /etc/systemd/system/dbus.service
[Unit]
Description=D-Bus System Message Bus
Documentation=man:dbus-broker-launch(1)
DefaultDependencies=false
After=dbus.socket
Before=basic.target shutdown.target
Requires=dbus.socket
Conflicts=shutdown.target

[Service]
Type=notify
Sockets=dbus.socket
OOMScoreAdjust=-900
LimitNOFILE=16384
ProtectSystem=full
PrivateTmp=true
PrivateDevices=true
ExecStart=/usr/bin/dbus-broker-launch --scope system --audit
ExecReload=/usr/bin/busctl call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus ReloadConfig

[Install]
Alias=dbus.service
$ /usr/bin/dbus-broker-launch --scope system --audit
No listener socket inherited

@wwjll
Copy link

wwjll commented Mar 23, 2023

I tried

export LIBGL_ALWAYS_INDIRECT=1
export DISPLAY=:0

then I can launch chrome window in my win11. And using xrdp and xfce4 seems a reliable solution if you want a full desktop of your wsl2 .

@Creeki
Copy link

Creeki commented Mar 23, 2023

I tried

export LIBGL_ALWAYS_INDIRECT=1
export DISPLAY=:0

then I can launch chrome window in my win11. And using xrdp and xfce4 seems a reliable solution if you want a full desktop of your wsl2 .

Thanks you so much @wwjll !! It also makes the microsoft-edge works in my win11!

@SuperBeagleDog
Copy link

I tried

export LIBGL_ALWAYS_INDIRECT=1
export DISPLAY=:0

then I can launch chrome window in my win11. And using xrdp and xfce4 seems a reliable solution if you want a full desktop of your wsl2 .

Worked for me too, thank you, you saved my day.

@3xploiton3
Copy link

3xploiton3 commented Aug 25, 2023

open vs code, or code-oss using kali linux give us this error

[4081:0825/183951.012712:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4081:0825/183951.015442:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4081:0825/183958.526565:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4081:0825/183958.528552:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4081:0825/184002.551679:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4081:0825/184002.555458:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4081:0825/184024.138150:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4081:0825/184024.141588:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

@kevin-coppens
Copy link

I fixed it by following this : https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

and then: sudo apt-get install dbus-x11

@boamorte666
Copy link

Windows 11 - Ubuntu - WSL 2 - Clean Install

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install --fix-broken -y
sudo dpkg -i google-chrome-stable_current_amd64.deb

I'm just do this:

sudo apt install upower
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

Captura de tela 2023-11-27 014618
Captura de tela 2023-11-27 014552

@shrikantbmali
Copy link

Just restart your PC.

@Juulaps
Copy link

Juulaps commented Jan 11, 2024

Here are steps to get dbus functionality on Win10/WSL:

- set `DISPLAY` env variable
- start `dbus` service
- set `XDG_RUNTIME_DIR` env variable
- start `dbus` user session

This will fix ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory

Sample run on Win10 and vcxsrv using current WSL endpoint IP address:

- export DISPLAY=172.19.48.1:0
- sudo service dbus start
- export XDG_RUNTIME_DIR=/run/user/$(id -u)
- sudo mkdir $XDG_RUNTIME_USER
- sudo chmod 700 $XDG_RUNTIME_DIR
- sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
- export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
- dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

This can be added to .profile or .bashrc however the IP changes with every WSL restart. Win11 users don't need to worry about setting DISPLAY it's done by wslg.

When lauching google-chrome there are no more dbus errors, just some power daemon related (ignore them) and some extension not being supported:

tux@RIPPER:~$ google-chrome
[1603:1687:0622/090500.809467:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1603:1687:0622/090500.809580:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1603:1687:0622/090500.809665:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1643:1643:0622/090501.718820:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

And if you install upower the only error when starting google-chrome is:

tux@RIPPER:~$ google-chrome
[2313:2313:0622/092753.743901:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

Thanks! On Windows 11 (OS Build 22631.2861) + Ubuntu 22.04.3 I only needed to start the dbus user session to resolve the errors. The environment variables are already set out of the box. And the dbus service was already started (checked with systemctl status dbus).

dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

I do still get 2 Vulkan errors but those seems to be ignorable.

image

image

@fdciabdul
Copy link

image
same issue here

@xavier-fenton
Copy link

any solution to the problem?

@WuYeqi
Copy link

WuYeqi commented May 30, 2024

Here are steps to get dbus functionality on Win10/WSL:以下是在 Win10/WSL 上获取 dbus 功能的步骤:

- set `DISPLAY` env variable
- start `dbus` service
- set `XDG_RUNTIME_DIR` env variable
- start `dbus` user session

This will fix ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory 这将修复 ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory

Sample run on Win10 and vcxsrv using current WSL endpoint IP address:示例运行 Win10vcxsrv 使用当前 WSL 终结点 IP 地址:

- export DISPLAY=172.19.48.1:0
- sudo service dbus start
- export XDG_RUNTIME_DIR=/run/user/$(id -u)
- sudo mkdir $XDG_RUNTIME_USER
- sudo chmod 700 $XDG_RUNTIME_DIR
- sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
- export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
- dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

This can be added to .profile or .bashrc however the IP changes with every WSL restart. Win11 users don't need to worry about setting DISPLAY it's done by wslg.这可以添加到 IP 中 .profile ,或者 .bashrc IP 会随着每次 WSL 重启而更改。Win11 用户无需担心将其设置为 DISPLAYwslg 完成。

When lauching google-chrome there are no more dbus errors, just some power daemon related (ignore them) and some extension not being supported:启动 google-chrome 时,不再 dbus 有错误,只是一些与电源守护程序相关的错误(忽略它们)和一些不支持的扩展:

tux@RIPPER:~$ google-chrome
[1603:1687:0622/090500.809467:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1603:1687:0622/090500.809580:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1603:1687:0622/090500.809665:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[1643:1643:0622/090501.718820:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

And if you install upower the only error when starting google-chrome is:

tux@RIPPER:~$ google-chrome
[2313:2313:0622/092753.743901:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

There is a small error in the code here
image
This will work。Thank you very much, I spent several days trying to find a way to solve this problem

@batata004
Copy link

Any news? I am still facing this same error message on Centos Stream 9.

@qingpu-y
Copy link

qingpu-y commented Aug 15, 2024

vncviewer_HY4vKZHtf0

  1. try {apt-get install dbus-x11 dbus}

  2. try {services dbus start}

    1. Failed to connect to the bus: Failed to connect to socket /run/user/0/bus: No such file or directory

    dbus-launch and export {output DBUS_SESSION_BUS_ADDRESS}

    1. [32374:32485:0815/162322.776073:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files

    {apt install upower}

@sshveta
Copy link

sshveta commented Nov 1, 2024

sudo service dbus start

  • export XDG_RUNTIME_DIR=/run/user/$(id -u)
  • sudo mkdir $XDG_RUNTIME_USER
  • sudo chmod 700 $XDG_RUNTIME_DIR
  • sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
  • export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
  • dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

This worked for me .

@alexanderilyin
Copy link

@Juulaps seems you had small typo:

 sudo service dbus start
 export XDG_RUNTIME_DIR=/run/user/$(id -u)
-sudo mkdir $XDG_RUNTIME_USER
+sudo mkdir $XDG_RUNTIME_DIR
 sudo chmod 700 $XDG_RUNTIME_DIR
 sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
 export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
 dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &

but it solved by errors. Thanks!

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