To cut a long, arduous adventure short, between Apple’s IOKit documentation and various pages in their open-source documentation, I was able to piece together enough information to reliably perform certain rotation operations consistently (albeit only by introducing many other bugs interfering with display configurations I’d already nailed down, particularly screen mirroring). Thus began my journey to discover what this function actually did, how it did so, and how I could manipulate it. Eventually, I stumbled across fb-rotate, which uses an IOKit function called IOServiceRequestProbe to rotate displays. I played around with this library for a bit, and after a little experimentation, I found ways to do simple things like flip a display’s screen upside down (though issues persisted like the mouse continuing to function right-side-up) with IOServiceRequestProbe. At wit’s end, I searched GitHub for many combinations of the keywords “rotate”, “iokit”, “quartz”, and “coregraphics”. I began with rather little to go on - while Quartz does have a way to check a display’s rotation, it cannot change it in IOKit’s case, there is no widely circulated public documentation (that I could find, at least) that details rotation functionality. My process for implementing the rotation feature into Display Manager was very much a microcosm of the whole project. Once I’d explored and tested my way to a sufficient understanding of these frameworks (and how the old Display Manager harnessed them), I began fleshing out the Display Manager Library, extending the built-in Quartz and CoreFoundation Python modules with PyObjC (which can reference Objective-C functions and variables directly from the files they “live in”). I began by reorganizing the features that “worked” into display_manager_lib.py, and educating myself about Apple’s Quartz Display Services (a branch of CoreGraphics) and IOKit frameworks, along with Objective-C (the language they’re written in). I started with Pierce Darragh’s “Display Manager” v0.10.0 ( Display Manager v0.10.0), and was tasked with updating several of its deprecated features, along with adding several of my own. This is my first project as a Junior System Administrator in the University of Utah Mac Group, and I’ve learned a great deal about Apple’s display-related frameworks in the course of completing it. Below, I’ll discuss how I found which of Apple’s frameworks to manipulate to manage Mac displays, how I used Hopper Disassembler to explore how others used those frameworks, and how I’ve utilized exploratory testing throughout the project. This blog post outlines my process in rebuilding and updating Display Manager’s codebase. Display Manager works in a 2-part package: a library that actually controls Mac displays ( display_manager_lib.py), and a script that allows access via the command line, and executes commands in a non-interfering way ( display_manager.py). It’s primarily intended for Mac sys admins and developers who need to control displays in specific, predictable ways. NET (26) Robotics (26) In-vehicle (25) UI (24) JavaScript (24) Metashape (24) Image processing (23) Cyber security (23) Support (23) Photogrammetry (23) Deepearning (22) TO DEAL (22) Measuring instrument (21) AI (21) Python (21) Next-generation sequencer (20) ROS (19) 3D model (19) Test tool (19) MATLAB (18) Web development / production (17) programming (17) Image analysis / image inspection (17) Visualization (17) Raspberry Pi (17) Deep learning (17) GIS (16) CAE (16) modeling (16) Educational robot (16) ア ニ メ ー シ ョ ン (16) Structural analysis (15) protocol (15) Library (15) Mobile robot (15) Drone (15) chart (15) ToF (15) Arduino (15) Mech robot (14) Motion capture (14) material (14) Education (14) SLAM (14) 写真 (14) (I.e.Display Manager is a tool that allows users to programmatically manage Mac display settings like resolution, refresh rate, rotation, brightness, screen mirroring, and HDMI underscan. VR (42) 3D camera (39) Analysis tool (38) RealSense (37) Statistical analysis (36) SBC (36) Robot arm (35) Small SBC (35) Machine learning (machine learning) (33) Video / Video (32) Depth camera (32) Spectrum (32) instrumentation (31) simulation (31) IoT (27) AR (26).
0 Comments
Leave a Reply. |