Jump to content

[HOW TO] Fix QuickLook and Preview loading issues in Mojave


330 posts in this topic

Recommended Posts

Hi guys,

 

So, this little tutorial is meant to help people fix a new issue with Mojave: opening jpg files (looks like it happens with larger files, not so much with smaller ones) using Quick Look (on spacebar key pressed) or Preview app, using the dedicated GPUs.

The issue is that, when trying to open jpg files (for some reason, it doesn't occur with pngs), the pop-up window would remain in an endless loop. And from that point forward, any other app trying to open the same file will either become unresponsive (in the case of the Preview app) or just stay in endless loop (in case of Quick Look)

 

As a workaround, in case the tutorial below doesn't work for you, you can use Grab (built-in app in MacOS) to open said files.

 

This issue DOES NOT occur using the iGPU. So...if you're comfortable using the iGPU, just switch to that and you should be good to go. You don't need this tutorial.

 

This tutorial is based on @Cyberdevs' research and testing on this topic (especially useful if you're using an RX series AMD video card), and my own very limited time testing this on my rig. I just thought it would be useful to create a new thread for it so that people can discuss this particular issue here.


 

With that being said, I'll just move on to the actual tutorial.

 

New (probably better) method.

 

Switch your SMBIOS in Clover config in regards to the dedicated GPU you're using, instead of the CPU. Take a look here and choose the corresponding SMBIOS closest to your hardware.

Yeah, that's it.

 

In case you lose CPU PM with this method, there are multiple ways to fix that, and they do not make the object of this thread. :) It worked perfectly fine for me though and I didn't need to change anything else.

 

Alternatively, you can also try one of the MacPro SMBIOSes, such as MacPro5,1 or MacPro6,1. It was tested multiple times and it showed good results. 

Keep in mind that choosing these will most likely not show you an iGPU in System Report, since those machines generally (probably all of them) use Xeon CPUs with no iGPUs either.
 

/!\NOTE: There have been reports saying that using this method (switching SMBIOS to a MacPro one) with newer versions of MacOS may cause iTunes to crash.

So...keep that in mind and better try some of the other methods mentioned here.

 

A simple Lilu plugin

 

Thanks to vulgo for the plugin and @Matgen84 for sharing and testing it, we now have yet another possible solution to this issue. It's a Lilu plugin (which means that it requires Lilu.kext in order to work) it's called NoVPAJpeg, and it can be downloaded from here.

You use it as a regular kext, alongside Lilu. I prefer (and recommend) using it within the EFI folder, in Clover/kexts/Other. But if you want to use it in S/L/E, that should work just fine.

 

More info can be found in this post here.

 

UPDATE:

 

According to Vulgo, NoVPAJpeg.kext is now deprecated.

In case its functionality is needed, use WhateverGreen.kext (alongside Lilu.kext) and add the following boot arguments:

shikigva=32 shiki-id=Mac-7BA5B2D9E42DDD94

In case you wanna try alternative medicine :) ...

 

The main thing we need to do is actually very simple: we need to enable the iGPU (integrated GPU) by default, in BIOS, while actually being connected to the dedicated GPU.

 

For ATI GPUs (curtesy of @Cyberdevs' post here).

 

The discreet GPU should be set as primary in BIOS and your displays should be connected to your discreet GPU

The iGD/iGPU/iGFX must be enabled in BIOS/UEFI as the secondary GPU.

 

  1. I removed the DSDT
  2. Reconfigured the config.plist to and removed some flags which weren't needed because of the DSDT
  3. added the InjectATI + Ornioco Framebuffer (I removed the Orinoco framebuffer because of some weird glitches but it might be useful for other AMD GPUs if you inject the correct framebuffer according to your GPU. No need to inject anything for nVidia GPUs unless your GPU needs it)
  4. Added the InjectIntel + ig-platform-id for my intel HD530 (for intel HD 530 I use the 0x19120001 ig-platform-id)

 

Steps 5 to 7 might not be necessary I just did them anyway, if anyone succeeded to get quicklook working without those steps let me know so I can exclude those steps.

     Also confirmed to work with AMD R9 270
X on a SandyBridge rig (without an iGPU) using WhateverGreen + Lilu kexts, which also helped to solve the transparency issue along with the Quick Look problem, it also resolved the buggy Screen 
Capture (Command+Shift+5) issue as well. 

 

    Also, do:

  1. nvram cleanup
  2. kextcache & prelinked kernel rebuild
  3. reboot 

More info on that here.

 

 

For NVIDIA GPUs (tested on my old MSi GTX 650)

 

This is what I needed for my NVIDIA GPU and the MSI motherboard in the signature (*since then, I upgraded my GPU to my current RX 580). Your milage may vary, depending on your hardware. But, the idea should be the same regardless.

 

   For MSi motherboads (check out my motherboard details in the signature)

 

  1. Set your BIOS to use PEG (dedicated GPU) so you can boot.
    Since you're reading this, chances are that you're already connected to the dedicated GPU and the BIOS is set to PEG. So just go into BIOS and see if you're using the iGPU or the dedicated (PEG) graphics device by default.
    If you're already using this, skip to Step 3 (the part AFTER Reboot).
  2. Reboot (I think you don't necessarily need to boot into the OS...but you do need to reboot at least until Clover UI)
  3. Reboot back into BIOS and set it from PEG to IGD (integrated graphics) WITHOUT removing the cable.
  4. Save
  5. Reboot again.

 

   The result should be that the OS is tricked into thinking you're booting with the IGPU when in fact you're using the dedicated GPU.

 

   For Gigabyte motherboards

 

   Set:

  1. Peripherals -> Initial Display Output -> iGFX
  2. Chipset -> Internal Graphics -> Enabled
         DVMT Pre-Allocation -> default 64M.
         DVMT Total Gfx Mem -> default 256M
  3. Save
  4. Reboot

 

   You should do this with the cable connected to the dedicated GPU.

 

You will also need to patch the iGPU from Clover config.

1. Graphics -> Inject Intel (UNCHECK Inject Nvidia or ATI if it's checked).

2. ig-platform-id (in my case for Intel HD 4600 Desktop) it was: 0x0d220003

 

And use IntelGraphicsFixup.kext (now included into WhateverGreen.kext) in Clover/kexts/Other. In my particular case, without the kext, I would get freezes in Safari.

 

Another way to activate the iGPU while having the dGPU set as primary is by going into BIOS/SAG/Graphics Configuration/iGPU and setting Multi-Monitor to [Enabled], all the rest remains on [Auto], and set Inject/Intel to [True] in Clover config.*.

 

Thanks to @gjw for the tip.

 

*Motherboard dependent. But the multi-monitor option might be the same regardless of manufacturer.

 

 

This might be a bug with Mojave and it could be fixed by Apple in the future. but in the meantime, feel free to use this if it helps you fix the issue.

 

For HP motherboards (including laptops), so far no solution, unless the BIOS somehow allows to switch from dGPU to iGPU and vice-versa.

 

Cheers!

Edited by arsradu
  • Like 10
  • Thanks 1
Link to comment
Share on other sites

@arsradu

Thanks man for the nice and thorough guide :)

To add to your precious topic I have tested my AMD R9 270X on a SandyBrdige rig which has no iGPU but using WhateverGreen.kext + Lilu also helped to solve the transparency issue along with the Quick Look problem, it also resolved the buggy Screen Capture (Command+Shift+5) issue as well.

 

I needed to do a nvram cleanup, kextcache and prelikbedkernel rebuild after a reboot everything worked just fine.

So the conclusion is if the freamebuffer is load correctly none of those issues will happen.

 

Cheers :)

Edited by Cyberdevs
  • Like 1
Link to comment
Share on other sites

2 hours ago, ricktm said:

any fix for those who cant enable from the bios their onboard graphics when a card is plugged in?

Any details on that? What happens when you try to enable it?

 

Also, some hardware information (preferably added to your signature) would greatly help in this case. :)

Edited by arsradu
Link to comment
Share on other sites

21 hours ago, arsradu said:

Any details on that? What happens when you try to enable it?

 

Also, some hardware information (preferably added to your signature) would greatly help in this case. :)

Oh, it just cant be done. my bios doesnt have that option, and i found this to be common with other HP boards. Sorry about the lack of hardware info, i thought adding it to my bio would have place it in my signature automatically. I'll look into adding it after this reply.

 

but its a HP 570-p010 w a i3-7100 kaby lake w/ Radeon RX 560 so i could get 4k with dual monitors 

 

edit: I want to add I have acceleration working, including dynamic backgrounds w/ dark theme. Everything works great except preview and quicklook.

 

 

Edited by ricktm
Link to comment
Share on other sites

16 minutes ago, ricktm said:

Oh, it just cant be done. my bios doesnt have that option, and i found this to be common with other HP boards. Sorry about the lack of hardware info, i thought adding it to my bio would have place it in my signature automatically. I'll look into adding it after this reply.

 

but its a HP 570-p010 w a i3-7100 kaby lake w/ Radeon RX 560 so i could get 4k with dual monitors 

 

 

Lol, are you serious? Well, remind me never to buy anything HP then. How the hell do you build a tower PC with no basic options like switching from Integrated (in your case Intel Graphics HD 630) to the dedicated GPU? What kind of BIOS is that? And what kind of motherboard is that? Sad, very sad.

 

Anyway, if they don't support that...sorry, no idea how to fix it. Since the entire fix is for you to be able to switch to iGPU while connected to the eGPU. If you can't do that...then it won't work.

Edited by arsradu
Link to comment
Share on other sites

In the team of my firm everything works with Mojave, screenshot in video, preview jpeg large files and the only change made is the graph that I now use RX 560, in Bios I have disabled the integrated one because it is an i5 2400 (HD2500) not supported, sorry for the English use Google translator

 

Edit:

upppps, you were right, I did the test with another image format, thanks for the trick, although out of the preview the rest is perfect

Edited by surfcaster
Link to comment
Share on other sites

Thanks for this, I thought it was just a bug :lol:

On 7/15/2018 at 1:48 PM, arsradu said:

 

Steps 5 to 7 might not be necessary I just did them anyway, if anyone succeeded to get quicklook working without those steps let me know so I can exclude those steps.

I skipped those steps, everything seems to be working fine here

Link to comment
Share on other sites

On 7/16/2018 at 9:08 AM, arsradu said:

 

Lol, are you serious? Well, remind me never to buy anything HP then. How the hell do you build a tower PC with no basic options like switching from Integrated (in your case Intel Graphics HD 630) to the dedicated GPU? What kind of BIOS is that? And what kind of motherboard is that? Sad, very sad.

 

Anyway, if they don't support that...sorry, no idea how to fix it. Since the entire fix is for you to be able to switch to iGPU while connected to the eGPU. If you can't do that...then it won't work.

 

 

thanks for the motivation, just ordered a new mobo and case. 

 

Link to comment
Share on other sites

I am still having problems  with jpg images in preview and Quicklook using today’s Public Beta update.

 

 

Gigabyte Z370XP SLI, bios version F7

I5-8400

 

Bios settings:

DVMT Memory 64M, Total available: 256M

Primary graphics: IGPU

Internal Graphics Enabled

 

Gigabyte Aorus RX580 8GB

 

macOS 10.14 Public Beta Three: (18A336e), Clover version 4586

 

With the new update, Quicklook and Preview gained the ability to view TIFFs and play .mov files. Various kinds of camera raw images are NOT viewable in Quicklook or Preview, while the finder has always shown the thumbnails correctly for every kind of image filetype I have tried so far.

 

The QuickLook slideshow (select a bunch of images in the finder, then press the Option key - Spacebar combination) will not display jpgs in slideshow mode, but will display them at various large sizes in index sheet mode. Once an image is chosen though, the slideshow module crashes of course. Selecting a bunch of TIFFs only for the slideshow results in the slideshow module operating correctly, but it crashes in index mode once an individual image is chosen.

 

As far as transparency goes in Light Mode or Dark Mode, it seems to work,. The menu bar is slightly translucent in Light Mode, but it is there, the translucency is more apparent in Dark Mode. Safari now works with a bunch more media heavy websites than before.

 

At this point I am wondering if this issue is a problem with the frame buffer settings.

 

Using Inject Intel = true along with IntelGFX = 0x12345678, the hardware report shows I have Intel UHD Graphics 630, no kext loaded, no known vendor or device id

1689069897_InjectTrue0x12345678.thumb.png.808ccb6c58f88785374de3789a127281.png

 

Using Inject Intel = true along with IntelGFX = 0x0, the hardware report shows I have Intel UHD Graphics 630, Vendor: Intel, device id: 5912

1256849635_InjectTrue0x0.thumb.png.bd933b7b2362329a98b65f45af766cc3.png

 

Using Inject Intel = false along with IntelGFX = 0x0, the hardware report shows I have Intel HD Graphics CFL CRB, Vendor: Intel, device id: 3e92

225165487_InjectFalse0x0.thumb.png.7c8d449aff18978feb2a2f159e6859ed.png

 

 

I connected a monitor to the motherboard HDMI connector, and observed it though the boot process, it did not show the initial BIOS screen or the Clover screen, but did show the ‘wall of text’ — the list of complaints that apfs has about the superblock pointing to a jump place, but it was not started from there, then pauses until the main monitor screen attached to the GPU comes on with the login screen at which point the motherboard connected monitor goes to black screen. Which is why I think there may be a framebuffer issue going on.

 

Any ideas as to how to get Quicklook and Preview working?

 

Thank you for your help!

 

Edited by jerryy2
Added processor type
Link to comment
Share on other sites

Hmm... For AMD issues, I think @Cyberdevs might be able to help you better.

 

Intel 630 is Kabylake, right? Did you try to add the correct ig-platform-id? I think you might need iMac18,2/iMac18,3 SMBIOS and ig-platform-id 0x59120000.

 

Also, in case you don't already have that, I would also recommend using IntelGraphicsFixup kext in Clover/kexts/Other.

 

The thing is, for as far as I could tell from my limited time spent fiddling with this, you need to have the iGPU correctly set up first, before attempting this trick.

 

As I said, I'm not an expert in AMD cards. This might or might not help. But this is what I'd do first. Try to get the iGPU to work properly, boot properly and all that. After that, it should be only a matter of BIOS switch.

Edited by arsradu
Link to comment
Share on other sites

I have a Gigabyte board and it doesn't have a PEG switch. it only has PCIe 1. PCIe 2, PCI and iGFX. So I enabled PCI.

 

I enabled so that it uses iGFX in bios, dropped in the IntelGraphicsFixup kext and the .dSYM one. Enabled Inject Intel thingy in Clover I added ig-platform id of - 0x0D220003, because it's a Haswell processor with Intel 4600 on it. 

 

Still doesn't work :help:

 

Btw, the monitor I'm using on this older PC is not HDMI, but DVI.

 

Edited by iRipper
Link to comment
Share on other sites

29 minutes ago, iRipper said:

I have a Gigabyte board and it doesn't have a PEG switch. it only has PCIe 1. PCIe 2, PCI and iGFX. So I enabled PCI.

 

I enabled so that it uses iGFX in bios, dropped in the IntelGraphicsFixup kext and the .dSYM one. Enabled Inject Intel thingy in Clover I added ig-platform id of - 0x0D220003, because it's a Haswell processor with Intel 4600 on it. 

 

Still doesn't work :help:

 

 

1. please, add your complete hardware information to your signature. Believe me, it's worth it. We still don't know which dedicated GPU you're trying to use. And this issue does not occur with the integrated one.

2. PCIe IS your dedicated GPU. The point is to have the iGPU selected, while physically connected to the eGPU. So, I think you might want to enable iGFX instead.

3. you don't need any dSYM....anything.... Please, remove. You just need IntelGraphicsFixup.kext in Clover/kexts/Other

4. remove the serial numbers in your SMBIOS and RTvariables and upload your Clover folder for analysis.

 

Edited by arsradu
  • Like 2
Link to comment
Share on other sites

6 minutes ago, arsradu said:

 

1. please, add your complete hardware information to your signature. Believe me, it's worth it. We still don't know which dedicated GPU you're trying to use. And this issue does not occur with the integrated one.

2. PCIe IS your dedicated GPU. The point is to have the iGPU selected, while physically connected to the eGPU. So, I think you might want to enable iGFX instead.

3. you don't need any dSYM....anything.... Please, remove. You just need IntelGraphicsFixup.kext in Clover/kexts/Other

4. remove the serial numbers in your SMBIOS and RTvariables and upload your Clover folder for analysis.

 

 

Thanks for taking your time to help me. 

 

This is an old machine with a Haswell i5-4570 I think. The mobo is Gigabyte Z87M-D3H. And the graphics is Nvidia GTX660.

 

Here's my compressed Clover folder.  

CLOVER.zip

Link to comment
Share on other sites

12 minutes ago, iRipper said:

 

Thanks for taking your time to help me. 

 

This is an old machine with a Haswell i5-4570 I think. The mobo is Gigabyte Z87M-D3H. And the graphics is Nvidia GTX660.

 

Here's my compressed Clover folder.  

CLOVER.zip

 

The reason why I'm asking for your hardware is because, believe it or not, we have the same CPU, and apparently a very similar dedicated GPU, as well (I'm using the GTX 650).

 

As I said, please, remove the dSYM bullsh*t from Clover/kexts/10.14. By the way, just so you don't have to switch from one folder to another with every new update of the OS (like for example when switching from 10.13 to 10.14), and if you don't necessarily need your kexts to be separated for each OS, I would strongly recommend you to use the Other folder instead.

 

Overall, your config looks pretty good. You don't need MOST of the stuff over there. It could be cleaner, but let's see if the issue is actually the config or something else. 

 

What happens when you switch your BIOS from PCI to iGFX (while still being physically connected to the GTX 660)?

Edited by arsradu
  • Like 1
Link to comment
Share on other sites

^ If I switch to iGFX I need to plug the cable into the motherboard to be able to see the screen. It boots and it works, but I need the dedicated GPU, because I also use Windows on the same machine and sometimes my GF plays games on it. 

Link to comment
Share on other sites

9 minutes ago, iRipper said:

^ If I switch to iGFX I need to plug the cable into the motherboard to be able to see the screen. It boots and it works, but I need the dedicated GPU, because I also use Windows on the same machine and sometimes my GF plays games on it. 

 

Ok, so that's the thing we're trying to accomplish here.

 

Ideally, you should do something like this (and I don't see how it will affect Windows...):

1. boot into bios with the cable connected to the GTX card (to be able to see something).

2. switch to PCI

3. reboot (no need to boot until you reach the OS, but at least until you reach Clover UI screen)

4. reboot back into BIOS

5. set to iGFX (without removing the cable)

6. reboot

 

In theory, when doing this, the iGPU should still be enabled, although you're physically connected to the dedicated GPU (your GTX 660). And you should still be able to see something on your monitor. At least I can. But it might be different for your board. One thing is for sure: your iGPU (aka iGFX) needs to be enabled in BIOS.

 

I think Gigabyte boards might have some other option for the iGFX.... I just don't know where. And since I'm using an MSi board, this will be different.

 

I feel like, in your case, the board might have one an option for enabling/disabling the iGP completely, and another one for choosing the priority. I could be wrong though.

 

I'm kinda flying blindly here, since my motherboard only has one option.

Edited by arsradu
  • Like 1
Link to comment
Share on other sites

If I switch to iGFX (Intel graphics is enabled and has 64mb) I can't see anything with the cable connected to the dedicated chip. I have to unplug the DVI cable from the GTX660 and into the Mobo, then I see the screen and it boots up. Quick Look and Preview still don't work btw. 

 

I'm sorry if it's confusing :wallbash:

 

P.S. Okay, so I enabled iGPU, but disabled any memory to it and selected to boot from it, while the cable is connected to the GTX660. It boots and only detects the 660, but Preview and Quicklook are still broken. 

Edited by iRipper
Link to comment
Share on other sites

22 minutes ago, iRipper said:

If I switch to iGFX (Intel graphics is enabled and has 64mb) I can't see anything with the cable connected to the dedicated chip. I have to unplug the DVI cable from the GTX660 and into the Mobo, then I see the screen and it boots up. Quick Look and Preview still don't work btw. 

 

I'm sorry if it's confusing :wallbash:

 

P.S. Okay, so I enabled iGPU, but disabled any memory to it and selected to boot from it, while the cable is connected to the GTX660. It boots and only detects the 660, but Preview and Quicklook are still broken. 

 

Wait, are you saying this doesn't work even when booting off of the iGPU (meaning set to iGFX in BIOS and also connected to it with the DVI cable)?

 

Cause, this might be something else. And, before anything, as I said before, I think you need to fix booting from the iGPU first.

 

From what you're saying, it seems like you're on the right path. But, still, if your iGPU is not correctly configured, this won't work.

 

Try the attached config_test.plist in your Clover folder. Reboot and select it from Clover -> Options -> Configs -> config_test.plist (so that it doesn't affect your main config).
Also, try to boot with your iGPU first and tell me if you encounter any issues and which issues.

config_test.plist.zip

  • Like 1
Link to comment
Share on other sites

What I'm saying is that if I connect the cable to the iGPU and give it some memory to boot from, it'll boot and work fine. But Quick Look will not open JPG files even with the IntelFixupKext and all the entries in Clover config. Same with the 660. 

 

I can select the iGPU too and not give it any memory, then it automatically picks up the 660 and boots from it. It works, but QL is broken. 

Link to comment
Share on other sites

28 minutes ago, iRipper said:

What I'm saying is that if I connect the cable to the iGPU and give it some memory to boot from, it'll boot and work fine. But Quick Look will not open JPG files even with the IntelFixupKext and all the entries in Clover config. Same with the 660. 

 

I can select the iGPU too and not give it any memory, then it automatically picks up the 660 and boots from it. It works, but QL is broken. 

 

This is weird... You shouldn't have any issues opening jpegs with the iGPU. Did you remove those dSYM files and try the config I uploaded above? Any change?

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, arsradu said:

 

This is weird... You shouldn't have any issues opening jpegs with the iGPU. Did you remove those dSYM files and try the config I uploaded above? Any change?

 

Yay! :thumbsup_anim: That fixed it. I got Preview and Quicklook back! Thanks so much for your time and help. I can use this oldie for a little bit more, while the other one is doing the heavy lifting :weight_lift:

 

Thanks again! 

Edited by iRipper
Link to comment
Share on other sites

2 minutes ago, iRipper said:

 

Yay! :thumbsup_anim: That fixed it. I got Preview and Quicklook back! Thanks so much for your time and help. I can use this oldie for a little bit more, while the other one is doing the heavy lifting :weight_lift:

 

Thanks again! 

 

Welcome! So...what did you do that fixed it? The config or...?

 

I managed to take a look at a Gigabyte board (Skylake Z170 board). And I'm thinking yours might be similar. Still, I'm not sure which settings should be used here. But once I know which combination works, I can add it to the main post.

 

So...what did you do? :D

 

IMG_0334.thumb.jpg.cf1a3ccbfce7bff2aa96275a9b52d42a.jpg

IMG_0336.thumb.jpg.b41a18368127daaf7c4269b94b2a719f.jpg

 

 

 

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...