[排障记录] 双屏幕Wayland环境的Awesun(向日葵)远程控制黑屏

[排障记录] 双屏幕Wayland环境的Awesun(向日葵)远程控制黑屏

问题现象

  • 本机使用 KDE Plasma Wayland。
  • AweSun 可以建立远程控制连接,KDE 也会显示远程控制通知。
  • 控制端看到黑屏。
  • 关闭一个显示器后,远程画面恢复正常。

环境

KDE Plasma 6.6.6
KWin 6.6.6
Wayland
PipeWire 1.6.2
NVIDIA 595.99.02
AweSun 16.6.0.32198

关键日志

日志文件:

/var/log/awesun/desktop.agent.*date*.log

Wayland portal 返回整个双屏桌面:

[wayland] streams: [(uint32 140, {'size': <(5120, 1440)>, 'source_type': <uint32 1>})]

[wayland] remote desktop started complete, stream nodeid:140,
x:0, y:0, width:5120, height:1440

PipeWire 协商到的尺寸也是:

[wayland] width: 5120, height: 1440,
format id: 12, buffer types: 0x4, modifier: 0xffffffff

但 AweSun 编码缓冲区仍按单屏尺寸初始化:

[EncodeStream] No need resize screen buffer,  [2560, 1440]

最终没有收到有效视频帧:

[CSingleDesktop] total 162 calc 0 encode 161 send 0 push 1
cost 376 size 14607 cache=0/0/0
bandwidth=65536(0, recv 0)
frame count=0/0

本地权限?

AweSun 本地保存了 Wayland Remote Desktop 恢复状态:

~/.config/sunloginclient.ini

原始内容包含:

[base]
rdversion=2
rd=<UUID>
rdverify=1
waylandenable=1

其中 rd 和 rdverify 可能是之前版本 AweSun 保存的恢复状态标识?

处理方法

删除旧的恢复状态,但保留 waylandenable,rdversion:

sed -i -E '/^(rd|rdverify)=/d' ~/.config/sunloginclient.ini

结果

清除 AweSun 自己保存的旧 RemoteDesktop 恢复状态后:

  • 不一定会弹出 KDE 的 portal 选择界面,反正我的情况下没有再次弹出,但 AweSun 会重新建立 Wayland RemoteDesktop session;
  • 双屏画面恢复正常,再次查看~/.config/sunloginclient.ini,其中并未生成 rd 和 rdverify ,可能这两个表示已经被废弃;
  • 不需要继续删除 screencast 或 remote-desktop PermissionStore 记录,删除后还会自动重新生成相应的token-id,而且没有弹出portal选择。