Contribute
Register

[Solved] NVIDIA Web Driver iBooks Bug

Status
Not open for further replies.
@pinum,
I tried with iBooks, it doesn't work. iBooks gives error related to some handler. I had to restore the iBooks app from my CCC backup.
Please do let me know if there is some solution for this iBooks bug.
 
Still there with 10.12.5 + Nvidia

Something interesting though. I was doing the update to the OS and GPU drivers and when I booted in with the drivers disabled, iBooks worked just fine. I don't have an iGPU and so that says iBooks works with the VESA drivers. So it's not so much the iGPU (considering I don't have one) that gets iBooks working, it's the Nvidia drivers are breaking something that even the VESA drivers can do.
 

Attachments

  • Screen Shot 2017-05-16 at 6.19.04 AM.pdf
    2 MB · Views: 156
The nvidia drivers don't work with applications that have library validation turned on, that's the known issue. With no valid renderer core animation falls back to a software renderer which is not fully functional in a normal system. I suspect the reason it works with the VESA drivers is because EVERYTHING is software rendered; the issue probably comes into play when everything else is hardware rendered and iBooks isn't. The compositor is probably broken in that case.
 
Hi @MacPack @zakklol

Yes, you've both offered good insights to this problem.

I was wrong in my previous comment in that there are deeper apps in the iBook.app bundle in the form of the Plugins as well as the Frameworks.

I've run through the deeper apps changing the codesigning to see what effects this had, hoping to have the same result as others have with instruments in Xcode.

Basically changing codesign for iBooks itself and any of the Framework apps stops the program running at all, just giving an error. Changing codesign for a Plugin app just doesn't change things (with my tests so far)

And it's true, booting with the NVidia drivers disabled allows iBooks to work perfectly.

I've tried with various combinations of iGPU configs and had nothing change.

I find it odd that iBooks apparently uses a form of hardware-accelerated rendering with a discrete GPU that no other app in the Apple system seems to.

:rolleyes:

(Sys-admins - I think we need a "head-scratch" emoji !! :) )
 
This actually worked for me on Instruments (macOS 10.12.5; Web Driver: 378.05.05.15f01). Did not work on iBooks. iBooks will not run any more, if you try to fix it.

Code:
sudo codesign -f -s - /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
 
iBooks does nothing odd with regards to rendering; it just uses Core Animation which plenty of other apple applications do. It's the library validation that's the unique thing. If you can't get it working with iGPU configs that's a separate issue entirely, it means Core Animation doesn't see your iGPU as a valid.

People have had various levels of success enabling the iGPU and having this work; it's probably down to platform-id and intel injection settings in clover, but I don't have multiple platforms to test so I couldn't say why it doesn't work in particular cases.

I suspect the real solution to this issue is a kernel patch; if you can patch the kernel so it considers every signed blob to be a platform binary, then loading code into validating applications would work. You lose a bit of security by doing that, though. It may also be worth digging into how the kernel determines something is signed by Apple, maybe it's possible to add another signature to the 'blessed' list.
 
Thanks @zakklol :)

Understood re Core Animation. It just seems odd that I (personally, so with my own set-up. Like you I don't have access to any other kit with a discrete GPU) have not seen this behaviour in any other software application - and I have a fair few.

If what I have read elsewhere is true, and people running real Mac Pros with add-on GPUs are having the same problem, then it would point to a Nvidia driver problem. I can't believe Nvidia would let it run so long without a fix. It ran perfectly before, I just can't remember which upgrade to system or drivers broke it!

If the accounts I've read aren't true or accurate, I still would like to know why only iBooks is displaying this bug. Is it such an obscure part of the api that really doesn't get a call very often?

:rolleyes:
 
It's not only iBooks. Instruments does too. You can apparently re-sign Instruments just fine. iBooks deals with purchased content/DRM and probably has some extra protections baked in, or it relies on the code signature being Apple's for accessing some protected content. I've never re-signed that app so I couldn't say.

The reason you aren't seeing it elsewhere is most things aren't code signed with the library validation option. The Core Animation issue is 100% reproducible even in super simple applications if you code sign them with that option.

To be clear: Nvidia can't fix this. It's an advanced security feature of macOS and it is working as designed. The problem is the security is hostile to third party video drivers, probably because taking that into account was not part of the design. They simply don't officially exist; all other video drivers are provided by apple.
 
It's not only iBooks. Instruments does too. You can apparently re-sign Instruments just fine. iBooks deals with purchased content/DRM and probably has some extra protections baked in, or it relies on the code signature being Apple's for accessing some protected content. I've never re-signed that app so I couldn't say.

The reason you aren't seeing it elsewhere is most things aren't code signed with the library validation option. The Core Animation issue is 100% reproducible even in super simple applications if you code sign them with that option.

To be clear: Nvidia can't fix this. It's an advanced security feature of macOS and it is working as designed. The problem is the security is hostile to third party video drivers, probably because taking that into account was not part of the design. They simply don't officially exist; all other video drivers are provided by apple.

Ok thank you :)

So do you think the code signing security changed when Apple introduced the Sierra CSR regime whereby we can only get around it by manually modifying it via RTVariables in config.plist? That might explain why I was able to access iBooks before using a discrete GPU but not now (I don't use iBooks often and clearly can't at all now).

Incidentally I worked through all the embedded apps within iBooks - there are some in plug-ins and some in frameworks - changing their code signing, but unlike Xcode's Instruments, nothing worked.

Out of interest, does your Radeon card work okay with iBooks? I'm guessing so because it would use the inbuilt drivers etc.

Well thank you again. I can only hope someone with more talent than me can work round this "bug". Must be galling for those with real Mac Pros and Nvidia cards though...

:)
 
Status
Not open for further replies.
Back
Top