zearp/Nucintosh

chime can only be heard by headphone

qhgary opened this issue · 15 comments

My host is NUC8i7BEH and my monitor has built-in speakers, which I connected using an HDMI-mini HDMI cable. I'm facing the following issues:

When starting up with OpenCore, the startup chime can only be heard when headphones are plugged into the host. If I unplug the headphones, there is no sound coming from the monitor's speakers.
After successful startup, I can play music in the system and the sound can be heard normally from the monitor's built-in speakers.
It's strange that if it was a driver or configuration problem, the sound should not be coming from the monitor's speakers after the system starts up. But the chime can only be heard when headphones are plugged in.

My OpenCore version is 0.9.1, and I had the same issue with version 0.8.8. The macOS version is macOS 13 Ventura.

zearp commented

This is not an issue or bug with the EFI as I don’t use or have a chime configured.

To fix this you need to tell OpenCore which output to use. This is documented in the OpenCore docs.

Good luck!🤞

zearp commented

This should help you get the right audio output selected:

https://dortania.github.io/OpenCore-Post-Install/cosmetic/gui.html#setting-up-boot-chime-with-audiodxe

I don't include the chime or graphical interface and even if I did I would disable those by default and also the audio output I could configure might not work on other systems. So I skip it and leave it up to the end user to decide if they want any of these extra's or not. My EFI is meant as a stable minimal EFI that just works. It wil get your system up and running and the rest is up to you.

zearp commented

Here's a debug version of the current EFI. You'll need it to gather the audio output in a log file. Also the guide says outputting audio over hdmi/gpu might be hit or miss. So it might not be possible at all to get to play a sound at boot time over hdmi/gpu but there's only one way to find out.

EFI-debug.zip

You will still have to edit the config to enable the actual debug logs. This version has just been compiled with debug support, logging is not enabled by default. To enable writing log files just follow these steps:

https://dortania.github.io/OpenCore-Install-Guide/troubleshooting/debug.html

You will also need to add this version of OpenCanopy to the drivers folder and in your config file.

OpenCanopy.efi.zip

Good luck and let me know how it goes!

zearp commented

This the only audio out put it detected:

26:837 00:032 OCAU: 1/2 PciRoot(0x0)/Pci(0x1F,0x3)/VenMsg(A9003FEB-D806-41DB-A491-5405FEEF46C3,00000000) (1 outputs) - Success

It does detect something and it only has 1 output, so there's nothing much to change there. There might be some missing drivers or settings. Further on the log you can see it plays a sound over that single output it has detected. If that output is not over hdmi then it may not be possible to play the chime on your monitor.

29:538 00:035 OC: Starting to play chime...
29:582 00:044 OCAU: File VoiceOver_Boot for type OCEFIAudio lang 35 is 32 2 2 (446976) - Success
30:166 00:584 OC: Play chime started - Success

The problem with me doing this in the EFI itself is that it will likely only work on the machine I test it on as everybody's setup is slightly different. For example, if I setup boot chime in the EFI and configure it to use hdmi then the boot chime will not sound for anyone not using hdmi. So I just don't add such things as they're pretty much useless in a sense they don't make or break the hackintosh. I don't know how often people reboot their machines but I always put mine to sleep. So a boot chime or graphical boot menu are things I'm not interested in. People can add it themselves following the Dortania guides.

Can you zip your EFI and attach it so I can see what kind of drivers you added and how you set it up?

Please don't expect me to solve or set this up for you. I can try and have a look but my time is limited and I don't want everybody to start opening issues asking me to help them setup their system post install.

zearp commented

I tried fixing the log messages in your post but email replies don't support markdown. If possible please post logs from a browser on Github and put them in a code box for easier reading.

I tried fixing the log messages in your post but email replies don't support markdown. If possible please post logs from a browser on Github and put them in a code box for easier reading.

Do you mean like this? (About the error log)

`=============== Opencore log snippets Begin ================

…
141:385 02:611 AAPL: #[EB.H.IS|!] Err(0xE) <- RT.GV boot-signature 7C436110-AB2A-4BBB-A880-FE41995C9F82
141:494 00:109 AAPL: #[EB.H.IS|!] Err(0xE) <- RT.GV boot-image-key 7C436110-AB2A-4BBB-A880-FE41995C9F82
141:602 00:107 AAPL: #[EB|H:IS] 0
141:709 00:106 AAPL: #[EB|LOG:INIT] 2023-04-08T15:35:28
144:321 02:612 AAPL: #[EB|VERSION] <"boot.efi 577~129 (Official), built 2023-03-04T13:39:27-0800">
144:431 00:109 AAPL: #[EB|BUILD] <"BUILD-INFO[393]:{"DisplayName":"boot.efi","DisplayVersion":"577~129","RecordUuid":"1E21D10A-1915-48FF-B754-4C97E26C57E9","BuildTime":"2023-03-04T13:39:27-0800","ProjectName":"efiboot","ProductName":"boot.efi","SourceVersion":"577","BuildVersion":"129","BuildConfiguration":"Release","BuildType":"Official","Compiler":"clang-1403.0.22.11","SdkVersion":"13.3","SdkBuild":"22E240","TargetArchitectures":"x86_64"}">
144:541 00:109 AAPL: #[EB.CFG.DEV|!] Err(0xE) <- RT.GV booter-strict-xmlparser 7C436110-AB2A-4BBB-A880-FE41995C9F82
147:156 02:615 AAPL: #[EB|CFG:DEV] r5 0x0 0x0
...
...
...
171:043 02:449 AAPL: #[EB|WL] 0 0 0x01 0x01   5 0x00
171:160 00:117 AAPL: #[EB.H.CHK|BM] 0x0000000000000000
171:275 00:115 AAPL: #[EB.H.LV|!] Err(0xE) <- RT.GV boot-signature 7C436110-AB2A-4BBB-A880-FE41995C9F82
173:712 02:436 AAPL: #[EB|WL] 0 0 0x01 0x01  23 0x0E
173:829 00:117 AAPL: #[EB.H.LV|!] Err(0xE) <- RT.GV boot-image-key 7C436110-AB2A-4BBB-A880-FE41995C9F82
174:836 01:006 AAPL: #[EB|WL] 0 0 0x01 0x01  24 0x0E
174:844 00:007 AAPL: #[EB.H.LV|!] Err(0xE) <- RT.GV boot-image 7C436110-AB2A-4BBB-A880-FE41995C9F82
174:851 00:006 AAPL: #[EB.H.LV|!] Err(0xE) <- RT.SV- boot-signature 7C436110-AB2A-4BBB-A880-FE41995C9F82
174:857 00:006 AAPL: #[EB.H.LV|!] Err(0xE) <- RT.SV- boot-image-key 7C436110-AB2A-4BBB-A880-FE41995C9F82
174:863 00:006 AAPL: #[EB.H.LV|!] Err(0xE) <- RT.SV- boot-image 7C436110-AB2A-4BBB-A880-FE41995C9F82
174:870 00:006 AAPL: #[EB|H:NOT]
174:876 00:006 AAPL: #[EB|SB:P] 0x1
174:883 00:006 AAPL: #[EB.B.MN|BM:+SB]
174:889 00:006 AAPL: #[EB|LIMG:DP] Acpi(PNP0A03,0)/Pci(17|0)/SATA(2,FFFF)/HD(Part6,SigD5D1636E-4EF6-4F0E-AEC3-B749D6106680)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842)
174:896 00:006 AAPL: #[EB|LIMG:FP] \7FF86C07-67E2-4614-A5FE-E6A631B02E9B\System\Library\CoreServices\boot.efi
174:902 00:006 AAPL: #[EB|LIMG:OPT]
174:909 00:006 AAPL: #[EB.OPT.LXF|F] <"\\7FF86C07-67E2-4614-A5FE-E6A631B02E9B\\System\\Library\\CoreServices\\com.apple.Boot.plist">
174:915 00:006 AAPL: #[EB.LD.LF|IN] 0 1 <"\\7FF86C07-67E2-4614-A5FE-E6A631B02E9B\\System\\Library\\CoreServices\\com.apple.Boot.plist"> <"0">
174:921 00:006 AAPL: #[EB.LD.OFS|OPEN!] Err(0xE) <"\\7FF86C07-67E2-4614-A5FE-E6A631B02E9B\\System\\Library\\CoreServices\\com.apple.Boot.plist">
174:928 00:006 AAPL: #[EB.OPT.LXF|LF!] Err(0xE)
174:934 00:006 AAPL: #[EB.OPT.LXF|F] <"Library\\Preferences\\SystemConfiguration\\com.apple.Boot.plist">
174:941 00:006 AAPL: #[EB.LD.LF|IN] 0 1 <"Library\\Preferences\\SystemConfiguration\\com.apple.Boot.plist"> <"0">
174:950 00:008 AAPL: #[EB|KF] <"">
174:956 00:006 AAPL: #[EB|MBA:CL] <"">
174:962 00:006 AAPL: #[EB|MBA:NV] <"keepsyms=1 brcmfx-country=#a">
174:969 00:006 AAPL: #[EB|MBA:KF] <"">
174:975 00:006 AAPL: #[EB|MBA:OUT] <"keepsyms=1 brcmfx-country=#a">
174:981 00:006 AAPL: #[EB|OPT:BM] 0x280100
174:988 00:006 AAPL: #[EB.OPT.LXF|F] <"\\7FF86C07-67E2-4614-A5FE-E6A631B02E9B\\System\\Library\\CoreServices\\PlatformSupport.plist">
174:994 00:006 AAPL: #[EB.LD.LF|IN] 0 1 <"\\7FF86C07-67E2-4614-A5FE-E6A631B02E9B\\System\\Library\\CoreServices\\PlatformSupport.plist"> <"0">
175:002 00:007 AAPL: #[EB|P:CPR] N
175:008 00:006 AAPL: #[EB|P:MPI] N
175:015 00:006 AAPL: #[EB|P:BPI] N
175:021 00:006 AAPL: #[EB.OPT.RKS|!] Err(0xE) <- BS.LocP EDB4A040-6D8A-11EC-8FAD-3E22FB93ADCF
175:028 00:006 AAPL: #[EB|KMR] 212135936
175:034 00:006 AAPL: #[EB.CS.CSKSD|+]
175:041 00:006 AAPL: #[EB.CS.CSKSD|!] Err(0xE) <- RT.GV boot-info-payload 8D63D4FE-BD3C-4AAD-881D-86FD974BC1DF
175:047 00:006 AAPL: #[EB|WL] 0 0 0x01 0x01   6 0x0E
175:053 00:006 AAPL: #[EB.CS.LFC|+]
175:059 00:006 AAPL: #[EB.LD.LF|IN] 0 1 <"System\\Library\\Caches\\com.apple.corestorage\\EncryptedRoot.plist.wipekey"> <"0">
175:073 00:013 AAPL: #[EB.FS.AGSVH|PU] 7FF86C07-67E2-4614-A5FE-E6A631B02E9B
175:079 00:006 AAPL: #[EB.FS.AGSVH|!] Err(0xE) <- BS.LocHB 59D76AE4-37E3-55A7-B460-EF13D46E6020
175:086 00:006 AAPL: #[EB.G.CS|-?] Ok(0)
175:147 00:061 AAPL: #[EB.LD.LF|IN] 0 1 <"<null string>"> <"1">
175:158 00:011 AAPL: #[EB.B.SBS|SZ] 723512
175:171 00:013 AAPL: #[EB|B:SHA] <904a86866b6a1615f5ed1c2b30ddf5783c85be08>
175:178 00:006 AAPL: #[EB.WL.PWLFNV|!] Err(0xE) <- RT.GV wake-failure 7C436110-AB2A-4BBB-A880-FE41995C9F82
175:184 00:006 AAPL: #[EB.WL.DT|!] Err(0xE) <- EB.WL.PWLFNV
175:191 00:006 AAPL: #[EB.WL.PWLFRTC|NONE]
175:197 00:006 AAPL: #[EB.WL.DT|!] Err(0xE) <- EB.WL.PWLFRTC
175:203 00:006 AAPL: #[EB.LD.LKC|D] <"boot\System\Library\KernelCollections\BootKernelExtensions.kc.development">
175:210 00:006 AAPL: #[EB.LD.LF|IN] 0 1 <"boot\\System\\Library\\KernelCollections\\BootKernelExtensions.kc.development"> <"0">
175:220 00:009 AAPL: #[EB.LD.OFS|OPEN!] Err(0xE) <"boot\\System\\Library\\KernelCollections\\BootKernelExtensions.kc.development">
175:226 00:006 AAPL: #[EB.LD.LKC|R.2] <"boot\System\Library\KernelCollections\BootKernelExtensions.kc">
175:233 00:006 AAPL: #[EB.LD.LF|IN] 0 1 <"boot\\System\\Library\\KernelCollections\\BootKernelExtensions.kc"> <"0”>
…
…
…

=============== Opencore log snippets End ================`

zearp commented

I can not download that file. Tried using Safari, Firefox and Brave. Seems Apple doesn't allow me to download files from Chinese iCloud. I do wonder what you added as it's quite big compared to the release. But I can't download it.

Screenshot 2023-04-09 at 11 31 51

I can not download that file. Tried using Safari, Firefox and Brave. Seems Apple doesn't allow me to download files from Chinese iCloud. I do wonder what you added as it's quite big compared to the release. But I can't download it.

Screenshot 2023-04-09 at 11 31 51

Sorry for that. There’s nothing special, I forgot to remove some useless kext files in which there’s a big size driver called “AirportItlwm.kext” takeing 16M.
I listed those removed files as below:
AirportItlwm.kext
BlueToolFixup.kext
IntelBluetoothFirmware.kext
IntelBluetoothInjector.kext
NVMeFix.kext

actually I don’t use any of these drivers because I’m using BCM94360CS2 (with M.2 conversion card) which is driverless and I disabled the Intel network card and bluetooth in BIOS.
There’s no problem to use airdrop or sidecar function. Please refer to the OC.zip and the latest OpenCore log file after my removing all the useless kexts.
OC.zip
opencore-2023-04-09-115700.txt

zearp commented

Why don't you use the AirportItlwm kexts provided by the EFI and /Stuff folder? They are compiled with only the needed firmware. It seems you added more kexts that are also in the EFI. For kexts it's better not to change them. Updating them to a slightly newer version doesn't really matter and is more likely to break something than improve anything. also I always use the latest git builds of kexts, so many packages are as new as they get at the time of release. I can not really help anyone not using a release EFI but make their own as it ads many factors and possibilities of things going wrong.

Your config and EFI look ok though, an audio driver is added and loaded. The logs indicate a sound is played over the only audio output it could detect. Which unfortunately is the headphone output. This is not something I can fix. Audio over hdmi works in macOS but getting to work at boot time might be impossible as the Dortania guide alluded to.

When I have some spare time I will see what kind of audio outputs it detects on my NUCs. But I think I will get the same results. I already had to add an extra device to the config to get audio over hdmi to work at all.

https://github.com/zearp/Nucintosh/blob/master/EFI/OC/config.plist#L174-L186

Without that entry audio over hdmi won't work unless you re-plug the cable. My guess is this device isn't added before the audio driver loads, so the audio driver only sees 1 output. We can not change this loading order as it is done by OpenCore itself.

I think the boot chime playing over hdmi is something that likely will not work. How is your monitor connected? Using the hdmi port or the usb-c?

As I said, I used BM94360CS2 network card which is Apple native. I have installed this card with an M.2 adapter into the M.2 slot, and connected my hard drive using the SATA interface. And I think that's why I have no problem with sidecar and airdrop at all.

To avoid any conflict or trouble, I disabled the original Intel wireless card and bluetooth in BIOS. That's why I disabled “AirportItlwm.kext” which is the wireless driver, isn't it? And bluetooth related kexts as well.

My display has 1 mini-HDMI port and 2 type-c ports. So I can connect it to the host with a mini-HDMI to HDMI cable or a type-c to type-c cable. Using type-c to type-c cable will reduce the display power cable and mini-HDMI cable, however the screen is a little bit dim. I guess it may be related to the voltage, so I'm now using the mini-HDMI to HDMI cable connecting my display to the host.

By the way, I tried both of the cables, and the result is the same. (Chime can only be heard when the headphone is plugged in)

zearp commented

I don't know if you read my reply but it won't work because the audio driver only detects 1 output according to your log. That output is the headphone output. So this simply won't work. I outlined the details above.

Yeah, I did read your reply and tried your DP sections:
<dict> <key>AAPL,slot-name</key> <string>Internal@0,31,3</string> <key>device_type</key> <string>Audio device</string> <key>hda-gfx</key> <string>onboard-1</string> <key>layout-id</key> <data>DgAAAA==</data> <key>model</key> <string>Cannon Point-LP High Definition Audio Controller</string> </dict>
Please see the attached OpenCore log and corresponding config.plist.

log_config.zip

zearp commented

26:837 00:032 OCAU: 1/2 PciRoot(0x0)/Pci(0x1F,0x3)/VenMsg(A9003FEB-D806-41DB-A491-5405FEEF46C3,00000000) (1 outputs) - Success

The log is same as before; the driver only detects one output which is the headphone not the hdmi. There is nothing I can do about that nor is this an issue with the EFI. You can't play sounds over hdmi if there's no output detected and in order to get that output detected changes to OpenCore itself may be needed. I don't have the time or motivation to spend on this.

I do not use a boot chime and I will also not add it to the EFI as I consider boot chime and graphical menu's to be bloat and unnecessary. I even turn off the menu and hold down alt when I need to see the OpenCore menu.