Commit d96bfa1d0892
tarball2 files changed+60-40
@@ -578,6 +578,7 @@ fn render_surface(state: &mut State, crtc: crtc::Handle, target: u64) -> bool {
578578
let animating = anim.active(now);579579
anim.prune(now);580580
let render_began = std::time::Instant::now();581
+ let cpu_began = thread_cpu_ns();581582
let mut queue_ns = 0;582583
match surface583584
.drm@@ -594,6 +595,7 @@ fn render_surface(state: &mut State, crtc: crtc::Handle, target: u64) -> bool {
594595
Ok(_) => {}595596
Err(e) => tracing::warn!("rendering failed: {e}"),596597
}598
+ let render_cpu_ns = thread_cpu_ns() - cpu_began;597599
let render_ns = render_began.elapsed().as_nanos() as u64 - queue_ns;598600
let took = began.elapsed().as_nanos() as u64;599601
surface.budget.record(took);@@ -603,6 +605,7 @@ fn render_surface(state: &mut State, crtc: crtc::Handle, target: u64) -> bool {
603605
took_ns = took,604606
scene_ns,605607
render_ns,608
+ render_cpu_ns,606609
queue_ns,607610
"slow frame"608611
);@@ -621,6 +624,15 @@ fn render_surface(state: &mut State, crtc: crtc::Handle, target: u64) -> bool {
621624
animating && !surface.queued622625
}623626
627
+/// CPU time this thread has used, to tell a render that works from one that628
+/// waits or is descheduled.629
+fn thread_cpu_ns() -> u64 {630
+ let t = smithay::reexports::rustix::time::clock_gettime(631
+ smithay::reexports::rustix::time::ClockId::ThreadCPUTime,632
+ );633
+ t.tv_sec as u64 * 1_000_000_000 + t.tv_nsec as u64634
+}635
+624636
fn on_input(state: &mut State, event: InputEvent<LibinputInputBackend>) {625637
match event {626638
InputEvent::Keyboard { event } => {@@ -1,43 +1,51 @@
1
- Finished `release` profile [optimized] target(s) in 0.06s1
+ Finished `release` profile [optimized] target(s) in 0.09s22
Running `target/release/monolith run --backend drm , vkcube`3
-2026-10-16T13:35:15.490106Z INFO monolith::drm: primary GPU path=/dev/dri/card14
-2026-10-16T13:35:15.730968Z INFO monolith::drm: output connected name="DP-2" w=2560 h=1440 refresh=1655
-2026-10-16T13:35:15.731044Z INFO monolith::ipc: control socket path=/run/user/1000/monolith-wayland-2.sock6
-2026-10-16T13:35:15.731056Z INFO monolith: monolith running socket="wayland-2" device="NVIDIA GeForce RTX 3060"7
-2026-10-16T13:35:15.731475Z INFO monolith::commands: spawned pid=349343 argv=[",", "vkcube"]8
-2026-10-16T13:35:15.752875Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=21319632 scene_ns=1670 render_ns=9734952 queue_ns=961819
-2026-10-16T13:35:15.753292Z DEBUG monolith::drm: frame rate output="DP-2" presented=1 vblanks=8518760 budget_us=233193
+2026-10-16T13:37:26.021991Z INFO monolith::drm: primary GPU path=/dev/dri/card14
+2026-10-16T13:37:26.301101Z INFO monolith::drm: output connected name="DP-2" w=2560 h=1440 refresh=1655
+2026-10-16T13:37:26.301182Z INFO monolith::ipc: control socket path=/run/user/1000/monolith-wayland-2.sock6
+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=1434229
+2026-10-16T13:37:26.336024Z DEBUG monolith::drm: frame rate output="DP-2" presented=1 vblanks=8540301 budget_us=302921010
Selected WSI platform: wayland1111
Selected GPU 0: NVIDIA GeForce RTX 3060, type: DiscreteGpu, apiVersion: 4211017 (1.4.329), driverVersion: -1797652352 (83.416.128) 12
-2026-10-16T13:35:16.450434Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=24230851 budget_ns=280304513
-2026-10-16T13:35:16.753596Z DEBUG monolith::drm: frame rate output="DP-2" presented=69 vblanks=165 budget_us=273814
-2026-10-16T13:35:17.753796Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=263215
-2026-10-16T13:35:18.754050Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=244916
-2026-10-16T13:35:19.754328Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=223617
-2026-10-16T13:35:19.790784Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6078851 budget_ns=275552518
-2026-10-16T13:35:20.754562Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=164 budget_us=255219
-2026-10-16T13:35:21.754869Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=261520
-2026-10-16T13:35:22.372840Z DEBUG monolith::input: bind cmd=Fullscreen21
-2026-10-16T13:35:22.449190Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=6973660 scene_ns=4561 render_ns=6779016 queue_ns=18812322
-2026-10-16T13:35:22.452000Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=30322255 budget_ns=293855723
-2026-10-16T13:35:22.470172Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6065851 budget_ns=343755724
-2026-10-16T13:35:22.506619Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=3565205 scene_ns=4030 render_ns=3479754 queue_ns=7891125
-2026-10-16T13:35:22.512598Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6056851 budget_ns=353812226
-2026-10-16T13:35:22.755071Z DEBUG monolith::drm: frame rate output="DP-2" presented=154 vblanks=164 budget_us=338227
-2026-10-16T13:35:23.755325Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=313728
-2026-10-16T13:35:24.755593Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=299829
-2026-10-16T13:35:25.755884Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=277130
-2026-10-16T13:35:26.756094Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=260131
-2026-10-16T13:35:27.756410Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=246732
-2026-10-16T13:35:28.726318Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6060851 budget_ns=282207933
-2026-10-16T13:35:28.756635Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=164 budget_us=289634
-2026-10-16T13:35:29.756859Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=256335
-2026-10-16T13:35:30.757118Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=240136
-2026-10-16T13:35:31.757402Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=236337
-2026-10-16T13:35:32.757640Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=212438
-2026-10-16T13:35:33.757961Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=193139
-2026-10-16T13:35:34.758162Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=177340
-2026-10-16T13:35:34.940003Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6042851 budget_ns=228245941
-2026-10-16T13:35:35.758521Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=234842
-2026-10-16T13:35:36.758685Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=196043
-2026-10-16T13:35:37.231640Z DEBUG monolith::input: bind cmd=Quit12
+2026-10-16T13:37:27.148355Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6065404 budget_ns=285570713
+2026-10-16T13:37:27.336255Z DEBUG monolith::drm: frame rate output="DP-2" presented=62 vblanks=164 budget_us=287114
+2026-10-16T13:37:28.088426Z DEBUG monolith::input: bind cmd=Fullscreen15
+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=23325416
+2026-10-16T13:37:28.197103Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=42442808 budget_ns=325235417
+2026-10-16T13:37:28.336509Z DEBUG monolith::drm: frame rate output="DP-2" presented=151 vblanks=165 budget_us=331318
+2026-10-16T13:37:29.336770Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=316919
+2026-10-16T13:37:30.337026Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=337120
+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=5719121
+2026-10-16T13:37:30.500748Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6094851 budget_ns=343098022
+2026-10-16T13:37:31.337282Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=331423
+2026-10-16T13:37:32.337537Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=319724
+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=16440325
+2026-10-16T13:37:33.161992Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6064851 budget_ns=334958926
+2026-10-16T13:37:33.337799Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=329527
+2026-10-16T13:37:34.338051Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=344128
+2026-10-16T13:37:35.338354Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=343229
+2026-10-16T13:37:36.338593Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=336730
+2026-10-16T13:37:37.338902Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=319431
+2026-10-16T13:37:38.339072Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=337432
+2026-10-16T13:37:39.339326Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=329133
+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=12131234
+2026-10-16T13:37:39.375734Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6081851 budget_ns=329162835
+2026-10-16T13:37:40.339587Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=333636
+2026-10-16T13:37:41.339871Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=323637
+2026-10-16T13:37:42.340096Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=333538
+2026-10-16T13:37:43.340353Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=340639
+2026-10-16T13:37:44.340610Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=344040
+2026-10-16T13:37:45.340866Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=341541
+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=14814342
+2026-10-16T13:37:46.341122Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=340143
+2026-10-16T13:37:47.341427Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=332844
+2026-10-16T13:37:48.341697Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=335845
+2026-10-16T13:37:49.341925Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=165 budget_us=342146
+2026-10-16T13:37:50.342193Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=333247
+2026-10-16T13:37:51.342403Z DEBUG monolith::drm: frame rate output="DP-2" presented=165 vblanks=164 budget_us=326348
+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=27785549
+2026-10-16T13:37:51.797115Z DEBUG monolith::drm: frame missed its vblank output="DP-2" late_ns=6074851 budget_ns=328310850
+2026-10-16T13:37:52.342659Z DEBUG monolith::drm: frame rate output="DP-2" presented=164 vblanks=165 budget_us=332551
+2026-10-16T13:37:53.185148Z DEBUG monolith::input: bind cmd=Quit