Menu

No audio through HDMI with UEFI boot

2021-03-16
2021-04-02
  • TramChamploo

    TramChamploo - 2021-03-16

    Works fine with bootcamp. I'm using 0.13.2 on MacBook Pro Late 13.
    BTW thanks for the great work, allowing me for using VM under windows. Really helps a lot.

     
  • Roderick W. Smith

    I'm afraid I don't quite understand your question. Which OS has no audio? (rEFInd doesn't produce audio output.) Do you get audio when booting in some other way?

    Ultimately, a lack of audio in an OS is likely a problem in that OS; rEFInd does not touch the audio subsystem in any way. That said, there might be a workaround that involves rEFInd, such as setting the spoof_osx_version option in refind.conf or using the option to reboot into a firmware-defined boot loader in rEFInd.

     
  • joevt

    joevt - 2021-03-17

    So you're booting Windows in legacy BIOS mode and audio works. But if you boot using Windows in UEFI mode, audio doesn't work? Or are you talking about a different OS?

    You can use the System Information app in Windows to verify the BIOS Mode (in System Summary at the top). It also has a Sound Device section for listing audio devices. There should be an audio device for the motherboard and each GPU. HDMI audio is provided by the GPU audio device. What GPU is being used for the HDMI display while booted with BIOS and UEFI? Check the Device Manager - Ciew by Connection and find the display.

    The ACPI stuff (DSDT, SSDT, etc) may differ depending on the bios mode that is booted. This may affect the list of audio devices. You may want to export and compare.
    https://dortania.github.io/Getting-Started-With-ACPI/Manual/dump.html
    I wonder if legacy BIOS and UEFI use different ACPI info. I guess you have to dump the ACPI in the OS to make sure you get the ACPI after changes are applied, if any.

    Also, compare the Device Manager items (view by Connection). Is there a way to export the device list as a text file?

     
    • TramChamploo

      TramChamploo - 2021-03-17

      Actually for me both refind and bootcamp use uefi mode. Legacy mode in
      refind doesn't work for me, it says no bootable disk.
      Audio devices are exactly the same under both modes. Like this:
      [image: 屏幕截图 2021-03-17 153000.png]

      joevt joevt@users.sourceforge.net 于2021年3月17日周三 上午10:59写道:

      So you're booting Windows in legacy BIOS mode and audio works. But if you
      boot using Windows in UEFI mode, audio doesn't work? Or are you talking
      about a different OS?

      You can use the System Information app in Windows to verify the BIOS Mode
      (in System Summary at the top). It also has a Sound Device section for
      listing audio devices. There should be an audio device for the motherboard
      and each GPU. HDMI audio is provided by the GPU audio device. What GPU is
      being used for the HDMI display while booted with BIOS and UEFI? Check the
      Device Manager - Ciew by Connection and find the display.

      The ACPI stuff (DSDT, SSDT, etc) may differ depending on the bios mode
      that is booted. This may affect the list of audio devices. You may want to
      export and compare.
      https://dortania.github.io/Getting-Started-With-ACPI/Manual/dump.html
      I wonder if legacy BIOS and UEFI use different ACPI info. I guess you have
      to dump the ACPI in the OS to make sure you get the ACPI after changes are
      applied, if any.

      Also, compare the Device Manager items (view by Connection). Is there a
      way to export the device list as a text file?


      No audio through HDMI with UEFI boot
      https://sourceforge.net/p/refind/discussion/general/thread/d7a39fbdb2/?limit=25#a0af


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/refind/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • joevt

    joevt - 2021-03-17

    Ok, so you're always booting Windows using UEFI.

    If you boot it without rEFInd then you get audio.
    There are three ways to skip rEFInd:
    1) use Startup Manager (hold the Option Key at boot and select Windows).
    2) use Startup Disk system preferences panel in macOS to select Windows.
    3) use bless to set Windows as the default or next boot.
    Which methods do you use?

    If you boot it from rEFInd then you get no audio. That's strange.

    Your using a Mac so there's no firmware-defined boot loader. I suppose we can look at what macOS sets the boot option to when you select Windows from Startup Disk preferences or Startup Manager.

    1)
    Use the dumpallbootvars command from the gfxutil.sh script at https://gist.github.com/joevt/477fe842d16095c2bfd839e2ab4794ff
    (follow the Download instructions first).

    2)
    Use Startup Disk preferences to select Windows. Close the Startup Disk preferences panel. Use the dumpallbootvars command again to see what changed.

    3)
    Reboot. You will automatically go into Windows. Does audio work?

    4)
    Reboot into Startup Manager (hold the option key at boot). Use the arrow keys to select Windows. Hold the control key down (the up arrow becomes a circular arrow) and press return to set Windows as the default boot option and to boot Windows. Does audio still work?

    5)
    Reboot into Startup Manager. Boot macOS. Use the dumpallbootvars command again to see what changed.

    6)
    rebless rEFInd using the bless command or Startup Manager (similar to #4).

     
  • Roderick W. Smith

    I have two suggestions:

    • Set the spoof_osx_version option in refind.conf. This helps with some problems of hardware not being correctly detected in some OSes, so it's plausible that it would help in this case; but I can't guarantee that this would do anything useful.
    • If Windows has its own boot entry in the Mac's NVRAM, you could boot using the new firmware-mediated boot method. This would be a way to, essentially, bypass rEFInd to boot Windows while still using rEFInd to boot Windows, odd as that sounds. OTOH, if Boot Camp does not create such an entry, then this won't work at all unless you create an entry yourself; and if Apple's boot manager is doing something special that the firmware's boot entry doesn't do, this method won't help.

    Beyond this, you might try asking on Apple and/or Windows forums. There are almost certainly other people using Windows on your model Mac, and they may have solved this problem. There might be a particular Windows driver that works where the one you're using doesn't work, for instance.

     
  • joevt

    joevt - 2021-03-17

    macOS usually only ever has one item in the BootOrder list. Maybe rEFInd could have an option to boot an item using the BootNext method? This would be selectable in the same way that you can choose to boot macOS in single user mode (press one of F2, Tab, Insert, + to get to the sub menu).

     
    • Roderick W. Smith

      The new option to reboot to a firmware-defined boot option is precisely what you describe: It sets the BootNext option and reboots.

       
      • joevt

        joevt - 2021-04-02

        Yes, I was saying that BootNext could be used for non-firmware defined boot options especially on a Mac where there usually is only one firmware-defined boot option for macOS. This method would exist to use rEFInd to bypass rEFInd for any boot option - firmware defined or not.

         
  • TramChamploo

    TramChamploo - 2021-03-26

    After some time using MacOS only, I found that refind booting options disappear. It doesn't show when power on my computer. But it seems that bootcamp is using refind to boot to windows, which is weird because my custom refind options works(enable vmx).

     
    • Roderick W. Smith

      If rEFInd's menu is not appearing, then either rEFInd is not launching or rEFInd's timeout setting has been set to -1, which causes rEFInd to boot its default selection immediately, unless there's a keystroke in the buffer when rEFInd launches.

      If rEFInd is no longer launching, then you've experienced a boot coup, as described here. This is a common experience after major OS updates. Apple sometimes bundles firmware updates with their macOS updates, and it's conceivable that one of these is now setting the VMX option. I haven't heard that Apple has made such a change, though; I'm just speculating.

       
      • joevt

        joevt - 2021-04-02

        Use the dumpallbootvars command to check your firmware defined boot options. It will show if a boot-coup occurred.

         
  • TramChamploo

    TramChamploo - 2021-04-02
    BootCurrent: Boot0080
    BootNext:
    Timeout: 5s
    
    BootOrder: Boot0080
    Boot0080 1 "Mac OS X" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(2,GPT,C9F6230C-DD9E-4F18-93B7-3751C0F961A8,0x64028,0x2533DEC0)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,5E117E4F6C3FC141A48CA2CF0E38F87D)/\C27D184C-CB8C-3DBC-ABC4-6C4EEF8F0C65\System\Library\CoreServices\boot.efi"
    #Searching: Boot0000(1)
    Boot0000 1 "Windows Boot Manager" "HD(1,GPT,EFA7D464-BB72-4A59-AE66-91008AB0E3E7,0x28,0x64000)/\EFI\Microsoft\Boot\bootmgfw.efi" "䥗䑎坏S"
              000000a4: 57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000002020100000010000000040000007fff0400
              000000a4: WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}.....................
    #Searching: Boot007F(-1), Boot0081(1)
    Boot0081 1 "Mac OS X" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(2,GPT,C9F6230C-DD9E-4F18-93B7-3751C0F961A8,0x64028,0x3A373058)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,5E117E4F6C3FC141A48CA2CF0E38F87D)/\B5CBE87E-AAC9-4A88-A659-65420CD50B72\System\Library\CoreServices\boot.efi"
    Boot0082 1 "" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(2,GPT,C9F6230C-DD9E-4F18-93B7-3751C0F961A8,0x64028,0x2533DEC0)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,5E117E4F6C3FC141A48CA2CF0E38F87D)/\C27D184C-CB8C-3DBC-ABC4-6C4EEF8F0C65\System\Library\CoreServices\boot.efi"
    #Searching: BootFFFF(-1)
    BootFFFF 1 "" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(2,GPT,C9F6230C-DD9E-4F18-93B7-3751C0F961A8,0x64028,0x3A373058)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,5E117E4F6C3FC141A48CA2CF0E38F87D)/\C27D184C-CB8C-3DBC-ABC4-6C4EEF8F0C65\System\Library\CoreServices\boot.efi"
    
    DriverOrder: Driver0080 Driver0081 Driver0082 Driver0083 Driver0084 Driver0085
    Driver0080 1 "apfs.efi" "Volumes/EFI*/*_bay2/../drivers/apfs.efi"
    Driver0081 1 "FakeUEFI2.efi" "Volumes/EFI*/*_bay2/../drivers/FakeUEFI2.efi"
    Driver0082 1 "nv_gop_GF10x" "Volumes/EFI*/*_bay2/../efis/nv_gop_GF10x.efi"
    Driver0083 1 "ReloadPCIRom.efi" "Volumes/EFI*/*_bay2/../drivers/ReloadPCIRom.efi"
    Driver0084 1 "UgaOnGop.efi" "Volumes/EFI*/*_bay2/../drivers/UgaOnGop.efi"
    Driver0085 1 "CrScreenshotDxe.efi" "Volumes/EFI*/*_bay2/../drivers/CrScreenshotDxe.efi"
    #Searching: Driver0000(1), Driver007F(-1), Driver0086(1), DriverFFFF(-1)
    
    BootCurrent: Boot0080
    BootNext:
    Timeout: 5s
    
    BootOrder: Boot0080
    Boot0080 1 "Mac OS X" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(1,GPT,EFA7D464-BB72-4A59-AE66-91008AB0E3E7,0x28,0x64000)"
    #Searching: Boot0000(1)
    Boot0000 1 "Windows Boot Manager" "HD(1,GPT,EFA7D464-BB72-4A59-AE66-91008AB0E3E7,0x28,0x64000)/\EFI\Microsoft\Boot\bootmgfw.efi" "䥗䑎坏S"
              000000a4: 57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000002020100000010000000040000007fff0400
              000000a4: WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}.....................
    #Searching: Boot007F(-1), Boot0081(1)
    Boot0081 1 "Mac OS X" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(2,GPT,C9F6230C-DD9E-4F18-93B7-3751C0F961A8,0x64028,0x3A373058)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,5E117E4F6C3FC141A48CA2CF0E38F87D)/\B5CBE87E-AAC9-4A88-A659-65420CD50B72\System\Library\CoreServices\boot.efi"
    Boot0082 1 "" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(2,GPT,C9F6230C-DD9E-4F18-93B7-3751C0F961A8,0x64028,0x2533DEC0)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,5E117E4F6C3FC141A48CA2CF0E38F87D)/\C27D184C-CB8C-3DBC-ABC4-6C4EEF8F0C65\System\Library\CoreServices\boot.efi"
    #Searching: BootFFFF(-1)
    BootFFFF 1 "" "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0)/HD(2,GPT,C9F6230C-DD9E-4F18-93B7-3751C0F961A8,0x64028,0x3A373058)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,5E117E4F6C3FC141A48CA2CF0E38F87D)/\C27D184C-CB8C-3DBC-ABC4-6C4EEF8F0C65\System\Library\CoreServices\boot.efi"
    
    DriverOrder: Driver0080 Driver0081 Driver0082 Driver0083 Driver0084 Driver0085
    Driver0080 1 "apfs.efi" "Volumes/EFI*/*_bay2/../drivers/apfs.efi"
    Driver0081 1 "FakeUEFI2.efi" "Volumes/EFI*/*_bay2/../drivers/FakeUEFI2.efi"
    Driver0082 1 "nv_gop_GF10x" "Volumes/EFI*/*_bay2/../efis/nv_gop_GF10x.efi"
    Driver0083 1 "ReloadPCIRom.efi" "Volumes/EFI*/*_bay2/../drivers/ReloadPCIRom.efi"
    Driver0084 1 "UgaOnGop.efi" "Volumes/EFI*/*_bay2/../drivers/UgaOnGop.efi"
    Driver0085 1 "CrScreenshotDxe.efi" "Volumes/EFI*/*_bay2/../drivers/CrScreenshotDxe.efi"
    #Searching: Driver0000(1), Driver007F(-1), Driver0086(1), DriverFFFF(-1)
    

    dumpallbootvars results before and after switching to windows in startup manager.
    Difference is in the Boot0080 section.

     
    • TramChamploo

      TramChamploo - 2021-04-02

      And using bootcamp just once makes refind menu disappear.

       
    • TramChamploo

      TramChamploo - 2021-04-02

      Now I can't bypass refind booted windows either by using holding option key
      or using startup disk manager. I reinstalled refind once.

       
      • joevt

        joevt - 2021-04-02

        I told you to execute dumpallbootvars. Why did you execute the setbootvar and setdriverorder commands? Don't execute commands until you understand what they do. I added a note to my instructions.

        zapping the PRAM will clear the Driver* variables. Or you can manually delete them like this:

        sudo nvram -d 8BE4DF61-93CA-11D2-AA0D-00E098032B8C:DriverOrder
        sudo nvram -d 8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Driver0080
        sudo nvram -d 8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Driver0081
        sudo nvram -d 8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Driver0082
        sudo nvram -d 8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Driver0083
        sudo nvram -d 8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Driver0084
        sudo nvram -d 8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Driver0085
        

        As for the change in Boot0080,
        The first Boot0080 appears to be a proper macOS boot option using the boot.efi file from a Preboot partition of an APFS container.
        The second Boot0080 appears to be a default boot option for the first partition of the same disk containing the APFS container. The first partition is probably the EFI partition. The default item is therefore \EFI\BOOT\bootx64.efi

        This command will output info about your disks to help match the partition index, UUID, start block, and size in blocks numbers from the EFI device paths to a macOS disk devices.

        diskutil info -all | grep -E 'UUID|Device Identifier|Partition Offset|Disk Size' | sed -E 's/ *Device Identifier: *//;s/(.*: *).*[^0-9]([0-9]+) [0-9]+-Byte.*/\1\2/;'
        

        As for why Boot0080 changed, this only happens in the following situations:
        1) use Startup Manager (hold option at boot), select a boot option, then hold the Control key down (the up arrow turns into a circular arrow) and press return. If this happens, the description would change from "Mac OS X" to "" blank.
        2) use Startup Disk preferences panel in macOS
        3) use the bless command
        4) use the Boot Camp control panel in Windows
        5) use EasyUEFI in Windows

        I don't think any of those except #2, #3, #4 would make the EFI partition the default boot.

        Is rEFInd in the EFI partition or is it Windows? Compare the bootx64.efi file with the refind.efi file and the bootmgfw.efi file in the \EFI\Microsoft\Boot folder.

        If bootx64.efi matches bootmgfw.efi then replace bootx64.efi with refind.efi (and rename it to bootx64.efi).

         

        Last edit: joevt 2021-04-02

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.