[Linux/X11] Client process grows to 14.3 GiB RSS after ~26 hours of remote sessions
Bug Description
The main RustDesk client process grew to approximately 14.3 GiB RSS after running for about 26 hours with remote sessions to macOS peers.
Hardware codec/acceleration was explicitly disabled. The session used software decoding; the log confirms AV_HWDEVICE_TYPE_NONE and ram decoder. Therefore, this does not appear to be a hardware decoder or VRAM leak.
Only the main controlling/UI process was affected. The --server, --tray, and system service processes each remained below 60 MiB.
Memory inspection shows that this is private anonymous memory rather than file cache, shared memory, or GPU mappings:
VmSize: 21957036 kB
VmHWM: 14962952 kB
VmRSS: 14962952 kB
RssAnon: 14790548 kB
RssFile: 172364 kB
RssShmem: 40 kB
VmData: 15333548 kB
VmSwap: 0 kB
Threads: 94/proc/<pid>/smaps contained 216 anonymous mappings of at least 60 MiB, totaling approximately 13.6 GiB. RSS was still increasing during a short sample:
14948604 kB
14948652 kB
14948756 kB
14948804 kBThe process remained responsive and had an active connection when measured.
How to Reproduce
- Install RustDesk 1.4.9 from the official
.debpackage on Linux Mint Cinnamon/X11. - Disable hardware codec/acceleration in RustDesk.
- Connect to macOS peers running RustDesk 1.4.9, with clipboard synchronization enabled and codec preference set to
VP8. - Keep the RustDesk client running across connection/disconnection cycles for approximately 24 hours.
- Check the main process RSS with
psor/proc/<pid>/status.
I have not yet isolated whether continuous connection time or repeated reconnects are required.
Expected Behavior
Memory used by completed sessions, decoders, clipboard handlers, and frame buffers should be released. The controlling client should not retain multiple gigabytes after extended use.
Operating system(s) on local (controlling) side and remote (controlled) side
Linux Mint 22.3, Cinnamon, X11, kernel 7.0.0-34-generic → macOS 26.7
RustDesk Version(s) on local (controlling) side and remote (controlled) side
1.4.9 → 1.4.9
Screenshots
N/A
Additional Context
Hardware codec/acceleration was explicitly disabled, and codec preference was set to VP8 for the affected session. The same long-running client process also handled earlier or reconnected sessions using the H.265 software decoder. No hardware decoder was used; the H.265 log explicitly shows AV_HWDEVICE_TYPE_NONE and ram decoder:
try create Some(CodecInfo {
name: "hevc",
format: H265,
priority: 3,
hwdevice: AV_HWDEVICE_TYPE_NONE
}) ram decoder
create H265 decoder successVP8 decoder initialization was also recorded during reconnects. Remote resolutions included 2880×1800 and 1920×1080. This does not appear to be a hardware decoder or VRAM leak.
The logs show repeated connection/decoder initialization and frequent clipboard activity. There were also repeated X11 image clipboard conversion failures:
DEBUG [src/clipboard.rs:257] clipboard updated on client
DEBUG [arboard-.../src/platform/linux/x11.rs:1174]
Error while getting image: ConversionFailure -
"The image or the text that was about the be transferred to/from the clipboard
could not be converted to the appropriate format."
ERROR [src/ui_interface.rs:1332]
ipc connection closed: reset by the peerAcross the relevant logs there were:
9 peer-info events
9 successful decoder creations
3 video-handler resets
134 "clipboard updated on client" events
15 clipboard image ConversionFailure eventsThe clipboard errors correlate with activity but are not confirmed as the cause. Approximately 14.1 GiB was private anonymous memory (RssAnon), while RssShmem was only 40 KiB. The anonymous mappings and continued RSS growth therefore indicate retained allocations or severe allocator fragmentation in the main client process, rather than shared graphics buffers or VRAM usage.
Related reports:
- #9262 — RustDesk reaching approximately 6 GB during extended/multi-screen use
- https://github.com/rustdesk/rustdesk/discussions/12672 — Linux client memory increasing continuously during a remote session
- #14603 — per-connection allocations retained across repeated sessions on macOS
Source: rustdesk/rustdesk