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.
Allow syncing SMC keys like sensors reading and battery conservation mode.
Based on acidanthera/VirtualSMC
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
.
Variant | IdeaSMC | IdeaSMC (Game Zone) | DYSMC |
---|---|---|---|
Fan reading | Need testing | ✅ | ✅ |
Fan control | ☑️ | TBD | TBD |
Sensor reading | Generic | ✅ | ✅ |
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)
WMIS
Sensor reading, checkSSDT-WMIS.dsl
inSSDTSample
if the system is affectedWMIV
Event driver, see DYVPC
GZFD
Game Zone control center, see header for available functionsWBAT
Extra battery information (requires patching related methods like battery ones)WMI2
Fn+esc (obsolete paper looking function), currently assigned to Fn mode toggleWMIS
Fn+S (super resolution function), currently assigned to Fn mode toggleWMIY
(AMW1
) Yoga Mode detection and disabling keyboard/touchpad when flipped
Based on lenovo/thinklmi (iksaif/thinkpad-wmi)
Intercepting events on vendor-specific Virtual Power Controller (VPC) devices and sync states, some instructions are on project boards.
Currently available functions:
- EC reading
- DYTC setting (available for idea/think, might need appropriate OS version for XOSI)
- Automatic backlight and LED control
- Clamshell mode (need additional patch on
_LID
likeSSDT-RCSM.dsl
inSSDTSample
)
Variant | IdeaVPC | ThinkVPC | YogaHIDD | DYSMC |
---|---|---|---|---|
_HID |
VPC2004 |
LEN0268 LEN0068 |
INT33D5 INTC1051 |
(WMIV ) |
Reference | ideapad-laptop | thinkpad_acpi | intel-hid | hp-wmi |
Hotkey polling | ✅ | ✅ | ✅ | ☑️ |
Conservation mode | ✅ | ✅ | N/A | TBD |
Battery threshold | Not supported | ✅ | N/A | TBD |
Charging control | Need testing | Need testing | N/A | TBD |
DYTC | ✅ | ✅ | N/A | N/A |
Fan reading | Need testing | ✅ | N/A | SMC |
Fan control | Need testing | ✅ | N/A | TBD |
Fn lock mode | ✅ | Native | N/A | TBD |
LED control | Not supported | ✅ | N/A | TBD |
Keyboard backlight | ✅ | ✅ | N/A | TBD |
When Rehabman's battery patching method RE1B
RECB
present (or SSDT-ECRW.dsl
in SSDTSample
), desired EC fields can be read using following commands:
- One byte at specific offset:
ioio -s YogaVPC ReadECOffset 0xA4
for field at offset0xA4
- Bulk reading:
ioio -s YogaVPC ReadECOffset 0x1006
for0x10
bytes at offset0x06
(add total bytes to read before offset) - Dump whole EC area:
ioio -s YogaVPC ReadECOffset 0x10000
- Known EC field name:
ioio -s YogaVPC ReadECName B1CY
(no larger than 1 byte due to OS constraint)
The preference pane provides a graphical user interface for basic information and settings, such as battery conservation mode and backlight.
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.
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.
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.
- Copy latest debug version of Lilu.kext and VirtualSMC.kext into the folder
git clone --depth 1 https://github.com/acidanthera/MacKernelSDK
- In Xcode, Select build target on upper left and click the button on the left
- Apple for macOS
- Linux for ideapad-laptop and thinkpad-acpi kernel module
- RehabMan for OS-X-Voodoo-PS2-Controller, OS-X-ACPI-Debug, OS-X-ioio and DSDT patches
- vit9696 for VirtualSMC
- the-darkvoid for macOS-IOElectrify
- pali for bmfdec
- benbender, 1Revenger1 and other contributors for testing and feedback