Jump to content

Clover Problems and Solutions


ErmaC
3,206 posts in this topic

Recommended Posts

@Sherlock please try v1.5, I don't think all FrodoKenny's those change are necessary expect unmount -f I have already posted before.

 

attachicon.gif80.save_nvram_plist.local-1.5.zip

 

syscl

 

tested.

 

Supreme-MBP:~ supreme$ sudo cat /Library/Logs/CloverEFI/rc.shutdown.log 

Password:

v1.5 © 2017 syscl/lighting/Yating Zhou

Found EFI disk0s1

Found Clover /Volumes/EFI01/EFI/CLOVER

Target path: /Volumes/EFI01

>> End Script: /private/etc/rc.shutdown.d/80.save_nvram_plist.local

 

Supreme-MBP:~ supreme$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local

Supreme-MBP:~ supreme$ 

 

 

generate nvram work after reboot. but in your script, terminal command is not work. it means that after command terminal, not generate nvram file in ESP.

FrodoKenny script still is working. i see your script compared FrodoKenny script. doesnt have almost difference. but your script not work in terminal case

Link to comment
Share on other sites

NVRAM file followers - i have made some revisions to syscl's 1.5 script and it works quite well now.

 

added some addition logic and conditions

checks for Legacy Clover or EmuVariable present to decide whether to write the nvram to ESP that has a CLOVER folder in it.

so looks at all disks and checks if ESP mounted - if so, use it

or mount ESP on new mount point

write NVRAM only if different from existing file

unmount (without a force) ESP

 

Note:

it seems best to disable indexing and spotlight for ESP

i mounted all my ESP and ran this:

mdutil -d /Volumes/ESP*

 

here is v1.6 script sample output:

 

3 disks - 2 have Clover - mounted one ESP

so i change brightness

run

run again

$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local; cat /Library/Logs/CloverEFI/rc.shutdown.log
v1.6 (c) 2017 syscl/lighting/Yating Zhou
Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER
Found ESP on disk1s1 and found Clover in /Volumes/ESP-1/EFI/CLOVER
Found ESP on disk2s1
Target path: /Volumes/ESP-01 saved new values to NVRAM
Target path: /Volumes/ESP-1 saved new values to NVRAM

$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local; cat /Library/Logs/CloverEFI/rc.shutdown.log
v1.6 (c) 2017 syscl/lighting/Yating Zhou
Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER
Found ESP on disk1s1 and found Clover in /Volumes/ESP-11/EFI/CLOVER
Found ESP on disk2s1
Target path: /Volumes/ESP-01 no change in NVRAM
Target path: /Volumes/ESP-11 no change in NVRAM

v1.6-80.save_nvram_plist.local.zip

  • Like 1
Link to comment
Share on other sites

 

NVRAM file followers - i have made some revisions to syscl's 1.5 script and it works quite well now.

 

added some addition logic and conditions

checks for Legacy Clover or EmuVariable present to decide whether to write the nvram to ESP that has a CLOVER folder in it.

so looks at all disks and checks if ESP mounted - if so, use it

or mount ESP on new mount point

write NVRAM only if different from existing file

unmount (without a force) ESP

 

Note:

it seems best to disable indexing and spotlight for ESP

i mounted all my ESP and ran this:

mdutil -d /Volumes/ESP*

 

here is v1.6 script sample output:

 

3 disks - 2 have Clover - mounted one ESP

so i change brightness

run

run again

$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local; cat /Library/Logs/CloverEFI/rc.shutdown.log
v1.6 (c) 2017 syscl/lighting/Yating Zhou
Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER
Found ESP on disk1s1 and found Clover in /Volumes/ESP-1/EFI/CLOVER
Found ESP on disk2s1
Target path: /Volumes/ESP-01 saved new values to NVRAM
Target path: /Volumes/ESP-1 saved new values to NVRAM

$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local; cat /Library/Logs/CloverEFI/rc.shutdown.log
v1.6 (c) 2017 syscl/lighting/Yating Zhou
Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER
Found ESP on disk1s1 and found Clover in /Volumes/ESP-11/EFI/CLOVER
Found ESP on disk2s1
Target path: /Volumes/ESP-01 no change in NVRAM
Target path: /Volumes/ESP-11 no change in NVRAM

 

 

here is report.

 

Last login: Sun Jan 15 11:33:09 on console

Supreme-MBP:~ supreme$ sudo cat /Library/Logs/CloverEFI/rc.shutdown.log 

Password:

v1.6 © 2017 syscl/lighting/Yating Zhou

Found ESP on disk0s1 and found Clover in /Volumes/EFI/EFI/CLOVER

Target path: /Volumes/EFI saved new values to NVRAM

umount(/Volumes/EFI): Resource busy -- try 'diskutil unmount'

>> End Script: /private/etc/rc.shutdown.d/80.save_nvram_plist.local

 

Supreme-MBP:~ supreme$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local

umount(/Volumes/EFI): Resource busy -- try 'diskutil unmount'

Supreme-MBP:~ supreme$ 

 

 

 

your script seems to have unmount issue or other.

 

 

FrodoKenny script is best now for me. but i'm not legacy user. maybe need to add some code for legacy users.

 

thank you.

 

add. i made script file from FrodoKenny's patch file, attached FrodoKenny script file. maybe it will be help.

 

FrodoKenny script log

 

Supreme-MBP:~ supreme$ sudo cat /Library/Logs/CloverEFI/rc.shutdown.log 

v1.4 © 2017 syscl/lighting/Yating Zhou

Found EFI disk0s1

Found Clover /Volumes/EFI01/EFI/CLOVER

Target path: /Volumes/EFI01

Save NVRAM to /Volumes/EFI01

Failed to s>> End Script: /private/etc/rc.shutdown.d/80.save_nvram_plist.local

 

Supreme-MBP:~ supreme$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local

Supreme-MBP:~ supreme$ 

 

80.save_nvram_plist.local.zip

  • Like 1
Link to comment
Share on other sites

Note:

it seems best to disable indexing and spotlight for ESP

i mounted all my ESP and ran this:

mdutil -d /Volumes/ESP*

You can also create a zero length file at the root, ".metadata_never_index".

 

For example, if your EFI partition is mounted at /Volumes/ESP:

touch /Volumes/ESP/.metadata_never_index
The Clover installer should probably be doing this...
Link to comment
Share on other sites

@sherlocks - 

the reason for the unmount issue in your case is likely because you have indexing happening which prevents unmount to happen at that time. 

i was not happy with a force unmount of ESP - better to leave it mounted.

 

this script can support legacy - i tested on my H61 box.

 

@rehabman - yes - i have that file in place. that is probably easier to implement.

 

i propose this script replaces the current one in the repo.

Link to comment
Share on other sites

here is report.

 

your script seems to have unmount issue or other.

 

 

FrodoKenny script is best now for me. but i'm not legacy user. maybe need to add some code for legacy users.

 

thank you.

 

add. i made script file from FrodoKenny's patch file, attached FrodoKenny script file. maybe it will be help.

 

FrodoKenny script log

 

 

NVRAM file followers - i have made some revisions to syscl's 1.5 script and it works quite well now.

 

added some addition logic and conditions

checks for Legacy Clover or EmuVariable present to decide whether to write the nvram to ESP that has a CLOVER folder in it.

so looks at all disks and checks if ESP mounted - if so, use it

or mount ESP on new mount point

write NVRAM only if different from existing file

unmount (without a force) ESP

 

Note:

it seems best to disable indexing and spotlight for ESP

i mounted all my ESP and ran this:

mdutil -d /Volumes/ESP*

 

here is v1.6 script sample output:

 

3 disks - 2 have Clover - mounted one ESP

so i change brightness

run

run again

$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local; cat /Library/Logs/CloverEFI/rc.shutdown.log
v1.6 (c) 2017 syscl/lighting/Yating Zhou
Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER
Found ESP on disk1s1 and found Clover in /Volumes/ESP-1/EFI/CLOVER
Found ESP on disk2s1
Target path: /Volumes/ESP-01 saved new values to NVRAM
Target path: /Volumes/ESP-1 saved new values to NVRAM

$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local; cat /Library/Logs/CloverEFI/rc.shutdown.log
v1.6 (c) 2017 syscl/lighting/Yating Zhou
Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER
Found ESP on disk1s1 and found Clover in /Volumes/ESP-11/EFI/CLOVER
Found ESP on disk2s1
Target path: /Volumes/ESP-01 no change in NVRAM
Target path: /Volumes/ESP-11 no change in NVRAM

Thank you for your handwork, will try this day! Wish I'll recover from illness soon :lol:  :lol:

 

syscl

  • Like 1
Link to comment
Share on other sites

@sherlocks -

the reason for the unmount issue in your case is likely because you have indexing happening which prevents unmount to happen at that time.

i was not happy with a force unmount of ESP - better to leave it mounted.

 

this script can support legacy - i tested on my H61 box.

 

@rehabman - yes - i have that file in place. that is probably easier to implement.

 

i propose this script replaces the current one in the repo.

Okay. But have nvram file generate fail case. If we use Macos update and usb install or rare.

 

I will wait better solution.

 

 

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

Tiny update to the recent implementation of the HDA infos

 

This is still a work in progress, and not affect how Clover works.

I "port" the codec list from Enoch and his relatives methods/functions (hda.c),

renamed stuff related with HDA controller in Platform.h and Settings.c

prepared the "place holder" for the codec info into menu.c

 

I hope to dedicate more time on this... in the near future.

 


- rEFIt_UEFI/Platform/hda.c

- rEFIt_UEFI/Platform/hda.h

- rEFIt_UEFI/Platform/Platform.h

- rEFIt_UEFI/Platform/Settings.c

- refit/menu.c

 

--> Clover_HDA_update.zip

 

Cordially

 

ErmaC

  • Like 5
Link to comment
Share on other sites

Tiny update to the recent implementation of the HDA infos

 

This is still a work in progress, and not affect how Clover works.

I "port" the codec list from Enoch and his relatives methods/functions (hda.c),

renamed stuff related with HDA controller in Platform.h and Settings.c

prepared the "place holder" for the codec info into menu.c

 

I hope to dedicate more time on this... in the near future.

 


- rEFIt_UEFI/Platform/hda.c

- rEFIt_UEFI/Platform/hda.h

- rEFIt_UEFI/Platform/Platform.h

- rEFIt_UEFI/Platform/Settings.c

- refit/menu.c

 

--> attachicon.gifClover_HDA_update.zip

 

Cordially

 

ErmaC

Hello ErmaC.

I have a question about hda controller.

 

In recent, I installed Sierra 10.2.2 on Dell venue 11 Pro 7140.

 

Most of features is working. But has no sound device.

 

Shown Realtek ALC3236 in BIOS.

And Shown Realtek HW Codecs in AIDA64.

 

I booted Ubuntu and see Broadwell rxx codec in sound prefpane. There is no Realtek codec in Ubuntu. I tried to get realtek codec info from terminal. Not exist it.

 

Then, i check DSDT HDEF part. Has HDEF. But i cant see HDEF part in IOREG.

 

AppleHDA Patch by me is not working. There is no sound device.

VoodooHDA too with only shown HDMI output 3 part in Prefpane.

 

I see Audio part in Clover GUI. there is no Realtek Sound. Only has Broadwell HDMI. Shown no Audio device in Clover log.

 

Can i have any chance in your code?

 

Thanks in advance

 

Add. I confirmed ALC3236 codec has i2c interface.

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

Can i have any chance in your code?

Hi Sherlocks...

the recently changes no make any difference, because what the code do is a sort of LSPCI...

capture data from the device iterate with the internal "reference" (the hardcoded controller name) and show it in the GUI...

...can be useful only in that way IMHO... like a direct "reference" for the hardware owned.

now.. take in mind all the probe on the peripheral are categorized based on PCI class and class sub field, like

network controller (02), graphics controller (03)

or audio/multimedia (04) (HD subfield is 0x0403) maybe have a new subfield? maybe 0x0480? .. no idea...

 

ErmaC

Link to comment
Share on other sites

Guys,

ever see your agreement about 80.save_nvram_plist.local?

 

 

i am using the 1.6 version which is based on syscl script -  i posted Jan 14 -  as a LogoutHook for the last week without issue. 

features:

mount vs diskutil

only write to /ESP if a clover folder is found

no force unmount

 

assumption/best practice:

1) use LogoutHook vs CloverDaemon sleep loop

2) set the ESP to not be indexed (otherwise an updated to nvram.plist may inhibit unmount) - add .metadata_never_index to /Volumes/ESP

Link to comment
Share on other sites

i am using the 1.6 version which is based on syscl script -  i posted Jan 14 -  as a LogoutHook for the last week without issue. 

features:

mount vs diskutil

only write to /ESP if a clover folder is found

no force unmount

 

assumption/best practice:

1) use LogoutHook vs CloverDaemon sleep loop

2) set the ESP to not be indexed (otherwise an updated to nvram.plist may inhibit unmount) - add .metadata_never_index to /Volumes/ESP

Blocking LogoutHook is not the best practice though.

Link to comment
Share on other sites

Yes i understand there are plus and minuses with a logoutHook approach and probably there is more than one solution. Case and point, i use a LogoutHook to do more than just save the nvram.plist file ESP.  so one can implement a logoutHook "wrapper" script - which may include the /etc/rc.shutdown.d/80 script as part of that workflow - essential does what CloverDaemon does but is initiated by logoutHook. Note: the challenge is/has been the race to shutdown - that is what scripts will or can complete as filesystems and services are eliminated during shutdown.  the logoutHook seems to be an option that is workable.  so not saying block logoutHook for just 1 script -  but use the mechanism.

in fact this is my logoutHook:

 

sudo defaults write com.apple.loginwindow LogoutHook /Library/Application\ Support/Clover/CloverDaemon-shutdown

 

/L/AS/Clover/CloverDaemon                     Only runs StartService  - no sleep loop (commented out)

/L/AS/Clover/CloverDaemon-shutdown - Only runs StopService

 

and i just put stuff in /etc/rc.shutdown.d that i want to execute on logout (or shutdown)

Link to comment
Share on other sites

Yes i understand there are plus and minuses with a logoutHook approach and probably there is more than one solution. Case and point, i use a LogoutHook to do more than just save the nvram.plist file ESP. so one can implement a logoutHook "wrapper" script - which may include the /etc/rc.shutdown.d/80 script as part of that workflow - essential does what CloverDaemon does but is initiated by logoutHook. Note: the challenge is/has been the race to shutdown - that is what scripts will or can complete as filesystems and services are eliminated during shutdown. the logoutHook seems to be an option that is workable. so not saying block logoutHook for just 1 script - but use the mechanism.

 

in fact this is my logoutHook:

 

sudo defaults write com.apple.loginwindow LogoutHook /Library/Application\ Support/Clover/CloverDaemon-shutdown

 

/L/AS/Clover/CloverDaemon Only runs StartService - no sleep loop (commented out)

/L/AS/Clover/CloverDaemon-shutdown - Only runs StopService

 

and i just put stuff in /etc/rc.shutdown.d that i want to execute on logout (or shutdown)

I understand you. But my case sometimes fail to gernerate nvram file and refresh about 3/10 in your script. In your script, my behavior is not reflect sometimes, as result, reboot, nvram files is fail case

 

나의 LG-F410S 의 Tapatalk에서 보냄

Hi Sherlocks...

the recently changes no make any difference, because what the code do is a sort of LSPCI...

capture data from the device iterate with the internal "reference" (the hardcoded controller name) and show it in the GUI...

...can be useful only in that way IMHO... like a direct "reference" for the hardware owned.

now.. take in mind all the probe on the peripheral are categorized based on PCI class and class sub field, like

network controller (02), graphics controller (03)

or audio/multimedia (04) (HD subfield is 0x0403) maybe have a new subfield? maybe 0x0480? .. no idea...

 

ErmaC

Thank you for reply.

 

In dell venue 11 pro case, almost consist of I2C interface. Its hard to use osx features. I just wonder whether your code can catch I2C interface information. I see your code now in latest clover commit. I understand.

 

My case maybe need new VoodooI2C or new kext.

 

Thank you

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

@sherlocks

 

you say the script sometimes fails...

 

did you comment out the last 5 lines in  /Library/Application Support/CloverDaemon so that the 80.save_nvram script runs only from LogoutHook?

did you change the ESP to not be indexed? 

Link to comment
Share on other sites

@sherlocks

 

you say the script sometimes fails...

 

did you comment out the last 5 lines in  /Library/Application Support/CloverDaemon so that the 80.save_nvram script runs only from LogoutHook?

did you change the ESP to not be indexed? 

 

i didn't change anything. i'm using clover r3974 build and just replace rc script from your script.

Link to comment
Share on other sites

×
×
  • Create New...