Repository navigation
Main thread stalls in xe_exec_ioctl freeze cursor/input under memory pressure; gainRealTime() silently never applies under uwsm #16644
Replies: 2 comments
|
This discussion has been automatically closed. |
0 replies
|
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hyprland 0.56.2 (Arch / Omarchy 4.0.4, launched by uwsm as
wayland-wm@hyprland.desktop.service), aquamarine 0.15.0, kernel 7.2.5, Intel Core Ultra 7 256V / Arc 140V (xe), 16 GB RAM.Two related things make Hyprland the first casualty of memory pressure on small machines. With a background job running, the cursor and input freeze for 0.3–1.5 s at a time.
1.
gainRealTime()silently never applies under a systemd/uwsm sessionps -o cls,rtprio,ni -p $(pidof Hyprland)showsTS - 0: the main thread is plainSCHED_OTHER. The unit hasLimitRTPRIO=0and the binary has noCAP_SYS_NICE, which is how every uwsm-launched session ships by default.hyprland.logcontains none of thegainRealTimemessages (Failed to change process scheduling strategyetc.), so nothing tells the user that Hyprland is running without realtime.Suggestions:
org.freedesktop.RealtimeKit1.MakeThreadRealtime) whensched_setschedulerisn't permitted. Mutter does this for its KMS thread (KWin getsCAP_SYS_NICEfrom its package instead). rtkit is on basically every desktop already, because PipeWire uses it.2. The main thread blocks in
xe_exec_ioctl, so input and cursor freeze with itI sampled the kernel stack of Hyprland's main thread whenever its IPC ping went over 50 ms. Under memory pressure, 20 of 27 captures were:
(state
S, Hyprland at ~0–20% CPU). Hyprland submits rendering on the main thread, and the driver blocks that submit while TTM evicts buffers to make room. The worst single stall was 1529 ms. Cursor movement, input dispatch and IPC all sit on the same thread, so they stop with it. Realtime scheduling wouldn't help here, because the thread is sleeping on a lock, not waiting for a CPU.This is mostly a driver/memory issue, but the compositor architecture decides how bad it feels. Mutter moved KMS commits (including the cursor plane) onto a dedicated thread for this reason. Has Hyprland considered moving cursor-plane updates and input handling off the render thread, or at least keeping the hardware cursor moving while a render submit is blocked?
Happy to provide the sampler (Python, reads
/proc/<pid>/task/<tid>/stackwhile the main thread is blocked) or full logs.All reactions