[lubuntu-users] Audio through HDMI setting?

Jeff Kurzner jkurzner at mindshaft.com
Tue Aug 1 17:01:23 UTC 2017


That solved it thank you.

 

From: lubuntu-users-bounces at lists.ubuntu.com
[mailto:lubuntu-users-bounces at lists.ubuntu.com] On Behalf Of Israel
Sent: Tuesday, August 01, 2017 10:06 AM
To: lubuntu-users at lists.ubuntu.com
Subject: Re: [lubuntu-users] Audio through HDMI setting?

 

On 08/01/2017 08:38 AM, Jeff Kurzner wrote:

First time install of lubuntu for a Plex server on ASUS hardware.  System
seems to work fine and I get HDMI hi res output from the HDMI connector, but
no audio.  Is there some setting I am missing?  

 


 
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai
gn=sig-email&utm_content=emailclient&utm_term=icon> 

Virus-free.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai
gn=sig-email&utm_content=emailclient&utm_term=link> www.avast.com 





Hi,

I you can enable it through PulseAudio Volume Control as arcesson said.

You can also make a specific set of rules and scripts to do it automatically
(more or less).

I have these files, but I do not think I can attach them directly (I learned
this from the ever helpful Arch Wiki), so here they are :

/usr/bin/hdmi-switch

#!/bin/bash
## TAKEN from ARCH wiki... thanks guys for always being awesome :D
#https://wiki.archlinux.org/index.php/PulseAudio/Examples#HDMI_output_config
uration
USER_NAME=$(w -hs | awk -v vt=tty$(fgconsole) '$0 ~ vt {print $1}')
USER_ID=$(id -u "$USER_NAME")
HDMI_STATUS=$(</sys/class/drm/card0/*HDMI*/status)

export PULSE_SERVER="unix:/run/user/"$USER_ID"/pulse/native"

if [[ $HDMI_STATUS == connected ]]
then
   sudo -u "$USER_NAME" pactl --server "$PULSE_SERVER" set-card-profile 0
output:hdmi-stereo+input:analog-stereo
else
   sudo -u "$USER_NAME" pactl --server "$PULSE_SERVER" set-card-profile 0
output:analog-stereo+input:analog-stereo
fi

 

AND

/etc/udev/rules.d/99-hdmi_sound.rules

KERNEL=="card0", SUBSYSTEM=="drm", ACTION=="change",
RUN+="/usr/bin/systemctl start hdmi_sound_toggle.service"

AND finally:

/etc/systemd/system/hdmi_sound_toggle.service

[Unit]
Description=hdmi sound hotplug

[Service]
Type=simple
RemainAfterExit=no
ExecStart=/usr/bin/hdmi_switch

[Install]
WantedBy=multi-user.target

 

-- 
Regards


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20170801/36b8c3b0/attachment-0001.html>


More information about the Lubuntu-users mailing list