在 wsl2 中尝试使用 Chromium 时屏幕闪烁

在 wsl2 中尝试使用 Chromium 时屏幕闪烁

当我尝试通过终端启动 chromium 浏览器时出现一个巨大的错误,最糟糕的是浏览器非常不稳定。泪流满面的图片 上次我在 wsl2 中使用任何 GUI 应用程序(例如 gimp/jetbrains)时都发生过这种情况

    2024/03/01 13:24:56.942877 cmd_run.go:1055: WARNING: cannot start document portal: dial unix /run/user/1000/bus: connect: no such file or directory
[1033:1199:0301/132457.394982:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1199:0301/132457.395104:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1199:0301/132457.395155:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1199:0301/132457.395201:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1033:0301/132457.402909:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[1033:1199:0301/132457.423402:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1199:0301/132457.423470:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1197:0301/132457.476398:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1199:0301/132457.513921:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1199:0301/132457.513995:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1221:1221:0301/132457.523171:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization

(chrome:1033): IBUS-WARNING **: 13:24:57.674: Failed to mkdir /home/nvn/snap/chromium/2768/.config/ibus/bus: Not a directory
[1033:1033:0301/132457.694013:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[1033:1281:0301/132457.694720:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1033:0301/132457.758513:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[1033:1197:0301/132457.758746:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1288:0301/132457.759669:ERROR:object_proxy.cc(576)] 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
[1033:1288:0301/132457.760041:ERROR:object_proxy.cc(576)] 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
[1033:1288:0301/132457.760400: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
[1033:1033:0301/132457.775794:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[1033:1215:0301/132457.776615:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1033:0301/132457.784559:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[1033:1197:0301/132457.784798:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[1033:1033:0301/132457.785456:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[1284:1284:0301/132457.908216:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[1263:7:0301/132457.989707:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

答案1

WSL2似乎没有安装正确的软件包。让我们修复它:

sudo apt update
sudo apt upgrade
sudo apt install dbus-x11
wsl --shutdown

确保 Windows 上的 GPU 驱动程序已更新。另外,请确保您使用的是推荐的 WSLg,而不是自定义 X11 服务器。

相关内容