Jump to content
8 posts in this topic

Recommended Posts

Hi,

 

I have a Hackintosh I built a few years ago (Intel 4770K, AMD 5700XT) and have just spent the last few days successfully switching over from Clover to OpenCore 0.5.6. I'm very impressed with it so far although admittedly I have spent hours getting the configuration absolutely perfect. I followed this excellent guide for Haswell :

 

https://khronokernel.github.io/Opencore-Vanilla-Desktop-Guide/config.plist/haswell.html

 

Everything now seems to be working perfectly. I created the SSDT files and even managed to get my USB ports working properly thanks to a kext I made, something I've never managed to do in the past.

 

Anyway, there is one small annoyance that is bugging me. Almost every time I restart into macOS, once the desktop appears the previously empty trash/bin is no longer empty. A folder will be inside entitled "Recovered files" and it appears to be empty. However from the terminal one can see inside a hidden folder called .LINKS and inside that are usually 3 UUIDs which seem to change each time.

 

Now I know, it's a small annoyance and I can just empty the trash each time I start up macOS. However, I've spent hours now trying to figure out what is causing this. Apple unhelpfully provides this link which of course offers nothing in the way of a solution :

 

https://support.apple.com/en-gb/guide/mac-help/mchlp2919/mac

 

This has NEVER happened to me on Clover in several years, so I'm thinking it is something to do with OpenCore. The only other thing that has changed recently is macOS 10.15.4 was released. I have 10.15.4 on my MacBook Pro however and can't replicate the issue. I have done several clean installs on my Hackintosh and it continues to happen.

 

Can anyone help?!

 

Thanks,

 

Tom

Edited by tomw
Link to comment
https://www.insanelymac.com/forum/topic/343183-opencore-056-trash-issue/
Share on other sites

I just tried that and all drives are reporting no issues. All drives are APFS.

 

Could the system be shutting down too quickly? From the timestamp on the files that appear in the trash it would seem they are being created on shutdown rather than on startup, in case that helps.

 

Is anyone else having this issue? It would seem it can happen on real macs too but I have never seen it myself on a real mac nor has it happened on my machine until now.

Ok so it's not just me. Do you think something has changed in macOS? Or is it something wrong with OpenCore itself and/or the settings in config.plist?

 

It seems to have something to do with apps that run at startup/close at shutdown but I haven't been able to put my finger on an exact cause yet and I don't think the issue is limited to one specific app. It doesn't happen on my Apple MacBook Pro which is running the same apps and same OS which leads me to believe there must be some Hackintosh tweaking that needs to be done somewhere. A patch of some sort perhaps?

 

Are any OpenCore developers reading this and able to advise?

Earlier this morning I found that by disabling SIP (System Integrity Protection) I was able to fix the problem of "Recovered files" appearing in the Trash on every startup. However, I really wanted SIP to remain enabled as it offers better security etc. Unfortunately, each time I would re-enable SIP the problem would return. Here are my findings and a solution after a few hours of investigation.

 

From Terminal, you can check the current status of SIP by typing "csrutil status". This will usually show either "enabled" or "disabled" however it's not quite so simple. SIP is actually made up of 9 flags, each of which can either be turned on or off. By default, with SIP fully enabled, all flags are turned off. You can find some very useful info here, including a python script you can run if you are technically savvy :

 

https://gist.github.com/pudquick/8b320be960e1654b908b10346272326b

 

From Terminal, you can check what your current SIP flags are set to by typing "nvram -p". If SIP is enabled fully then csr-active-config should read "%00%00%00%00" which corresponds to a value of 0. If it is disabled (the official Apple way) then this should read "w%00%00%00" which corresponds to a value of 119.

 

In macOS you can change the SIP status the official way by booting into Recovery and typing either "csrutil enable" or "csrutil disable" from Terminal. If using OpenCore, however, this will only persist until the next time NVRAM is cleared. So your preferred SIP status should really also be set in OpenCore itself.

 

In OpenCore you can set your desired SIP status in config.plist. There is a property NVRAM/7C436110-AB2A-4BBB-A880-FE41995C9F82/csr-active-config where you can set what you want your SIP status to be. To enable SIP fully (recommended) set the value to 00000000. To disable SIP (the official Apple way) set this to 77000000. In the official OpenCore guide it says to use a value of E7030000. This is WRONG and I have no idea where the writer of the guide got this value from. It's possible using bad values like this could have in some way caused the Trash issue to appear. To keep it simple, use 00000000 if you want SIP enabled and 77000000 if you want SIP disabled.

 

Note that the OpenCore csr-active-config value will be ignored if there is already a value present in NVRAM. To clear the NVRAM value you can run "sudo csrutil clear" from Terminal prior to restarting. Then the OpenCore value will be picked up on the next startup.

 

Now I installed macOS with a csr-active-config in config.plist of 00000000, in another words the default setting of SIP being enabled. However, despite this, very soon after install I had the Trash problem show up and it has happened on every startup ever since.

 

How I finally fixed this was to run "sudo csrutil clear" from Terminal. This has the effect of clearing csr-active-config from NVRAM but (possibly) may also clear out something else that was causing the problem. Then, making sure config.plist has a csr-active-config value of 00000000 I rebooted and lo and behold ... no more annoying folders in the Trash!

 

I know I've been somewhat verbose so here are my recommended steps to summarise :

 

(1) Ensure csr-active-config in config.plist is set to 00000000 (SIP enabled).

(2) From Terminal, type "sudo csrutil clear" and enter your password.

(3) Reboot.

 

Hopefully these steps are sufficient to stop the Trash problem once and for all. In case it doesn't work you could try the same three steps above but setting csr-active-config to 77000000 (SIP disabled). This will disable SIP completely and the Trash problem should be fixed. If that works, you can then try to repeat the three steps with a value of 00000000 (SIP enabled) and hopefully ... the issue does not return.

 

Let me know your results please! Also, please could someone let the OpenCore developers know that 77000000 should be the official SIP disabled value and perhaps they could change it in all the online guides.

Edited by tomw

I may have spoken too soon and wasted a whole lot of time. While the above measures seem (subjectively) to have helped a fraction, I just rebooted and yet again there are folders in the Trash. And even worse, I had SIP fully disabled. Ugh, this is so annoying!

 

I may also be wrong about the SIP values in OpenCore being wrong. 77000000 IS the correct code to use for SIP to be disabled if you want to match exactly what Apple does when you type "csrutil disable". However it appears there may have been more flags added in recent macOS versions so there are in fact a total of 10 flags making up SIP. This means that E7030000 is in fact a more aggressive disabling of SIP. It works, although does cause macOS to report that you are using an unknown and unsupported configuration. Anyway, even with this setting of E7030000 I just had a reboot with more rubbish in the Trash so ... back to the drawing board.

 

In case anyone is interested, this project seems more up to date than the previous one I mentioned and has all 10 flags in it :

 

https://github.com/Piker-Alpha/csrstat

 

You can use Calculator on macOS set to Programmer mode to experiment with the various bits being set or unset. You can click on the individual bits to enable or disable. Then by going to hex mode (click 16) you can see what the value to enter is, although it needs to be reversed, for example 0x3E7 becomes E7030000. All rather boring and technical if you're not into that sort of thing.

 

I'm hoping someone out there can definitively offer a solution for this trash problem ...

Edited by tomw
×
×
  • Create New...