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

请问如何启用wayland? #118

Open
lVentus opened this issue May 22, 2024 · 6 comments
Open

请问如何启用wayland? #118

lVentus opened this issue May 22, 2024 · 6 comments

Comments

@lVentus
Copy link

lVentus commented May 22, 2024

使用nixos,对于chromiuim和electron应用一般开启NIXOS_OZONE_WL = 1就会启用wayland,比如vscode和其他的elcetron软件都可以正常工作,但此软件还不行,请问应该如何操作

@Mooling0602
Copy link

你可以参考下我的启动脚本(prime-run是使用Nvidia独显启动):
prime-run /home/mooling/Apps/bilibili-x86_64.AppImage --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime

@moetayuko
Copy link

moetayuko commented Jul 2, 2024

arch + hyprland, 使用 --enable-features=UseOzonePlatform --ozone-platform=wayland 参数启动后确实在 wayland 模式下了,但会一直卡在第一屏 bili logo 上。在终端运行能看到调试输出滚动,用鼠标在界面里点击甚至有反应,可能界面渲染有问题

@Mooling0602
Copy link

arch + hyprland, 使用 --enable-features=UseOzonePlatform --ozone-platform=wayland 参数启动后确实在 wayland 模式下了,但会一直卡在第一屏 bili logo 上。在终端运行能看到调试输出滚动,用鼠标在界面里点击甚至有反应,可能界面渲染有问题

我用 KDE 没有问题)

@moetayuko
Copy link

添加 --use-gl=angle 后正常,或许跟 GPU 有关

@moetayuko
Copy link

moetayuko commented Jul 9, 2024

arch + hyprland, 使用 --enable-features=UseOzonePlatform --ozone-platform=wayland 参数启动后确实在 wayland 模式下了,但会一直卡在第一屏 bili logo 上。在终端运行能看到调试输出滚动,用鼠标在界面里点击甚至有反应,可能界面渲染有问题

在终端运行 electron21 观察到启用 wayland 后会报错 GPU process exited unexpectedly: exit_code=256,应该就是卡第一屏的原因。而添加 --use-gl=angle 后虽然能用,但 chrome://gpu 里显示没有 GPU 加速,跟添加 --disable-gpu 的效果完全一样。
反复测试后发现启用 vulkan 可以正常运行,目前使用的完整 flag 为 --ozone-platform-hint=auto --enable-wayland-ime --enable-features=Vulkan
启用 vulkan 后 electron21 虽然可以打开普通网页但打开 b 站的 asar 仍然卡第一屏,已放弃挣扎并改成了 electron22,功能似乎都正常

值得注意的是,以上现象可能是 electron21 的 bug,高版本无此情况(即使不启用 vulkan)。

@Bot-wxt1221
Copy link

建议去催一下这个PR NixOS/nixpkgs#332733

然后你就可以
image

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

4 participants