Sound no longer plays from HDMI devices on Ubuntu 20.04 [Solution]

Trouble

Sound is no longer played from the monitor connected from the desktop PC with the HDMI cable. When I checked the output device of Settings-> Sound-> Output, I was in a state where I could only select "Digital Output (S/PDIF) -Internal Audio" (devices connected via HDMI do not appear in the options).

environment

OS: Ubuntu 20.04.01 LTS

Check device

$ sudo ubuntu-drivers devices                                                                                                                                                                     
                                                                                                                                                               
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==                                                                                                                                           
modalias : pci:v000010DEd00001E04sv00001462sd00003712bc03sc00i00                                                                                                                                  
vendor   : NVIDIA Corporation                                                                                                                                                                     
model    : TU102 [GeForce RTX 2080 Ti]                                                                                                                                                            
driver   : nvidia-driver-440-server - distro non-free                                                                                                                                             
driver   : nvidia-driver-450-server - distro non-free                                                                                                                                             
driver   : nvidia-driver-450 - distro non-free                                                                                                                                                    
driver   : nvidia-driver-418-server - distro non-free                                                                                                                                             
driver   : nvidia-driver-455 - third-party free recommended                                                                                                                                       
driver   : xserver-xorg-video-nouveau - distro free builtin  

Checking the sound card

$ aplay -l                                      
**** List of PLAYBACK Hardware Devices ****                                                      
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]                                                                                                                              
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0                                                                     
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]                                                                                                                            
  Subdevices: 0/1                               
  Subdevice #0: subdevice #0                                                                     
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]                                                                                                                                            
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0                                                                     
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]                                                                                                                                            
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0                                                                     
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]                                                                                                                                            
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0                                                                     
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]                                                                                                                                            
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0                                                                     
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]                                                                                                                                           
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0                                                                     
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]                                                                                                                                           
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0                                                                     
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]                                                                                                                                           
  Subdevices: 1/1                               
  Subdevice #0: subdevice #0 

Solution

From the conclusion, it was solved with one command. $ pulseaudio -k (It seems to be a command to kill and restart the audio system) Reference: https://askubuntu.com/questions/1256043/no-sound-on-hdmi-ubuntu-20-04

After executing the command, when I checked the settings, an HDMI device appeared, and when I selected it, the sound was played.

Other things I tried

I saw the following article and tried to reinstall the driver, but it didn't work in my environment. https://qiita.com/soh506/items/b425aa3001b58edbea5b

Recommended Posts

Sound no longer plays from HDMI devices on Ubuntu 20.04 [Solution]
If you can't hear sound from your Bluetooth headphones on Ubuntu 20.04