HDMI Audio Configuration
If you're using an HDMI display with its own built-in speakers, you can configure your system to output audio over the HDMI connection. (These steps should also work for DisplayPort connections.)
Using the Sound Settings
To make all sound play over HDMI, open the menu in the top right of the screen, then click the icon in the bottom left of the menu.
Choose the Sound page using the left sidebar.
Under the "Output" section, click the dropdown box to display a list of output devices, then select the HDMI device you wish to use for audio output.
After selecting the appropriate device, sound should play through the HDMI connection. You can use the "Test" button to test the HDMI-connected speakers.
Using PulseAudio Volume Control
The PulseAudio Volume Control utility also allows you to change the sound output. In addition to changing the default output device, you can also set the output device (and volume) on a per-application basis.
PulseAudio Volume Control can be installed using this command:
sudo apt install pavucontrol
Then, open the utility by running
pavucontrol in a terminal, or by opening the PulseAudio Volume Control app using the Activities menu.
On the "Output Devices" tab, the output device with the green checkmark selected is the default (or "fallback") audio device.
You can set a device as default by clicking the green checkmark next to it.
On the "Playback" tab, each application that's playing audio will be listed. You can change which output device a specific application is using by selecting it under the drop-down box next to that application.