I am using an old laptop as a dvd player, so I want the sound to always play via HDMI, but whenever I suspend the sound switches back to the internal speakers. I can change the sound back to HDMI with this command:pacmd set-card-profile 0 output:hdmi-stereoI've edited /etc/pulse/default.pa as follows:load-module module-stream-restore restore_device=false #added restore_device=false...#load-module module-switch-on-port-available #commented this out...set-card-profile 0 output:hdmi-stereo #added at end of fileThis makes HDMI the default when the computer boots, but on suspend it still switches back to internal speakers. How can I permanently make HDMI default? If it helps, the output of pacmd list-cards is:1 card(s) available.index: 0name: <alsa_card.pci-0000_00_1b.0>driver: <module-alsa-card.c>owner module: 6properties:    alsa.card = 0    alsa.card_name = HDA Intel MID    alsa.long_card_name = HDA Intel MID at 0xf6000000 irq 30    alsa.driver_name = snd_hda_intel    device.bus_path = pci-0000:00:1b.0    sysfs.path = /devices/pci0000:00/0000:00:1b.0/sound/card0    device.bus = pci    device.vendor.id = 8086    device.vendor.name = Intel Corporation    device.product.id = 3b56    device.product.name = 5 Series/3400 Series Chipset High Definition Audio    device.form_factor = internal    device.string = 0    device.description = Built-in Audio    module-udev-detect.discovered = 1    device.icon_name = audio-card-pciprofiles:    input:analog-stereo: Analogue Stereo Input (priority 60, available: unknown)    output:analog-stereo: Analogue Stereo Output (priority 6000, available: unknown)    output:analog-stereo+input:analog-stereo: Analogue Stereo Duplex (priority 6060, available: unknown)    output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)    output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analogue Stereo Input (priority 5460, available: unknown)    output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)    output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analogue Stereo Input (priority 360, available: unknown)    off: Off (priority 0, available: unknown)active profile: <output:analog-stereo>sinks:    alsa_output.pci-0000_00_1b.0.analog-stereo/#2: Built-in Audio Analogue Stereosources:    alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#2: Monitor of Built-in Audio Analogue Stereoports:    analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)        properties:            device.icon_name = audio-input-microphone    analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)        properties:            device.icon_name = audio-input-microphone    analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)        properties:            device.icon_name = audio-speakers    analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)        properties:            device.icon_name = audio-headphones    hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)        properties:            device.icon_name = video-display            device.product.name = LG TVUpdate: for some reason, copying /etc/pulse/ to ~/.config/pulse made it work. No idea why
How to set HDMI sound output as default on Ubuntu 16.04
ubuntu;pulseaudio