Вопрос

I'm noticing some artifacts when I watch full-screen videos on macOS with Night Shift enabled, and I suspect they are caused by hardware, because they disappear whenever an overlay appears over a full-screen video.

So, I was wondering, is there any way to disable hardware acceleration for Night Shift? And, if not, then is there any other application I can use that would perform the same function, but without taking advantage of hardware acceleration? (maybe an old version of f.lux or something else?)

Это было полезно?

Решение

Since the artifacts disappear whenever an overlay appears, I solved the issue by creating an app that displays a persistent, invisible overlay:

  1. Created a new macOS Cocoa App in Xcode.
  2. Edited the window properties in MainMenu.xib, in the attributes inspector, and unchecked "Title Bar", "Shadow", "Close", "Minimize" and "Resize", then in the size inspector I set content size width and height to 1, and initial position x and y to 0.
  3. Edited Info.plist and added a new property "Application is agent (UIElement)" set to YES.
  4. Edited AppDelegate.swift and changed applicationDidFinishLaunching to:

    window.isOpaque = false
    window.alphaValue = 0
    window.ignoresMouseEvents = true
    window.level = .floating
    window.collectionBehavior = [.canJoinAllSpaces, .transient]
    
  5. Compiled the app for production with Product 🢒 Archive 🢒 Distribute App 🢒 Copy App.

Now, whenever I want to watch full-screen videos with Night Shift turned on, I can start the application and there won't be any further artifacts. I can then close it from Activity Monitor. Another option would be to have it run at startup (System Preferences 🢒 Users & Groups 🢒 Login Items).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с apple.stackexchange
scroll top