Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IODisplayConnect is gone in Big Sur of Apple Silicon, what is the replacement?

Tags:

macos

I have two Big Sur laptops, one is Intel and other is M1(MacBook Pro M1), when I run command "ioreg | grep -i iodisplayconnect", the Intel one still has it, but M1 system found nothing, anyone know its replacement in M1 Big Sur? I need it to detect display names

like image 296
Steven Avatar asked Dec 04 '20 20:12

Steven


People also ask

How do I reinstall OSX on Apple silicon?

Reinstall macOS Make sure you're connected to the internet. In the Recovery app, click Reinstall macOS Monterey, then click Continue. Important: In the pane where you select a disk, select your current macOS disk (in most cases, it's the only one available). Follow the onscreen instructions.

How do you access macOS recovery on a Mac with Apple silicon?

To use macOS Recovery on an Intel-based Mac, hold down Command (⌘)-R on your keyboard immediately after restarting your Mac or immediately after your Mac begins to restart. Continue holding the keys down until you see the Apple logo or a spinning globe. Startup is complete when you see the utilities window.

Is Big Sur Apple silicon?

macOS Big Sur 11.3MDM can now install and manage iOS apps on Mac computers with Apple silicon.

How do I enable kernel extensions on Mac M1?

To enable system extensions, you need to modify the security settings in the Recovery environment. To do this, shut down your system. Then press and hold the Touch ID or power button to launch Startup Security Utility. In Startup Security Utility, enable kernel extensions from the Security Policy button.

What is Apple Big Sur and how does it work?

macOS Big Sur builds on Apple’s industry-leading approach to privacy with greater transparency and user control. With Big Sur, Apple’s community of more than 28 million developers have access to the tools they need to create amazing experiences for iOS, iPadOS, macOS, watchOS, and tvOS.

Do you need to modify your code to support Apple Silicon?

If you rely on hardware-specific details or make assumptions about low-level features, modify your code as needed to support Apple silicon. Getting the best performance on Apple silicon sometimes requires making adjustments to the way you use hardware resources.

What is new in macOS Big Sur?

macOS Big Sur includes a beautiful new design and improvements to Safari, Messages, Maps, and more. macOS Big Sur, the latest version of the world’s most advanced desktop operating system, is now available to Mac users as a free software update.

How can I get the best performance on Apple Silicon?

Getting the best performance on Apple silicon sometimes requires making adjustments to the way you use hardware resources. Minimize your dependence on the hardware by using higher-level technologies whenever possible. For example, use Grand Central Dispatch instead of creating and managing threads yourself.


Video Answer


1 Answers

I had the same question, but I was looking for IODisplayConnect for the purposes of reading the display brightness.

On a M1 Mac with Big Sur, I found the easiest way to get the brightness info is by running corebrightnessdiag:

$ /usr/libexec/corebrightnessdiag status-info | grep 'DisplayServicesBrightness '
                DisplayServicesBrightness = "0.9302966";

To get and set brightness from code, you can use private APIs from the DisplayServices framework (/System/Library/PrivateFrameworks/DisplayServices.framework):

extern int DisplayServicesGetBrightness(int display, float *brightness);
extern int DisplayServicesSetBrightness(int display, float brightness);

// Change brightness
float brightness = 0.8;
int err = DisplayServicesSetBrightness(1, brightness);

// Get current brightness
err = DisplayServicesGetBrightness(1, &brightness);
like image 78
jtbandes Avatar answered Nov 15 '22 05:11

jtbandes