Home

Awesome

YogaSMC CI Join the chat at https://gitter.im/YogaSMC/community

This driver consists of YogaSMC, YogaWMI and YogaVPC.

Each component can be derived for different targets. Currently ThinkPad and IdeaPad series (all other consumer brands) are supported. Support for generic Intel HID event & 5 button array, and HP system (both laptop and desktop, requires vanilla EC) is experimental.

Command to driver can be sent with ioio, e.g. ioio -s IdeaVPC ConservationMode true.

The driver will update the status in ioreg, while details are available in system log, e.g. log stream --predicate 'senderImagePath contains "YogaSMC"'.

Companion userspace apps, YogaSMCPane and YogaSMCNC are also available with GUI configuration and notification service.

YogaSMC

Allow syncing SMC keys like sensors reading and battery conservation mode.

Based on acidanthera/VirtualSMC

Customized sensor reading

The EC field name for corresponding SMC key is read from Info.plist. If there's no FieldUnit object at desired offset, you can add an OperationRegion like SSDT-THINK.dsl in SSDTSample.

VariantIdeaSMCIdeaSMC (Game Zone)DYSMC
Fan readingNeed testing
Fan control☑️TBDTBD
Sensor readingGeneric

YogaWMI

Support for parsing WMI devices and properties. On some devices, it could act as YogaVPC with access to extensive device control method.

(For Thunderbolt WMI interface, see al3xtjames/ThunderboltPkg instead.)

Based on the-darkvoid/macOS-IOElectrify (Dolnor/IOWMIFamily) and bmfparser (pali/bmfdec)

DYWMI

IdeaWMI

ThinkWMI (WIP)

Based on lenovo/thinklmi (iksaif/thinkpad-wmi)

YogaVPC

Intercepting events on vendor-specific Virtual Power Controller (VPC) devices and sync states, some instructions are on project boards.

Currently available functions:

VariantIdeaVPCThinkVPCYogaHIDDDYSMC
_HIDVPC2004LEN0268<br>LEN0068INT33D5<br>INTC1051(WMIV)
Referenceideapad-laptopthinkpad_acpiintel-hidhp-wmi
Hotkey polling☑️
Conservation modeN/ATBD
Battery thresholdNot supportedN/ATBD
Charging controlNeed testingNeed testingN/ATBD
DYTCN/AN/A
Fan readingNeed testingN/ASMC
Fan controlNeed testingN/ATBD
Fn lock modeNativeN/ATBD
LED controlNot supportedN/ATBD
Keyboard backlightN/ATBD

EC reading:

When Rehabman's battery patching method RE1B RECB present (or SSDT-ECRW.dsl in SSDTSample), desired EC fields can be read using following commands:

YogaSMCPane

The preference pane provides a graphical user interface for basic information and settings, such as battery conservation mode and backlight.

<img src="YogaSMCPane/General.png" width="668" height="420">

YogaSMCNC

The notification application receives EC events and displays them on OSD. Corresonding actions will also be triggered for function keys. The configuration can be customized at ~/Library/Preferences/org.zhen.YogaSMC.plist after closing the app.

<img src="YogaSMCNC/DualFan.png" width="301" height="372">

Only a few models support dual fan reading and control, which could be enabled manually via debug prefpane or SecondThinkFan in preference plist.

For unknown events in preset, feel free to submit a PR like #40.

If you want to add new actions, the easiest approach is to use the script action and fill the AppleScript in option field. be295da is a good example to add it as a built-in action, which may be replaced with native one later.

Installation

The kext should work out-of-the-box. If you have modified _QXX methods before, please remove the patches.

Some features may rely on methods accessing EC, please consider ECEnabler for EC fields larger than 8-bits.

The YogaSMCAlter.kext is a variant without SMC keys support and the dependencies of Lilu and VirtualSMC. It's designed for quick loading / unloading without reboot when debugging.

Building

  1. Copy latest debug version of Lilu.kext and VirtualSMC.kext into the folder
  2. git clone --depth 1 https://github.com/acidanthera/MacKernelSDK
  3. In Xcode, Select build target on upper left and click the button on the left

Credits