• Output sound via Displayport


    Hello,
    I recently got a new monitor which has a speaker output. So I am looking for a way to output sound via the Displayport where the Monitor is connected.

    I checked the Pulse Audio Settings and I find only the integrated Speakers and the Headphone Out, but I am unable to find another Device to select the Displayport.

    Found a part of the Arch Wiki here, where it was noted that the sound output must be specifically activated with the Nvidia Driver. The part was just talking over HDMI though. Wiki

    But there is what I am struggling with, whatever I try I can’t get the commands working. I guess I need to replace the PCI Numbers? Since when I try the first command it cannot find the config.

    setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
    
    pcilib: Cannot open /sys/bus/pci/devices/0000:01:00.0/config
    pcilib: Cannot open /sys/bus/pci/devices/0000:01:00.0/config
    

    But how do I find out the correct device for the port?
    lspci outputs this:

    00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
    00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
    00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
    00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04)
    00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
    00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
    00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
    00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
    00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
    00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
    00:1f.0 ISA bridge: Intel Corporation QM77 Express Chipset LPC Controller (rev 04)
    00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
    00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
    01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K2000M] (rev a1)
    02:00.0 System peripheral: Ricoh Co Ltd PCIe SDXC/MMC Host Controller (rev 08)
    02:00.3 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 PCIe IEEE 1394 Controller (rev 04)
    03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)
    

    But I don’t see a Displayport here either. Can someone point me in the correct direction or tell be what I do wrong?

  • I’ve tried around a few other things I found on the net, but unfortunately, I still can’t get the Audio to work.
    Pavucontrol is installed but it only offers ‘Speakers’ and ‘Headphones (unplugged)’ as options. When I open Alsamixer I also cannot see the Nvidia Graphics.

    Some more things that might help, of how to get Audio via Displayport working? I checked in with Lenovo Support and they said my Laptop definitely support the Audio via Displayport.
    Is it caused by Bumblebee, that I cannot get Audio?

    A few more Terminal commands I found, hopefully, one of you knows more about what to do.

    [[email protected] ~]$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    [[email protected] ~]$ aplay -L
    null
        Discard all samples (playback) or generate zero samples (capture)
    pulse
        PulseAudio Sound Server
    default
        Default ALSA Output (currently PulseAudio Sound Server)
    sysdefault:CARD=PCH
        HDA Intel PCH, ALC269VC Analog
        Default Audio Device
    front:CARD=PCH,DEV=0
        HDA Intel PCH, ALC269VC Analog
        Front speakers
    surround21:CARD=PCH,DEV=0
        HDA Intel PCH, ALC269VC Analog
        2.1 Surround output to Front and Subwoofer speakers
    surround40:CARD=PCH,DEV=0
        HDA Intel PCH, ALC269VC Analog
        4.0 Surround output to Front and Rear speakers
    surround41:CARD=PCH,DEV=0
        HDA Intel PCH, ALC269VC Analog
        4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=PCH,DEV=0
        HDA Intel PCH, ALC269VC Analog
        5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=PCH,DEV=0
        HDA Intel PCH, ALC269VC Analog
        5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=PCH,DEV=0
        HDA Intel PCH, ALC269VC Analog
        7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    
    [[email protected] ~]$ inxi -Fz
    System:    Host: antergos Kernel: 4.18.10-arch1-1-ARCH x86_64 bits: 64 Desktop: Gnome 3.30.0 
               Distro: Antergos Linux 
    Machine:   Type: Laptop System: LENOVO product: 24476J7 v: ThinkPad W530 serial: <filter> 
               Mobo: LENOVO model: 24476J7 serial: <filter> UEFI [Legacy]: LENOVO 
               v: G5ET98WW (2.58 ) date: 04/01/2014 
    CPU:       Topology: Quad Core model: Intel Core i7-3740QM bits: 64 type: MT MCP 
               L2 cache: 6144 KiB 
               Speed: 1255 MHz min/max: 1200/3700 MHz Core speeds (MHz): 1: 1225 2: 1236 3: 1198 
               4: 1199 5: 1220 6: 1196 7: 1245 8: 1199 
    Graphics:  Device-1: Intel 3rd Gen Core processor Graphics driver: i915 v: kernel 
               Device-2: NVIDIA GK107GLM [Quadro K2000M] driver: nvidia v: 390.87 
               Display: x11 server: X.Org 1.20.1 driver: intel 
               resolution: 1920x1080~60Hz, VIRTUAL8.742-1920x1080~60Hz 
               OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile v: 4.2 Mesa 18.2.1 
    Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio driver: snd_hda_intel 
               Sound Server: ALSA v: k4.18.10-arch1-1-ARCH 
    Network:   Device-1: Intel 82579LM Gigabit Network driver: e1000e 
               IF: enp0s25 state: down mac: <filter> 
               Device-2: Intel Centrino Ultimate-N 6300 driver: iwlwifi 
               IF: wlp3s0 state: up mac: <filter> 
    Drives:    Local Storage: total: 465.76 GiB used: 251.80 GiB (54.1%) 
               ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS725050A7E630 size: 465.76 GiB 
    Partition: ID-1: / size: 46.68 GiB used: 15.75 GiB (33.7%) fs: ext4 dev: /dev/sda2 
               ID-2: /boot size: 1022.2 MiB used: 59.6 MiB (5.8%) fs: ext4 dev: /dev/sda1 
               ID-3: /home size: 406.53 GiB used: 235.99 GiB (58.0%) fs: ext4 dev: /dev/sda3 
    Sensors:   System Temperatures: cpu: 47.0 C mobo: N/A 
               Fan Speeds (RPM): cpu: 0 
    Info:      Processes: 237 Uptime: 15m Memory: 7.36 GiB used: 1.05 GiB (14.3%) Shell: bash 
               inxi: 3.0.24 
    
  • Okay, unfortunately, nobody had a solution or some idea what was causing the problem.
    I finally found a solution on how to get it working and thought I would share it if someone ever has a similar problem.
    I had to install a Kernel Module from GitHub since the scripts I found for reloading Nvidia Driver never worked. This module is also in the AUR, but the Dependencies there seems to have forgotten about the Nvidia 390xx Drivers and was trying to install the normal Nvidia one. So I needed to install manually and load up.

    One problem I still have is, that I have to load the Kernel Module manually after every reboot. It would be great if that could be automated.
    But I don’t have any experience with that, so I am a bit worried to break something. So any help with loading up Kernel Modules would still be great. But I will mark it as solved since Audio is working now.

  • @severus
    Is it so that using dkms versions like nvhda-dkms-git and nvidia-390xx-dkms (with proper headers for the kernel) doesn’t automagically work?

  • @manuel That sounds pretty interesting. I haven’t tried that yet. I am pretty worried I will break anything if I replace Nvidia-390xx with the dkms Version.
    Is there anything I need to keep in mind there? I have installed the nvhda-dkms-git via the command given on GitHub, since the AUR Version has listed only Nvidia as a Dependency:

    sudo make -f Makefile.dkms
    

    But it certainly would be a dream if it could magically work.

  • sudo nano /etc/modules-load.d/nvhda.conf
    

    and paste in this:

    nvhda
    

    save file with [Ctrl+X]

    and it will autoload the module on bootup

  • as dkms will only automaticly renew the module if kernel is updated…

  • @severus
    To be on the safe side, I’d ask @joekamprad since he’s the graphics wizard here (and I’m not).
    AFAIK, you just need to install those dkms packages (they will replace some non-dkms packages). It probably is useful write down all removed and installed packages during the process.
    If something goes really wrong, you can restore the old situation by reinstalling the packages that were removed. And for that, it is wise to create the USB installer stick (if you don’t have that anymore) so that you are able to boot and then chroot.

  • @severus said in Output sound via Displayport:

    nvhda

    yes using the AUR build simple install it with packagemanager or from terminal:

    yay -S nvhda-dkms-git
    

    no need for manual make / install …

  • @joekamprad
    Thank you for the explanation to load up the nvhda automatically. That works for me. Now I only need to turn on my monitor and turn on the Audio. Well it’s still 2 commands, but much better than 4.

    intel-virtual-output
    
    sudo tee /proc/acpi/nvhda <<<ON
    

    I also would have preferred to install from AUR. But the AUR Package seems to have a Dependency to require the nvidia package or the legacy nvidia-340xx.
    My system requires the legacy nvidia-390xx and that is what I have installed. When I tried to install from AUR, with Aurman or Pamac, it tried to remove my nvidia-390xx Drivers and install the standard nvidia package.
    That is the reason I did not install from AUR, since I did not wanted to remove my graphics drivers obviously.

    I suspect there might be an error from the Dependency Listing on the AUR package itself since nvidia-390xx should be recognized as well as a satisfied dependency.

  • @manuel
    Thank you for the explanation. I will keep that in mind when I install it.

  • @severus you can change that by editing PKGBUILD file if you installing from terminal, or by downloading the sources from AUR:

    https://aur.archlinux.org/cgit/aur.git/snapshot/nvhda-dkms-git.tar.gz

  • This is the PKGBUILD:

    # Maintainer: Fabio Heday <[email protected]>
    
    pkgname=nvhda-dkms-git
    _pkgbase=nvhda
    pkgver=r10.3e13d2e
    pkgrel=1
    pkgdesc="Kernel driver to dynamically enable/disable NVIDIA HDMI audio output in optimus laptops"
    arch=(i686 x86_64)
    url="https://github.com/hhfeuer/nvhda.git"
    license=(GPL)
    makedepends=(cmake gcc nvidia linux-headers)
    source=("git+https://github.com/hhfeuer/nvhda.git")
    md5sums=('SKIP')
    
    pkgver() {
      cd nvhda
      printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    }
    
    build() {
      cd nvhda
      make
    }
    
    package() {
      _KVERSION=`uname -r`
      cd nvhda
      mkdir -p "${pkgdir}/usr/lib/modules/$_KVERSION/misc/nvhda/"
      install -m644  nvhda.ko "${pkgdir}/usr/lib/modules/$_KVERSION/misc/nvhda/"
        
      # Copy dkms.conf
      install -Dm644 dkms/dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
      # Copy dkms.conf
      install -Dm644 dkms/dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
    
      # Set name and version
      sed -e "s/#MODULE_VERSION#/${pkgver}/" \
          -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
    
      # Copy sources (including Makefile)
      cp Makefile nvhda.c "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
    
      #install systemd units
          install -Dm644 "scripts/nvhda-resume.service" "${pkgdir}/usr/lib/systemd/system/nvhda-resume.service"
          install -Dm644 "scripts/nvhda-suspend.service" "${pkgdir}/usr/lib/systemd/system/nvhda-suspend.service"
    
    }
    

    In PKGBUILD file the line specifying makedepends includes nvidia package (that is the only dependency I can see). That nvidia could be changed to nvidia-390xx.

    But keeping the PKGBUILD up to date in the future requires some extra work from you, unless you wish to contact the maintainer to include the needed changes (which would be the best solution for you).

    You can download the PKGBUILD from: https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=nvhda-dkms-git
    and edit it.
    Then, to install the nvhda-dkms-git package, you can run command

    makepkg -sic
    

    in the same directory where the PKGBUILD file is.

  • @Severus
    Just for you :)
    I wrote a small bash script to keep that package up to date. You can put this script to a bash file, e.g. nvhda-update.bash, and run it with command

    bash nvhda-update.bash
    

    and it will install or update (if needed) the nvhda-dkms-git package in your system.

    #!/bin/bash
    
    _check_nvhda()
    {
        wget -q -O PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=nvhda-dkms-git
    
        local current_version=$(pacman -Q nvhda-dkms-git 2>/dev/null | awk '{print $2}')
        local new_version=$(grep "pkgver=" PKGBUILD | sed 's|pkgver=||')
        local new_rel=$(    grep "pkgrel=" PKGBUILD | sed 's|pkgrel=||')
    
        if [ "${new_version}-$new_rel" != "$current_version" ] ; then
            sed -i 's| nvidia | nvidia-390xx |' PKGBUILD
            makepkg -sic
        fi
    }
    
    _check_nvhda
    
  • @manuel Thank you so much for this script. It worked great. This is so awesome. You must be a bash genius. But really thank you.

    And also thank you for explaining the PKGBUILD. Wasn’t aware it could be changed this easily. Never even looked at the PKGBUILDs since I was afraid of breaking something.

    Really need to learn some bash I think ☺

  • @severus
    Please note that if you update your system with pamac (and have AUR support enabled), it may cause an issue with nvidia when nvhda-dkms-git has a new version. The reason is the just the (conflicting) dependency of nvidia in the PKGBUILD.

    One way to solve the issue is to temporarily uninstall nvhda-dkms-git, then do the normal system update, and then run the script nvhda-update.bash again to update that package back to your system.

sound62 displayport2 Posts 16Views 516
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.