Score:1

pavucontrol is not switching to headphones in Ubuntu 18.04

ph flag

It is a strange problem in my Ubuntu 18.04 OS. The OS is not detecting my headphones, as if the headphone jack is broken/faulty. The output tab in the sound window is not changing, even if I plug or unplug my headphones, as shown in a screenshot below:

enter image description here

After searching the internet and installing pavucontrol, I found that pavucontrol also shows "Headphones (unplugged)". Strangely, selecting "Headphones (unplugged)" from the dropdown menu makes sound in my headphone. Please see a screenshot below:

enter image description here

However, plugging and unplugging the headphone is not detected. I tried many suggestions but have yet to be successful so far. Below is the other information:

$ inxi -SMA
System:    Host: ravi-laptop Kernel: 5.4.0-137-generic x86_64 bits: 64 Desktop: Gnome 3.28.4
           Distro: Ubuntu 18.04.6 LTS
Machine:   Device: laptop System: Razer product: Blade v: 1.04 serial: N/A
           Mobo: Razer model: DANA_MB serial: N/A UEFI: Razer v: 01.01 date: 08/31/2018
Audio:     Card-1 Intel Cannon Lake PCH cAVS driver: snd_hda_intel
           Card-2 NVIDIA GP106 High Def. Audio Controller driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k5.4.0-137-generic

The alsa force-reload command does not return even after a few minutes. So I have to press Ctrl+C. See the output below, please:

$ sudo alsa force-reload
Terminating processes: 2012 10053
10053 10347
10347 10774
10774 (with SIGKILL:) 11413
11413 (failed: processes still using sound devices: 12091(pulseaudio)).
/sbin/alsa: Warning: Processes using sound devices: 12091(pulseaudio). 
Unloading ALSA sound driver modules: snd-hda-codec-hdmi snd-sof-pci snd-sof-intel-hda-common snd-soc-hdac-hda snd-sof-intel-hda snd-sof-intel-byt snd-sof-intel-ipc snd-sof snd-hda-codec-realtek snd-sof-xtensa-dsp snd-hda-ext-core snd-hda-codec-generic snd-soc-acpi-intel-match snd-soc-acpi snd-soc-core snd-compress snd-pcm-dmaengine snd-hda-intel snd-intel-dspcfg snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-hda-codec-hdmi snd-hda-codec-realtek snd-hda-codec-generic snd-soc-core snd-compress snd-pcm-dmaengine snd-hda-intel snd-intel-dspcfg snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer).
Loading ALSA sound driver modules: snd-hda-codec-hdmi snd-sof-pci snd-sof-intel-hda-common snd-soc-hdac-hda snd-sof-intel-hda snd-sof-intel-byt snd-sof-intel-ipc snd-sof snd-hda-codec-realtek snd-sof-xtensa-dsp snd-hda-ext-core snd-hda-codec-generic snd-soc-acpi-intel-match snd-soc-acpi snd-soc-core snd-compress snd-pcm-dmaengine snd-hda-intel snd-intel-dspcfg snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer

The systemctl disable timidity doesn't help either as shown below:

$ systemctl disable timidity
Failed to disable unit: Unit file timidity.service does not exist.

I also tried reinstalling alsa and pulseaudio packages but no success. Further the alsactl restore command did not work either.

$ alsactl restore
alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists
alsactl: load_state:1683: Cannot open /var/lib/alsa/asound.state for reading: File exists
Found hardware: "HDA-Intel" "Realtek ALC256" "HDA:10ec0256,1a582001,00100002 HDA:8086280b,80860101,00100000" "0x1a58" "0x2001"
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Nvidia GPU 84 HDMI/DP" "HDA:10de0084,00000000,00100100" "0x0000" "0x0000"
Hardware is initialized using a generic method

In summary, headphones are not detected automatically. I can hear using headphones after selecting them inside pavucontrol, but even inside pavucontrol, headphones are shown as "Headphones (unplugged)".

Ravi Joshi avatar
ph flag
The `dmesg` command is not showing new log when headphones are plugged or unplugged. On the other hand, I can see these logs, when I plug a mouse. Note that, I have checked it with another headphone too but same problem. I guess the problem is specific to Razer laptop. But I am unable to debug more! I appreciate any suggestion in this direction, please.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.