Jump to content

Asus uX303LN Yosemite, screen brightness


procrastination
 Share

46 posts in this topic

Recommended Posts

Try the attached patch, hibernate wake brightness is fixed there...

Its my&Rehabs new PNLF Implementation... Its just not completely done yet, the go is, that this PNLF works with ACPIBacklight and AppleBacklight...

However, ACPIBacklight works 100% with this patch...

AppleBacklight implementation is not completed yet... Since we searching a way to change Display deviceID...

If this is done, you mainly don't need acpibacklight anymore...

 

However, brightness after hibernate wake should work!

You can tune SCFT in that patch, try 8 and than change to 40... and you going to understand then how it affects the brightness slider :-)

 

If you still have Glitches on screen after hibernate wake, we can add a fix for that too...

maybe with a small _DOS line, maybe with complexer vblank...

 

PS: This patch should work for everyone... doesn't matter if Ivy, Sandy or Haswell... :-)

 

Cheers :-)

ALL Brightness(PNLF).txt

Link to comment
Share on other sites

Hi,

 

I've got a quick view of your patch, and it seems that it can only be applied if you import SSDTs inside DSDT, as _WAK method is in DSDT (PNLF we don't care as you just seach for SB scope) and adr 0x00020000 is in SSDT (the one for intel video). Not an issue for me (I will split it and add the correct "external" request in DSDT for backlight wake), but it's just to inform people ;).

 

Furthermore, for people that want to apply it, you need to change GFX0 to IGPU (in all your DSDT & SSDTs) before applying it (I just say that because last Rehabman patches remove this need ;), so if you used the last Rehabman patch, think about GFX0 change).

 

I will test it tonight. Thanks for it :) (and for the method to "relaunch" backlight after Wake). You're far away from me for ACPI understanding :P.

Link to comment
Share on other sites

I had to adapt the patch to my DSDT/SSDT configuration and got it working. I can confirm that it does solve the brightness problem after hibernation. It does not solve the distorted screen issue, though.

 

I also have found that dropping OEM DSDTs re-enabled the Nvidia chipset, while not dropping it, while keeping the brightness slider, disabled the brightness setting (i.e.. any position get the same brightness).
 

 

[EDIT] when -not-dropping OEM DSDTs to keep the Nvidia chip disabled, the brightness slider works again after hibernation. I guess that the         Store (0xC0, SLBT) in the PLNF _INI method doesn't work somehow. [/EDIT]

Link to comment
Share on other sites

Hi,

 

I've got a quick view of your patch, and it seems that it can only be applied if you import SSDTs inside DSDT, as _WAK method is in DSDT (PNLF we don't care as you just seach for SB scope) and adr 0x00020000 is in SSDT (the one for intel video). Not an issue for me (I will split it and add the correct "external" request in DSDT for backlight wake), but it's just to inform people ;).

 

Furthermore, for people that want to apply it, you need to change GFX0 to IGPU (in all your DSDT & SSDTs) before applying it (I just say that because last Rehabman patches remove this need ;), so if you used the last Rehabman patch, think about GFX0 change).

 

I will test it tonight. Thanks for it :) (and for the method to "relaunch" backlight after Wake). You're far away from me for ACPI understanding :P.

 

You can it much easier :-) you can change IGPU to GFX0 and add external :-) Just Bar1 is needed in the PNLF device... nothing else :-)

However, its not completely finished yet... i want to make it apple backlight confirm... and apple backlight doesn't use _BCM _BCL etc...

Thats why im searching a way to modify display device ID from dsdt, and its only possible via edid inside dsdt...

but the hard thing is, that i first need to read out edid inside dsdt... and i don't found out where edid is stored, or where i can get edid...

If i find out where i can get edid, i can generate a new edid inside dsdt, and voila apple backlight works perfectly...

 

I had to adapt the patch to my DSDT/SSDT configuration and got it working. I can confirm that it does solve the brightness problem after hibernation. It does not solve the distorted screen issue, though.

 

I also have found that dropping OEM DSDTs re-enabled the Nvidia chipset, while not dropping it, while keeping the brightness slider, disabled the brightness setting (i.e.. any position get the same brightness).

 

 

[EDIT] when -not-dropping OEM DSDTs to keep the Nvidia chip disabled, the brightness slider works again after hibernation. I guess that the         Store (0xC0, SLBT) in the PLNF _INI method doesn't work somehow. [/EDIT]

 

Exactly, the problem is, that on hibernate wake _INI _PS0 _PS3 doesn't got executed... only _WAK and _TTS gets executed...

thats why i moved store 0xC0 to wake...

 

There can be other problems with other devices too, since on hibernate wake the methods above are not executed... so we need to look forward...

 

About your Glitch issue, you can first try dirty and easy to run PNLF._DOS to turn off, Sleep (0x50), and PNLF._DOS to turn on display again from _WAK... if this is working for you, then its fine, if not, i need to find a screen refresh way...

 

Cheers :-)

Link to comment
Share on other sites

I have tried a few things to get a better understanding of the problem.

 

- I previously said that " when -not-dropping OEM DSDTs to keep the Nvidia chip disabled, the brightness slider works again after hibernation." This wasn't true. I later realized that it only works after a sleep/wake cycle (after boot or hibernation). I guess that _wak isn't called after hibernation.

- The brightness slider doesn't have any effect right after boot. Could it be that the _ini method in PLNF isn't called ? That would seem very strange...

 

How could I try to debug that more precisely ?

 

I also tried to call _DOS method from _wak, but without knowing what argument to pass... And as _wak doesn't seems to be called, it is quite pointless right now.

Link to comment
Share on other sites

_WAK should be called on hibernation and wake... just _PS0 _PS3 isn't called on hibernation...

 

But you can add _TTS Method, Its going be executed after _WAK method from OS X...

and before _PTS Method...

 

Just add Store 0xC0 to _WAK or _TTS... or both to be sure...

 

Cheers :-)

Link to comment
Share on other sites

Hi,

 

I can confirm that I've got brightness working after hibernate with _WAK correction. Nice.

 

However, if CSM is disable, I've got glitches. Same kind of glitches I've got during OSX installation (without CSM). I can also reproduce these glitches when I want to swith my monitor frequency from 60HZ to 40HZ and vice versa.

 

I will try your DSDT method, however, as I can have sometimes glitches without hibernation (and so _WAK method not invoked), I've got the feeling that it's more a screen refresh issue !

Link to comment
Share on other sites

I re-patched everything once again, applying many rehabman patches,VMonHeros battery patch and toying with Ramalama _wak solution. Most importantly, I tried Rehabman new patches to disable Nvidia : it works great ! The only thing left to do is the CSM screen distortion problem.

 

Here is the full set of DSDT/SSDT files :

Archive.zip

Link to comment
Share on other sites

I tried adding this in a _TTS method :


    Method (_TTS,1, Serialized)
    {
        \_SB.PCI0.IGPU.PLNF._INI()
        \_SB.PCI0.IGPU.PNLF._DOS()
        Sleep (0x50)
         \_SB.PCI0.IGPU.PNLF._DOS()
    }

The call to the _INI method was intended to solve the backlight after hibernation issue : it's not working, I only get backlight setting after a screen off/screen on cycle.

The 3 other lines were there to try and solve the screen distortion issue. It's not working.

However, I discovered that the screen distortion didn't happen at a non native screen resolution (i.e. 1600x900 instead of 1920x1080).

Link to comment
Share on other sites

I got back using ramalama backlight patch : everything but the screen distortion works.

For any ux303ln, here is the best set I have managed to build so far :

 

Archive_DSDT.zip

 

Calling _DOS doesn't seem to work. A small bug with keyboard backlight, which only happen with CSM disabled in bios (as with screen distortion) makes me think that disabling may mess with timings. Instead of having constant but dimmer light, I sometimes have a blinking keyboard when dimming it to intermediate levels. This also goes away when closing/opening the lid.

@Ramalama : if you have any idea how to vblank at wake, I'd be eternally grateful.

Link to comment
Share on other sites

  • 5 weeks later...

Nice work with what you have. I'm eager to try it out myself, but I can't even get my OS to boot (reboots the moment I select my OS through the bootloader). Can you explain/show me what steps you took to install Yosemite? (GPT or MBR, UEFI/BIOS settings, Hackintosh Zone or Custom Clover USB, etc.) Any help would be appreciated.

 

Also, how's the graphics acceleration/UI performance with the high resolution display? I figured it may be sluggish with the high pixel density. 

Link to comment
Share on other sites

Well, if I remember correctly (I should have taken notes), I created a  yosemite USB stick and installed clover on the EFI partition of the stick.
For this you will need the kext mentioned in the above post + the usual suspects (FakeSMC, NullPowerManagement) installed in your CLOVER  folder.

You could also use the DSDT/SSDT I created (although it would not be a universal USB installer).

 

Once you have managed to boot the Yosemite installer, you should be good to go. Just remember you will have to use your USB stick boot loader as long as you doesn't have clover installed on your hard drive EFI partition.

Note : on this laptop, the refi partition is labeled "SERVICE" instead of "EFI". If the Yosemite installer doesn't want to install on your drive, rename it temporally to EFI using a linux live distribution. Afterward, you will have to rename it to "SERVICE" otherwise the BIOS/EFI settings will not launch.

 

I chose to triple boot windows/os x/kubuntu so I didn't wipe the HDD.

 

Regarding the screen, I have an anti glare, non touch full HD one, so I cannot comment on the quadHD performance.

Link to comment
Share on other sites

Thanks for the advice. I'm going to try it tonight. I actually wiped the HDD and reinstalled windows; I noticed a significant improvement in battery on windows. Now I am going to install Yosemite.

 

Did you have to do any specific bios settings (turn off virtualization, legacy usb, secure boot off (obviously))? And from what it seems, I have to rename the EFI partition to "SERVICE" post installation of Yosemite? I wasn't sure what you meant by BIOS/EFI settings; do you mean clover won't load at all, because it won't be able to access the EFI partition?

 

I am a bit new to this, so bear with me if you can. When I install Yosemite, I don't have a native bootloader which is compatible with OS X.. but is there an EFI partition already made from only installing Yosemite? Or does the Clover installer responsible for it post installation of Yosemite?

 

Moreover, you said:

 

 Afterward, you will have to rename it to "SERVICE" otherwise the BIOS/EFI settings will not launch.

 

 

That leads me to think there's an EFI partition made when installing Yosemite via the usb installer; I don't actually know, but would like to confirm if that's the case. :)

 

Also, would you be willing to post your clover directory with all your kexts, config.plist and .efi drivers? I think it would be helpful for anyone who is having troubles with this machine.

Link to comment
Share on other sites

Actually, nevermind that, I figured out that part. Right now I'm trying to get my USB installer to boot; I'll add more details if I don't fix it soon.

 

EDIT:

 

Okay, I give up. The QHD screen seems to be the root cause for me not being able to boot even into the installer. It's too bad, because this would've been a great machine to have it on.

Link to comment
Share on other sites

Actually, nevermind that, I figured out that part. Right now I'm trying to get my USB installer to boot; I'll add more details if I don't fix it soon.

 

EDIT:

 

Okay, I give up. The QHD screen seems to be the root cause for me not being able to boot even into the installer. It's too bad, because this would've been a great machine to have it on.

QHD requires quite a bit of patching... IOKit has arbitrary limits and needs to be patched. If you google you should find more information. I can't post the links here due to the rules of this site. Have fun...

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

Good news. Focaltech touchpad kext is out. You can find it on OSXlatitude. It is named Smart - Touchpad, and is compatible also with Elantech Touchpad (in fact, it’s an update of previous Elantech kext).

 

It’s working up to 5 fingers gesture. Have also a look inside plist to configure extended functionalities.

Link to comment
Share on other sites

Hi everyone :) I installed Yosemite on an Asus Zenbook UX303LA (the same as LN, but without Nvidia graphic) using clover and the DSDT provided by procrastination in this thread.

 

I got it all working quite well, but there is one huge issue.

After waking from sleep USB is not working anymore, also the Touchscreen and the built in camera stop to work. When I enter sleep mode with an USB Drive/USB Wifi attached it won`t wake from sleep at all. Hope someone here can help me?

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

I am trying to understand the mods that Ramalama had made to DSDT.   I see many times that a block of code is being deleted.  Can someone explain to me what the  deleted could is supposed to do.  Here is the complete code with highlighted section that in the patched DSDT is being deleted.  Thanks for your help.


Device (PR13)
{
Name (_ADR, 0x03) // _ADR: Address
Method (_UPC, 0, Serialized) // _UPC: USB Port Capabilities
{
Name (UPCP, Package (0x04)
{
0xFF,
0xFF,
Zero,
Zero
})
Return (UPCP)
}

Method (_PLD, 0, Serialized) // _PLD: Physical Location of Device
{
Name (PLDP, Package (0x01)
{
Buffer (0x10)
{
/* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0008 */ 0xE1, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
})
CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
If (LEqual (And (CDID, 0xF000), 0x9000))
{
And (VIS, Zero, VIS)
}

Return (PLDP)
}

Alias (SBV2, SDGV)
/****************Here starts the deleted code */
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
Name (_T_0, Zero) // _T_x: Emitted by ASL Compiler
If (LEqual (Arg0, ToUUID ("a5fc708f-8775-4ba6-bd0c-ba90a1ec72f8")))
{
While (One)
{
Store (ToInteger (Arg2), _T_0)
If (LEqual (_T_0, Zero))
{
If (LEqual (Arg1, One))
{
Return (Buffer (One)
{
0x07
})
}
Else
{
Return (Buffer (One)
{
0x00
})
}
}
Else
{
If (LEqual (_T_0, One))
{
If (LEqual (SDGV, 0xFF))
{
Return (Zero)
}
Else
{
Return (One)
}
}
Else
{
If (LEqual (_T_0, 0x02))
{
Return (SDGV)
}
}
}

Break
}
}

Return (Zero)
}
/*************************Up to here ****************/

}

Link to comment
Share on other sites

  • 2 months later...

I got back using ramalama backlight patch : everything but the screen distortion works.

For any ux303ln, here is the best set I have managed to build so far :

 

attachicon.gifArchive_DSDT.zip

 

Calling _DOS doesn't seem to work. A small bug with keyboard backlight, which only happen with CSM disabled in bios (as with screen distortion) makes me think that disabling may mess with timings. Instead of having constant but dimmer light, I sometimes have a blinking keyboard when dimming it to intermediate levels. This also goes away when closing/opening the lid.

 

@Ramalama : if you have any idea how to vblank at wake, I'd be eternally grateful.

 

Hi,

 

the file link seems to be down, does anybody have a good one ?

 

Thanks !

Link to comment
Share on other sites

 Share

×
×
  • Create New...