atagen

monolith

public
Star0
Watch0

Commit fdb16f42492e

tarball

atagen <boss@atagen.co>2026-10-16 13:41 UTC

2 files changed+49-49
monolith: let MONOLITH_NO_SCANOUT force composition on every frame
Modified file: crates/monolith/src/drm.rs+7 additions−1 deletions
@@ -51,6 +51,7 @@ pub struct Drm {
5151 manager: Manager,
5252 scanner: DrmScanner,
5353 nvidia: bool,
54+ frame_flags: FrameFlags,
5455 surfaces: HashMap<crtc::Handle, Surface>,
5556 }
5657
@@ -266,6 +267,11 @@ pub fn init(
266267 manager,
267268 scanner: DrmScanner::new(),
268269 nvidia,
270+ frame_flags: if std::env::var_os("MONOLITH_NO_SCANOUT").is_some() {
271+ FrameFlags::empty()
272+ } else {
273+ FrameFlags::DEFAULT
274+ },
269275 surfaces: HashMap::new(),
270276 });
271277 scan(state);
@@ -582,7 +588,7 @@ fn render_surface(state: &mut State, crtc: crtc::Handle, target: u64) -> bool {
582588 let mut queue_ns = 0;
583589 match surface
584590 .drm
585- .render_frame(renderer, &elements, CLEAR, FrameFlags::DEFAULT)
591+ .render_frame(renderer, &elements, CLEAR, drm.frame_flags)
586592 {
587593 Ok(result) if !result.is_empty => {
588594 let queue_began = std::time::Instant::now();
Modified file: monolith.log+42 additions−48 deletions
@@ -1,51 +1,45 @@
1- Finished `release` profile [optimized] target(s) in 0.09s
1+ Finished `release` profile [optimized] target(s) in 0.07s
22 Running `target/release/monolith run --backend drm , vkcube`
3-2026-10-16T13:37:26.021991Z INFO monolith::drm: primary GPU path=/dev/dri/card1
4-2026-10-16T13:37:26.301101Z INFO monolith::drm: output connected name="DP-2" w=2560 h=1440 refresh=165
5-2026-10-16T13:37:26.301182Z INFO monolith::ipc: control socket path=/run/user/1000/monolith-wayland-2.sock
6-2026-10-16T13:37:26.301196Z INFO monolith: monolith running socket="wayland-2" device="NVIDIA GeForce RTX 3060"
7-2026-10-16T13:37:26.301621Z INFO monolith::commands: spawned pid=350032 argv=[",", "vkcube"]
8-2026-10-16T13:37:26.329975Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=28292811 scene_ns=1680 render_ns=15822467 queue_ns=143422
9-2026-10-16T13:37:26.336024Z DEBUG monolith::drm: frame rate output="DP-2" presented=1 vblanks=8540301 budget_us=30292
3+2026-10-16T13:39:52.271005Z INFO monolith::drm: primary GPU path=/dev/dri/card1
4+2026-10-16T13:39:52.553698Z INFO monolith::drm: output connected name="DP-2" w=2560 h=1440 refresh=165
5+2026-10-16T13:39:52.553800Z INFO monolith::ipc: control socket path=/run/user/1000/monolith-wayland-2.sock
6+2026-10-16T13:39:52.553815Z INFO monolith: monolith running socket="wayland-2" device="NVIDIA GeForce RTX 3060"
7+2026-10-16T13:39:52.554264Z INFO monolith::commands: spawned pid=350740 argv=[",", "vkcube"]
8+2026-10-16T13:39:52.593357Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=38986278 scene_ns=4530 render_ns=23032820 render_cpu_ns=8313475 queue_ns=99091
9+2026-10-16T13:39:52.597275Z DEBUG monolith::drm: frame rate output="DP-2" presented=1 vblanks=8564428 budget_us=40986
1010 Selected WSI platform: wayland
1111 Selected GPU 0: NVIDIA GeForce RTX 3060, type: DiscreteGpu, apiVersion: 4211017 (1.4.329), driverVersion: -1797652352 (83.416.128)
12-2026-10-16T13:37:27.148355Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6065404 budget_ns=2855707
13-2026-10-16T13:37:27.336255Z DEBUG monolith::drm: frame rate output="DP-2" presented=62 vblanks=164 budget_us=2871
14-2026-10-16T13:37:28.088426Z DEBUG monolith::input: bind cmd=Fullscreen
15-2026-10-16T13:37:28.190690Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=12164788 scene_ns=9340 render_ns=11917384 queue_ns=233254
16-2026-10-16T13:37:28.197103Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=42442808 budget_ns=3252354
17-2026-10-16T13:37:28.336509Z DEBUG monolith::drm: frame rate output="DP-2" presented=151 vblanks=165 budget_us=3313
18-2026-10-16T13:37:29.336770Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3169
19-2026-10-16T13:37:30.337026Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3371
20-2026-10-16T13:37:30.494826Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3517847 scene_ns=7420 render_ns=3449676 queue_ns=57191
21-2026-10-16T13:37:30.500748Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6094851 budget_ns=3430980
22-2026-10-16T13:37:31.337282Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=3314
23-2026-10-16T13:37:32.337537Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3197
24-2026-10-16T13:37:33.156161Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3500447 scene_ns=4140 render_ns=3330464 queue_ns=164403
25-2026-10-16T13:37:33.161992Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6064851 budget_ns=3349589
26-2026-10-16T13:37:33.337799Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=3295
27-2026-10-16T13:37:34.338051Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3441
28-2026-10-16T13:37:35.338354Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3432
29-2026-10-16T13:37:36.338593Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3367
30-2026-10-16T13:37:37.338902Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3194
31-2026-10-16T13:37:38.339072Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3374
32-2026-10-16T13:37:39.339326Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3291
33-2026-10-16T13:37:39.369816Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3477627 scene_ns=3430 render_ns=3351345 queue_ns=121312
34-2026-10-16T13:37:39.375734Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6081851 budget_ns=3291628
35-2026-10-16T13:37:40.339587Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=3336
36-2026-10-16T13:37:41.339871Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3236
37-2026-10-16T13:37:42.340096Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3335
38-2026-10-16T13:37:43.340353Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3406
39-2026-10-16T13:37:44.340610Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3440
40-2026-10-16T13:37:45.340866Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3415
41-2026-10-16T13:37:45.583154Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3209653 scene_ns=4340 render_ns=3055520 queue_ns=148143
42-2026-10-16T13:37:46.341122Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3401
43-2026-10-16T13:37:47.341427Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3328
44-2026-10-16T13:37:48.341697Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3358
45-2026-10-16T13:37:49.341925Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3421
46-2026-10-16T13:37:50.342193Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3332
47-2026-10-16T13:37:51.342403Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3263
48-2026-10-16T13:37:51.791450Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3722772 scene_ns=4890 render_ns=3438177 queue_ns=277855
49-2026-10-16T13:37:51.797115Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6074851 budget_ns=3283108
50-2026-10-16T13:37:52.342659Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=3325
51-2026-10-16T13:37:53.185148Z DEBUG monolith::input: bind cmd=Quit
12+2026-10-16T13:39:53.633937Z DEBUG monolith::drm: frame rate output="DP-2" presented=53 vblanks=171 budget_us=2250
13+2026-10-16T13:39:54.379572Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6071851 budget_ns=2537563
14+2026-10-16T13:39:54.634161Z DEBUG monolith::drm: frame rate output="DP-2" presented=163 vblanks=164 budget_us=2727
15+2026-10-16T13:39:55.030351Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=4831411 scene_ns=5370 render_ns=4754940 render_cpu_ns=1894492 queue_ns=69361
16+2026-10-16T13:39:55.034256Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6064851 budget_ns=3179425
17+2026-10-16T13:39:55.634419Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=3122
18+2026-10-16T13:39:56.634675Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3157
19+2026-10-16T13:39:56.780418Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3376287 scene_ns=6120 render_ns=3275165 render_cpu_ns=768540 queue_ns=92432
20+2026-10-16T13:39:56.786224Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6065851 budget_ns=3413131
21+2026-10-16T13:39:57.634966Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=3274
22+2026-10-16T13:39:58.635224Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3324
23+2026-10-16T13:39:59.635443Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3247
24+2026-10-16T13:40:00.499837Z DEBUG monolith::input: bind cmd=Fullscreen
25+2026-10-16T13:40:00.642257Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=14485644 scene_ns=7720 render_ns=14191029 render_cpu_ns=7160684 queue_ns=283285
26+2026-10-16T13:40:00.647835Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=54532212 budget_ns=3203097
27+2026-10-16T13:40:00.647849Z DEBUG monolith::drm: frame rate output="DP-2" presented=147 vblanks=167 budget_us=3203
28+2026-10-16T13:40:01.648077Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3221
29+2026-10-16T13:40:02.648330Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3207
30+2026-10-16T13:40:03.648591Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3432
31+2026-10-16T13:40:04.648848Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3463
32+2026-10-16T13:40:05.649107Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3281
33+2026-10-16T13:40:05.776430Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3303456 scene_ns=5290 render_ns=3215134 render_cpu_ns=3281472 queue_ns=79822
34+2026-10-16T13:40:05.782490Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6064851 budget_ns=3304089
35+2026-10-16T13:40:06.649365Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=3245
36+2026-10-16T13:40:07.649665Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3276
37+2026-10-16T13:40:08.649903Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3333
38+2026-10-16T13:40:09.650131Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=3335
39+2026-10-16T13:40:10.650389Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3271
40+2026-10-16T13:40:11.650648Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3392
41+2026-10-16T13:40:12.650906Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3252
42+2026-10-16T13:40:13.651161Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3345
43+2026-10-16T13:40:14.651463Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3307
44+2026-10-16T13:40:15.651701Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=3265
45+2026-10-16T13:40:15.691710Z DEBUG monolith::input: bind cmd=Quit