WSL: WSL2 - GUI Chrome example doesn't work

Version

Microsoft Windows [Version 10.0.22000.376]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.60.1-microsoft-standard-WSL2

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

  1. Follow this link https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps#install-google-chrome-for-linux to download & install chrome
  2. Run Chrome.
❯ google-chrome
[0106/195412.988599:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0106/195412.988637:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[1]    15843 trace trap  google-chrome

Expected Behavior

Chrome launches?

Actual Behavior

Getting error.

Diagnostic Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 34

Most upvoted comments

sudo apt install ./google-chrome-stable_current_amd64.deb

I did the same. I did a

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

and then

sudo apt install ./google-chrome-stable_current_amd64.deb

But running either google-chrome or google-chrome-stable is giving me the same error mentioned by @shinebayar-g .

Any fix possible ?

Thanks.

@nubiome

Hey, did you ever resolve this issue? I literally have the same problem you described.

Can you check if using wayland solves the issue ?

$ google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=wayland

If its running then:

  1. Your wsl version ( wsl -v )?
  2. Are you using systemd also?

Can’t really ignore them, as the errors result in the google-chrome process terminating, IIRC.

@shinebayar-g enable those options is not advisable. WSL kernel can’t manage the CPU, it’s just a Windows process. Here’s output from a WSL Ubuntu instance:

tux@ubuntu:~$ tree -L 1 /sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0
├── cache
├── driver -> ../../../../bus/cpu/drivers/processor
├── firmware_node -> ../../../LNXSYSTM:00/ACPI0007:00
├── hotplug
├── subsystem -> ../../../../bus/cpu
├── topology
└── uevent

and Chrome works fine. There are a bunch of errors on launch related to dbus since it’s not running. Here’s Chrome with your GitHub bug showing: wsl_chrome_github

What I did different was using apt to install the package. This way all dependencies are resolved at installation time:

sudo apt install ./google-chrome-stable_current_amd64.deb

I tried the same as well @elsaco , just to see what the feedback is. I got this message logged :

[21:21:0217/094950.009879:VERBOSE1:chrome_crash_reporter_client.cc(191)] GetCollectStatsConsent(): settings_consent: 0 so returning that [21:21:0217/094950.025942:VERBOSE1:chrome_crash_reporter_client.cc(191)] GetCollectStatsConsent(): settings_consent: 0 so returning that [1:1:0217/094950.077132:VERBOSE1:cdm_registration.cc(225)] Registering bundled Widevine 4.10.2391.0 [36:36:0217/094950.077112:VERBOSE1:cdm_registration.cc(225)] Registering bundled Widevine 4.10.2391.0 [1:1:0217/094950.082114:INFO:cpu_info.cc(53)] Available number of cores: 16 [36:36:0217/094950.082114:INFO:cpu_info.cc(53)] Available number of cores: 16 [1:1:0217/094950.082548:VERBOSE1:zygote_main_linux.cc(217)] ZygoteMain: initializing 2 fork delegates [36:36:0217/094950.082476:VERBOSE1:zygote_main_linux.cc(217)] ZygoteMain: initializing 0 fork delegates [1:1:0217/094950.085778:VERBOSE1:nacl_fork_delegate_linux.cc(153)] NaClForkDelegate::Init() [1:1:0217/094950.116669:VERBOSE1:nacl_fork_delegate_linux.cc(153)] NaClForkDelegate::Init() [21:21:0217/094950.155754:VERBOSE1:chrome_browser_cloud_management_controller.cc(86)] DM token = none [21:21:0217/094950.155812:VERBOSE1:chrome_browser_cloud_management_controller.cc(92)] Enrollment token = [21:21:0217/094950.155818:VERBOSE1:chrome_browser_cloud_management_controller.cc(93)] Client ID = QSlVC9KTzny1790KGxGn8QELTVY

However, the browser window doesn’t open up in my case and I am unsure as on to how to proceed / interpret this log message to fix this issue.

Same issue with microsoft-edge-beta_98.0.1108.27-1_amd64.deb exact same error msg

$ microsoft-edge [0125/133112.740044:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2) [0125/133112.740130:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2) Trace/breakpoint trap

wsl --list --verbose NAME STATE VERSION Ubuntu-20.04 Running 2

Both Chrome and Edge still doesn’t work unless launched with args as “–ozone-platform=wayland” like @kedevked mentions Looking forward to be resolved let me @AwesomeYuer know

[1228/024827.753152:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[1228/024828.857552:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[1228/024828.857611:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[1228/024828.860236:ERROR:directory_reader_posix.cc(42)] opendir /home/microshaoft/.config/microsoft-edge/Crash Reports/attachments/6755ac88-95b2-4fe5-85dc-1d49ac7784f0: No such file or directory (2)
Trace/breakpoint trap
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
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.963

@andrew-baker-oneadvanced in the case of google-chrome process terminating there must be something else beside those cpufreq startup errors. Here’s a list of all the Chrome errors on my WLS instance, most of them due to non-working dbus service:

tux@ubuntu:~$ google-chrome
[75:113:0216/082717.240987: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
[75:113:0216/082717.241572: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
[75:112:0216/082717.252450: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")
[75:112:0216/082717.252458: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")
[75:112:0216/082717.274710: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")
[75:112:0216/082717.274721: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")
[75:112:0216/082717.316729: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")
[75:112:0216/082717.316777: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")
[75:175:0216/082717.364393: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
[75:175:0216/082717.366522: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
[75:175:0216/082717.367430: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
[75:175:0216/082717.367463: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
[75:175:0216/082717.367479: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
[119:119:0216/082717.468353:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[75:143:0216/082720.368926:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[75:143:0216/082720.368939:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()

However, the browser window opens up and if functional:

wsl_chrome

To gather more information use google-chrome --enable-logging --v=1 and feedback will be logged in .config/google-chrome/chrome-debug.log file. Verbosity can be increased for even more feedback.

Kernel version: 5.15.57.1
WSLg version: 1.0.42
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.608

Seems like you’ve been facing https://github.com/microsoft/wslg/issues/820 and the fix is already available as Pre-release. See here as the workaround for now.

Which version of chrome are you running? I had this problem on v98, but after updating to v99 it worked again