{"id":323,"date":"2020-12-13T15:39:24","date_gmt":"2020-12-13T19:39:24","guid":{"rendered":"http:\/\/blog.labhackers.com\/?p=323"},"modified":"2020-12-13T15:39:24","modified_gmt":"2020-12-13T19:39:24","slug":"macos-display-timing","status":"publish","type":"post","link":"https:\/\/blog.labhackers.com\/?p=323","title":{"rendered":"macOS Display Timing"},"content":{"rendered":"\n<p><sup>Originally posted on March 25th, 2019.<\/sup><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"513\" height=\"422\" src=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macos10.9.5vs10.13.5.jpg\" alt=\"\" class=\"wp-image-423\" srcset=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macos10.9.5vs10.13.5.jpg 513w, https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macos10.9.5vs10.13.5-300x247.jpg 300w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/figure><\/div>\n\n\n\n<p>There has been<a href=\"https:\/\/github.com\/psychopy\/psychopy\/issues\/2250#issuecomment-459711677\">\u00a0at least one report<\/a>\u00a0of macOS 10.13 \/ 10.14 adding an extra one frame delay to graphics update times, causing experiment software graphics update times to be off by one retrace.<\/p>\n\n\n\n<p>We used the&nbsp;<a href=\"https:\/\/www.labhackers.com\/millikey.html\">MilliKey DeLux<\/a>&nbsp;light sensor to look into this further by testings the display change timing of a macmini running either macOS 10.9.5 or 10.13.6 connected to an LCD display. Sure enough, it looks like sometime between macOS 10.9.5 and macOS 10.13.6 an extra one frame delay has been added to the operating systems graphics pipeline.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"403\" src=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-vs-10.13.6-Display-Update-Delay-1.png\" alt=\"\" class=\"wp-image-403\" srcset=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-vs-10.13.6-Display-Update-Delay-1.png 600w, https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-vs-10.13.6-Display-Update-Delay-1-300x202.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Procedure<\/h2>\n\n\n\n<p>The computer monitor and test script were the same as was used in the<a href=\"http:\/\/blog.labhackers.com\/?p=351\" target=\"_blank\" rel=\"noreferrer noopener\">\u00a0Windows 10 Display Timing post<\/a>. Unless otherwise stated, this test used the same procedure as that post.<\/p>\n\n\n\n<p>In this test we used was an Apple macmini (late 2011 model) connected to a SyncMaster P2770 LCD monitor. The stated response time of the SyncMaster P2770 is 1 msec, which probably means it is closer to 2 msec peak to peak.<\/p>\n\n\n\n<p>The same test script was run on the same hardware while booted into either macOS 10.9.5 or macOS 10.13.6. The time difference between receiving the DeLux USB serial trigger event and the time reported from the win.flip() for each dark-light transition was calculated, subtracting the 7 msec offset the DeLux was configured to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Results<\/h2>\n\n\n\n<p>USB serial events sent by the&nbsp;<a href=\"https:\/\/www.labhackers.com\/millikey.html\">MilliKey DeLux<\/a>&nbsp;will add an average of 0.5 msec to these display change delay results. This has not been corrected for in the following plots.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">macOS 10.9.5<\/h3>\n\n\n\n<p>While using macOS 10.9.5 we observed an expected \/ reasonable display update delay for the LCD monitor being tested.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"371\" src=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-Display-Update-Delay.png\" alt=\"\" class=\"wp-image-405\" srcset=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-Display-Update-Delay.png 600w, https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-Display-Update-Delay-300x186.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">macOS 10.13.6<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"371\" src=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.13.6-Display-Update-Delay.png\" alt=\"\" class=\"wp-image-406\" srcset=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.13.6-Display-Update-Delay.png 600w, https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.13.6-Display-Update-Delay-300x186.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>Results show a consistent 1 frame delay in macOS 10.13.6 display updates as compared to macOS 10.9.5.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"403\" src=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-vs-10.13.6-Display-Update-Delay-2.png\" alt=\"\" class=\"wp-image-407\" srcset=\"https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-vs-10.13.6-Display-Update-Delay-2.png 600w, https:\/\/blog.labhackers.com\/wp-content\/uploads\/2020\/12\/macOS-10.9.5-vs-10.13.6-Display-Update-Delay-2-300x202.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Using a MilliKey DeLux light sensor we have been able to show that there does seem to be an extra<em>&nbsp;frame delay in display update timing<\/em>&nbsp;on macOS 10.13.6 (or higher&nbsp;<em>presumably<\/em>) that does not exist in macOS 10.9.5. This adds an extra one retrace delay to any screen update times calculated by the experiment. This means visual stimulus&nbsp;<em>duration&nbsp;<\/em>should still be accurate, however<em>&nbsp;onset and offset times<\/em>&nbsp;should both be corrected for the extra delay.<\/p>\n\n\n\n<p>If anyone is aware of a way to fix this issue on macOS 10.13+, please let us know.<\/p>\n\n\n\n<p>Happy Hacking!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Originally posted on March 25th, 2019. There has been\u00a0at least one report\u00a0of macOS 10.13 \/ 10.14 adding an extra one frame delay to graphics update times, causing experiment software graphics update times to be off by one retrace. We used the&nbsp;MilliKey DeLux&nbsp;light sensor to look into this further by testings the display change timing of&hellip; <a class=\"more-link\" href=\"https:\/\/blog.labhackers.com\/?p=323\">Continue reading <span class=\"screen-reader-text\">macOS Display Timing<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[19,20],"tags":[21,24,25,18,10,14],"class_list":["post-323","post","type-post","status-publish","format-standard","hentry","category-display-timing","category-millikey-delux-light-sensor","tag-display","tag-macos","tag-millikey-delux","tag-psychopy","tag-python","tag-timing","entry"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=\/wp\/v2\/posts\/323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=323"}],"version-history":[{"count":6,"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":424,"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=\/wp\/v2\/posts\/323\/revisions\/424"}],"wp:attachment":[{"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.labhackers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}