Skip to content

Instantly share code, notes, and snippets.

@rockavoldy
Last active October 30, 2022 16:37
Show Gist options
  • Save rockavoldy/eeff232c932bf3eaa01b47c4d9253dd3 to your computer and use it in GitHub Desktop.
Save rockavoldy/eeff232c932bf3eaa01b47c4d9253dd3 to your computer and use it in GitHub Desktop.
(Maybe) better approach to get rid from rename _OSI to XOSI

SSDT-OSYS

This is (another) Windows spoofing patch to activate I2C over HID device for VoodooI2C work. The main different between _OSI to XOSI and SSDT-OSYS is this patch will be set global, so there is a chance to break your working trackpad as some laptop have more than one pointing devices in your DSDT and all of them will be activated and make VoodooI2C attached to wrong I2C Device.

DefinitionBlock ("", "SSDT", 2, "ACDT", "OSYS", 0)
{
External (LINX, IntObj)
External (OSYS, FieldUnitObj)
Scope (_SB)
{
Device (PCI1)
{
Name (_ADR, Zero) // _ADR: Address
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
If (CondRefOf (\OSYS))
{
If (_OSI ("Linux"))
{
OSYS = 0x03E8
LINX = One
}
If (_OSI ("Windows 2001"))
{
OSYS = 0x07D1
}
If (_OSI ("Windows 2001 SP1"))
{
OSYS = 0x07D1
}
If (_OSI ("Windows 2001 SP2"))
{
OSYS = 0x07D2
}
If (_OSI ("Windows 2001.1"))
{
OSYS = 0x07D3
}
If (_OSI ("Windows 2006"))
{
OSYS = 0x07D6
}
If (_OSI ("Windows 2009"))
{
OSYS = 0x07D9
}
If (_OSI ("Windows 2012"))
{
OSYS = 0x07DC
}
If (_OSI ("Windows 2013"))
{
OSYS = 0x07DD
}
If (_OSI ("Windows 2015"))
{
OSYS = 0x07DF
}
If (_OSI ("Windows 2017"))
{
OSYS = 0x07E1
}
If (_OSI ("Windows 2018"))
{
OSYS = 0x07E2
}
If (_OSI ("Darwin"))
{
OSYS = 0x07DF
}
}
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
}
}
}
@rockavoldy
Copy link
Author

@kecinzer this patch should be global, maybe other touchpad device in your DSDT initialized too when try to set SDM1 = zero, so there is many devices activated. Try to eliminate other devices

@kecinzer
Copy link

kecinzer commented Jul 3, 2020

@kecinzer this patch should be global, maybe other touchpad device in your DSDT initialized too when try to set SDM1 = zero, so there is many devices activated. Try to eliminate other devices

Yes, my laptop can have also touchscreen. Some people using my config reported that changing method from _OSI to XOSI breaks his touchscreen. So I thinking why is _OSI to XOSI method so bad? It seems to me more compatible and global.
So after many dreamless nights I return to day 0 solution using _OSI to XOSI rename and Windows spoofing.

@walechan
Copy link

walechan commented Jul 6, 2020

@kecinzer this patch should be global, maybe other touchpad device in your DSDT initialized too when try to set SDM1 = zero, so there is many devices activated. Try to eliminate other devices

Yes, my laptop can have also touchscreen. Some people using my config reported that changing method from _OSI to XOSI breaks his touchscreen. So I thinking why is _OSI to XOSI method so bad? It seems to me more compatible and global.
So after many dreamless nights I return to day 0 solution using _OSI to XOSI rename and Windows spoofing.

@kecinzer, I have been following your posts in few websites since our laptop DSDT are similar. I am using CLOVER and I tried hard coded in DSDT but no success with the touchpad. It returns i2c bus busy. I think that's related to pin rather than _OSI. I will try to figure it out in next few days and share my progress.

@kecinzer
Copy link

@walechan did you make any progress on it? After some time I still would like to switch from _OSI to XOSI rename :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment