[lubuntu-users] Audio through HDMI setting?

Israel israeldahl at gmail.com
Tue Aug 1 14:06:29 UTC 2017


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_campaign=sig-email&utm_content=emailclient&utm_term=icon>
> 	Virus-free. www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link>
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
>
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_configuration
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20170801/b87865b3/attachment.html>


More information about the Lubuntu-users mailing list