DPMS Off seems to trigger duplicated PresentCompleteNotify
I have a program that calls PresentNotifyMsc every frame to receive CompleteNotify for that frame. If the screen turns off while the program is running, the program sometimes receives duplicated CompleteNotify.
Here is an example trace:
1671051426.525 000:<:1148: 40: Present-Request(147,2): NotifyMSC window=0x000000a0 serial=0 target_msc=10110327 divisor=0 remainder=0
1671051426.541 000:>:1148: Event Generic(35) Present(147) CompleteNotify(1) kind=NotifyMSC(0x01) mode=Copy(0x00) event=0x03c00264 window=0x000000a0 serial=0 ust=198368549434 msc=10110327
1671051426.541 000:<:1149: 40: Present-Request(147,2): NotifyMSC window=0x000000a0 serial=0 target_msc=10110328 divisor=0 remainder=0
1671051426.775 000:>:1149: Event Generic(35) Present(147) CompleteNotify(1) kind=NotifyMSC(0x01) mode=Copy(0x00) event=0x03c00264 window=0x000000a0 serial=0 ust=198368549434 msc=10110327
Note that CompleteNotify with msc=10110327 was received twice. Curiously, the second one was arriving very late (230ms after the NotifyMsc request), the frame rate was 60fps.
This is not conformant w.r.t. the spec, which says
If 'target-msc' is greater than the current msc for 'window', the event will be delivered at (or after) the 'target-msc' field.