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

Linux端帧率过低 #1293

Open
dontknowhy opened this issue Jul 29, 2024 · 1 comment
Open

Linux端帧率过低 #1293

dontknowhy opened this issue Jul 29, 2024 · 1 comment

Comments

@dontknowhy
Copy link

Listen1 干了啥

手动拆包asar可以在main.js看见:

switch (process.platform) {
  case "darwin":
    trayIconPath = join(__dirname, "/resources/logo_16.png");
    transparent = true;
    break;
  case "linux":
    trayIconPath = join(__dirname, "/resources/logo_32.png");
    // fix transparent window not working in linux bug
    app.disableHardwareAcceleration();
    break;
  case "win32":
    trayIconPath = join(__dirname, "/resources/logo_32.png");
    break;
  default:
    break;
}

其中的linux平台被这段 app.disableHardwareAcceleration();设置成不使用GPU渲染,而chromium对于这种情况会分配4核心去渲染界面,然后聪明的大小核调度器会全部丢给小核心处理。
所以美丽的linux端简约主题会滑动不跟手,现代主题个位数帧率。

我干了啥

去除掉这个可疑的限制,打包asar,然后我们就得到一个掉帧严重的 Listen1 。但是把打包好的asar放入Electron v31.2.1(Chromium v126.0.6478.127)就没有掉帧的界面(但音乐播放不正常,怀疑是播放音乐相关组件在Listen1使用的Electron 13.6.9以上会出问题。)。

目前为止有什么解决办法

当然是如有,你只需要给最开始去掉强制关闭硬件加速的野生Listen1启动时加上--ignore-gpu-blocklist --enable-zero-copy --enable-features=Vulkan的命令行选项,然后你就可以自由体验10W功耗的现代化歌词界面了(Iris Xe-LP)。

给开发者建议

优化一下这个沟槽主题,虽然我知道肯定不止说说这么简单。
缺点就是你不如出门去找浏览器扩展版,优化问题目前在我这没有什么太大的表现,就是你还是需要5W的功耗。

@kunieone
Copy link

same!UI做的很好,但是就是太卡了,有点难受

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

2 participants