     override init?(frame: NSRect, isPreview: Bool)
     {
         super.init(frame: frame, isPreview: isPreview)
-        device = selectMetalDevice(preferLowPower: true) // TODO: make low power preference a user default?
+        device = selectMetalDevice()
         wantsLayer = true;
     }
 

        CVDisplayLinkStop(displayLink!)
    }

    private func selectMetalDevice(preferLowPower: Bool) -> MTLDevice
    {
        var device: MTLDevice?
        if !preferLowPower {
            device = MTLCreateSystemDefaultDevice()!
        } else {
            for d in MTLCopyAllDevices() {
                device = d
                if d.isLowPower && !d.isHeadless {
                    break
                }
            }
        }
        if let name = device?.name {
            NSLog("Using device '\(name)'")
        } else {
            NSLog("No or unknown device")
        }
        return device! // TODO: can we assume there will always be a device?
    }




import ScreenSaver
import Metal
import IOKit.ps

class MetalScreenSaverView : ScreenSaverView
{
