# YogaSMC ![CI](https://github.com/zhen-zen/YogaSMC/workflows/CI/badge.svg) [![Join the chat at https://gitter.im/YogaSMC/community](https://badges.gitter.im/YogaSMC/community.svg)](https://gitter.im/YogaSMC/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
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](https://github.com/RehabMan/OS-X-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](https://github.com/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`.
| Variant | IdeaSMC | IdeaSMC (Game Zone) | DYSMC |
| ---- | ---- | ---- | ---- |
| Fan reading | Need testing | ✅ | ✅ |
| Fan control | ☑️ | TBD | TBD |
| Sensor reading | Generic | ✅ | ✅ |
## 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](https://github.com/al3xtjames/ThunderboltPkg) instead.)
Based on [the-darkvoid/macOS-IOElectrify](https://github.com/the-darkvoid/macOS-IOElectrify/) ([Dolnor/IOWMIFamily](https://github.com/Dolnor/IOWMIFamily/)) and [bmfparser](https://github.com/zhen-zen/bmfparser) ([pali/bmfdec](https://github.com/pali/bmfdec))
### DYWMI
- `WMIS` Sensor reading, check `SSDT-WMIS.dsl` in `SSDTSample` if the system is affected
- `WMIV` Event driver, see DYVPC
### IdeaWMI
- `GZFD` Game Zone control center, see header for available functions
- `WBAT` Extra battery information (requires patching related methods like battery ones)
- `WMI2` Fn+esc (obsolete paper looking function), currently assigned to Fn mode toggle
- `WMIS` Fn+S (super resolution function), currently assigned to Fn mode toggle
- `WMIY` (`AMW1`) Yoga Mode detection and disabling keyboard/touchpad when flipped
### ThinkWMI (WIP)
~~Based on [lenovo/thinklmi](https://github.com/lenovo/thinklmi) ([iksaif/thinkpad-wmi](https://github.com/iksaif/thinkpad-wmi))~~
## YogaVPC
Intercepting events on vendor-specific Virtual Power Controller (VPC) devices and sync states, some instructions are on [project boards](https://github.com/zhen-zen/YogaSMC/projects/).
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` like `SSDT-RCSM.dsl` in `SSDTSample`)
| Variant | IdeaVPC | ThinkVPC | YogaHIDD | DYSMC |
| ---- | ---- | ---- | ---- | ---- |
| `_HID` | `VPC2004` | `LEN0268`<br>`LEN0068` | `INT33D5`<br>`INTC1051` | (`WMIV`) |
| Reference | [ideapad-laptop](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/ideapad-laptop.c) | [thinkpad_acpi](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/thinkpad_acpi.c) | [intel-hid](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/intel-hid.c) | [hp-wmi](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/hp-wmi.c) |
| 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 |
### EC reading:
When [Rehabman's](https://www.tonymacx86.com/threads/guide-how-to-patch-dsdt-for-working-battery-status.116102/) 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 offset `0xA4`
- Bulk reading: `ioio -s YogaVPC ReadECOffset 0x1006` for `0x10` bytes at offset `0x06` (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)
## 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](https://github.com/zhen-zen/YogaSMC/pull/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](https://github.com/zhen-zen/YogaSMC/commit/be295dad333866cf23466d7e068354bc4c1f02ea) 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](https://github.com/1Revenger1/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](https://github.com/acidanthera/Lilu/releases/latest) and [VirtualSMC.kext](https://github.com/acidanthera/VirtualSMC/releases/latest) 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
- [Apple](https://www.apple.com) for macOS
- [Linux](https://www.linux.org) for [ideapad-laptop](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/ideapad-laptop.c) and [thinkpad-acpi](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/thinkpad_acpi.c) kernel module
- [RehabMan](https://github.com/RehabMan) for [OS-X-Voodoo-PS2-Controller](https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller), [OS-X-ACPI-Debug](https://github.com/RehabMan/OS-X-ACPI-Debug), [OS-X-ioio](https://github.com/RehabMan/OS-X-ioio) and DSDT patches
- [vit9696](https://github.com/vit9696) for [VirtualSMC](https://github.com/acidanthera/VirtualSMC)
- [the-darkvoid](https://github.com/the-darkvoid) for [macOS-IOElectrify](https://github.com/the-darkvoid/macOS-IOElectrify)
- [pali](https://github.com/pali) for [bmfdec](https://github.com/pali/bmfdec)
- [benbender](https://github.com/benbender), [1Revenger1](https://github.com/1Revenger1) and other contributors for testing and feedback
没有合适的资源?快使用搜索试试~ 我知道了~
OEM硬件的 ACPI 驱动程序_C++_代码_相关文件_下载
共111个文件
pdf:23个
cpp:17个
hpp:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 171 浏览量
2022-07-05
12:45:26
上传
评论
收藏 434KB ZIP 举报
温馨提示
该驱动程序由 YogaSMC、YogaWMI 和 YogaVPC 组成。 每个组件都可以针对不同的目标派生。目前支持 ThinkPad 和 IdeaPad 系列(所有其他消费品牌)。对通用 Intel HID 事件和 5 按钮阵列的支持,以及 HP 系统(笔记本电脑和台式机,需要 vanilla EC)是实验性的。 可以使用ioio向驱动程序发送命令,例如ioio -s IdeaVPC ConservationMode true。 驱动程序将更新 ioreg 中的状态,而详细信息可在系统日志中找到,例如log stream --predicate 'senderImagePath contains "YogaSMC"'. 配套用户空间应用程序、YogaSMCPane 和 YogaSMCNC 也可用于 GUI 配置和通知服务。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
OEM硬件的 ACPI 驱动程序_C++_代码_相关文件_下载
(111个子文件)
bmfdec.c 8KB
ThinkVPC.cpp 34KB
IdeaVPC.cpp 31KB
bmfparser.cpp 24KB
YogaVPC.cpp 24KB
WMI.cpp 13KB
IdeaWMI.cpp 11KB
YogaHIDD.cpp 10KB
YogaBaseService.cpp 10KB
DYSMC.cpp 8KB
DYVPC.cpp 8KB
YogaSMCUserClient.cpp 8KB
YogaSMC.cpp 7KB
DYWMI.cpp 6KB
YogaWMI.cpp 4KB
IdeaSMC.cpp 4KB
ThinkSMC.cpp 3KB
KeyImplementations.cpp 2KB
SSDT-THINK.dsl 2KB
SSDT-ECRW.dsl 2KB
SSDT-RCSM.dsl 1KB
SSDT-WMIS.dsl 726B
SSDT-YVPC.dsl 289B
YogaSMCNC.entitlements 252B
.gitignore 81B
ThinkEvents.h 5KB
message.h 4KB
DYTC.h 4KB
WMI.h 3KB
common.h 3KB
OSDManager.h 1KB
OSDUIHelperProtocol.h 897B
YogaSMC-Bridging-Header.h 838B
YogaSMCUserClient.h 734B
ThinkVPC.hpp 11KB
IdeaVPC.hpp 9KB
IdeaWMI.hpp 7KB
YogaVPC.hpp 7KB
DYVPC.hpp 7KB
KeyImplementations.hpp 6KB
YogaBaseService.hpp 4KB
YogaHIDD.hpp 3KB
YogaSMC.hpp 2KB
DYWMI.hpp 2KB
bmfparser.hpp 2KB
DYSMC.hpp 2KB
YogaWMI.hpp 2KB
YogaSMCUserClientPrivate.hpp 1KB
IdeaSMC.hpp 818B
ThinkSMC.hpp 581B
Contents.json 904B
Contents.json 123B
Contents.json 63B
LICENSE 18KB
Changelog.md 7KB
README.md 8KB
project.pbxproj 83KB
KeyboardOff.pdf 3KB
Antenna.pdf 2KB
Keyboard.pdf 2KB
Camera.pdf 2KB
MicOff.pdf 2KB
Mic.pdf 2KB
FunctionKeyOff.pdf 2KB
SecondDisplay.pdf 2KB
FunctionKeyOn.pdf 2KB
Undock.pdf 1KB
Dock.pdf 1KB
CapslockOff.pdf 1KB
AirplaneMode.pdf 1KB
BacklightLow.pdf 1KB
BacklightHigh.pdf 1KB
Sleep.pdf 1KB
Star.pdf 1KB
FunctionKey.pdf 1KB
Bluetooth.pdf 1KB
Wifi.pdf 1KB
CapslockOn.pdf 1KB
BacklightOff.pdf 912B
WifiOff.pdf 911B
Info.plist 6KB
Alter-Info.plist 4KB
Info.plist 1KB
Info.plist 1KB
Info.plist 1KB
DualFan.png 145KB
General.png 119KB
Resources 26B
Main.storyboard 3KB
Localizable.strings 2KB
AppDelegate.swift 14KB
Configuration.swift 11KB
AudioHelper.swift 10KB
NotificationHandler.swift 8KB
ThinkFanHelper.swift 8KB
GeneralSMCPane.swift 7KB
YogaSMCPane.swift 6KB
ThinkSMCPane.swift 6KB
DateHelper.swift 6KB
SystemPreferences.swift 6KB
共 111 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功