Compare commits

...
2 Commits
Author SHA1 Message Date
VallierDevandClaude Opus 5.5 1fa58904d7 Release v0.1.30
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 14:22:20 +08:00
VallierDevandClaude Opus 5.5 da49e71b9d fix(x11): keep the shared display open until the last capture is dropped
The X11 engine has one process-wide display connection, but every
ScreenCapture closed it on drop. During guest assistance the device
init's screen-size probe created and dropped a capture after the main
one, closing the display under it: the stream stopped with
"X11 display wake failed" and the viewer got no video. A capture
replaced after a resize had the same hazard. Count live X11 captures
and close only on the last drop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 14:19:49 +08:00
4 changed files with 23 additions and 3 deletions

No files matched your search

Generated
+1 -1
View File
@@ -2717,7 +2717,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uu-remote-linux"
version = "0.1.29"
version = "0.1.30"
dependencies = [
"async-trait",
"base64 0.22.1",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "uu-remote-linux"
version = "0.1.29"
version = "0.1.30"
edition = "2021"
authors = ["uu-remote-linux contributors"]
description = "Unofficial Linux host for NetEase UU Remote: control a Linux desktop from the official clients"
+13
View File
@@ -0,0 +1,13 @@
修复未登录(访客)远程协助时 X11 没有画面。/ Fix missing video during guest remote assistance on X11.
### 修复 / Fixed
- **X11 访客远程协助无画面**:未登录账号、以访客身份开启远程协助时,设备初始化过程会临时打开再关闭一次屏幕采集,
把正在使用的 X11 连接一起关掉,日志出现 `Live desktop stream stopped: X11 display wake failed`,控制端连上后一直黑屏。
现在 X11 连接按引用计数管理,只有最后一个采集对象释放时才关闭;X11 分辨率变化后重建采集也不再有同样的隐患。
已在虚拟机(Xvfb 虚拟桌面)上实测:访客协助加入、画面、鼠标移动/点击、键盘均正常。⚠️ 未用官方客户端在真机上复测。
Guest assistance on X11 no longer loses the display connection; video, mouse and keyboard verified in a VM.
### 下载 / Download
`uu-remote-linux-v0.1.30-x86_64-linux.tar.gz`:X11 版可执行文件(x86_64,glibc ≥ 2.35),附带 `contrib/`。
**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.**
+8 -1
View File
@@ -108,6 +108,7 @@ impl ScreenCapture {
if display_ptr.is_null() { return Err("Capture display name unavailable".into()); }
let display = unsafe { std::ffi::CStr::from_ptr(display_ptr) }.to_string_lossy().into_owned();
log::info!("Selected capture display: {}", display);
X11_USERS.fetch_add(1, std::sync::atomic::Ordering::AcqRel);
Ok(Self {
backend,
init_error:None,
@@ -150,9 +151,15 @@ impl ScreenCapture {
}
}
/// The X11 engine keeps one process-wide display connection shared by every ScreenCapture.
/// Only the last one may close it: a short-lived capture (device init's screen size during guest
/// assistance, or the replaced capture after a resize) used to close it under the live stream.
static X11_USERS: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
impl Drop for ScreenCapture {
fn drop(&mut self) {
if self.init_error.is_none() && self.backend==crate::desktop_backend::DesktopBackend::X11 { unsafe { x11_close() }; }
if self.init_error.is_none() && self.backend==crate::desktop_backend::DesktopBackend::X11
&& X11_USERS.fetch_sub(1, std::sync::atomic::Ordering::AcqRel) == 1 { unsafe { x11_close() }; }
}
}