[SOLVED] Speakers not working, Default audio device is headphone
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Speakers not working, Default audio device is headphone
I have recently installed Ubuntu 18.04.4 LTS and the default audio device is headphones and my speakers (built-in) are not showing up in sound settings. What's more that the headphone jack of my HP Probook 6550b laptop is broken so I can't test if I am getting audio output or not. How do I setup my speakers? Please guide me properly as I am a beginner in terms of Linux and terminal.
Welcome to LXQ. Some detailed information about your audio hardware and subsystem can be got using a diagnostic script called alsa-info.sh which will then help others to advise further.
Follow this guide about how to run the script in a terminal https://wiki.ubuntu.com/Audio/AlsaInfo
It will upload the output to an online server. Post the link that it provides here.
I'm not sure that was required, as the diagnostic output confirms that the 'snd-hda-intel' driver was loaded at boot automatically. Sometimes particular module options are required, but I'm not sure if that is the case here. The ALSA mixer levels look ok at first glance, and now we should check PulseAudio (sound server that sits on top of ALSA). I note that
Code:
pacmd list-cards
Code:
pacmd list-sinks
You can run a graphical PulseAudio miixer utility called 'pavucontrol'. Start it from the terminal and check the 'Configuration' tab for correct audio profile. This might be needed if sound being sent to HDMI instead of laptop speakers for example, depending on your requirements. If it is not present, it can be installed with
As for running pavucontrol, the following options are present in the configuration tab, which one should I use:
Analog Stereo Duplex
Analog Stereo Output (Currently Selected)
Digital Stereo (HDMI) Output + Analog Stereo Input
Digital Stereo (HDMI) Output
Analog Stereo Input
Off
Yes, the pacmd output confirms 'active profile: <output:analog-stereo>' is current profile as you've indicated via pavucontrol as well. This current profile (or 'Analog Stereo Duplex') should both provide working sound via the internal laptop speakers.
To exclude PulseAudio-related issues, try generating some sound using these ALSA-specific commands...
Sorry for the late reply
I ran the commands the results:
Code:
ahmedali@AHMEDALI-PC:~$ speaker-test
speaker-test 1.1.3
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 192 to 2097152
Period size range from 64 to 699051
Using max buffer size 2097152
Periods = 4
was set period_size = 524288
was set buffer_size = 2097152
0 - Front Left
Time per period = 10.939272
0 - Front Left
Time per period = 10.938045
0 - Front Left
Time per period = 10.937454
0 - Front Left
Time per period = 10.938479
0 - Front Left
Time per period = 10.939623
0 - Front Left
Time per period = 10.942235
0 - Front Left
Time per period = 10.940009
0 - Front Left
Time per period = 10.940221
0 - Front Left
Time per period = 10.941262
0 - Front Left
Time per period = 10.939872
0 - Front Left
Time per period = 10.941065
0 - Front Left
Time per period = 10.938588
0 - Front Left
^CTime per period = 10.938819
The test kept running on I had to break. But I heard no sound.
Code:
ahmedali@AHMEDALI-PC:~$ speaker-test -t wav -c 6
speaker-test 1.1.3
Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 349525
Period size range from 10 to 116509
Using max buffer size 349524
Periods = 4
was set period_size = 87381
was set buffer_size = 349524
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.918198
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.700809
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.703000
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.699613
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.702466
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.705745
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.705027
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.711053
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.707423
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
^CTime per period = 8.711397
Same as the above command kept repeating but no sound
Code:
ahmedali@AHMEDALI-PC:~$ sudo aplay -D hw:0,0 -vv /usr/share/sounds/alsa/test.wav
/usr/share/sounds/alsa/test.wav: No such file or directory
ahmedali@AHMEDALI-PC:~$ pasuspender -- aplay -D hw:0,0 -vv /usr/share/sounds/alsa/test.wav
/usr/share/sounds/alsa/test.wav: No such file or directory
There was a file/directory error in both the commands
Sorry for the late reply
I ran the commands the results:
Code:
ahmedali@AHMEDALI-PC:~$ speaker-test
speaker-test 1.1.3
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 192 to 2097152
Period size range from 64 to 699051
Using max buffer size 2097152
Periods = 4
was set period_size = 524288
was set buffer_size = 2097152
0 - Front Left
Time per period = 10.939272
0 - Front Left
Time per period = 10.938045
0 - Front Left
Time per period = 10.937454
0 - Front Left
Time per period = 10.938479
0 - Front Left
Time per period = 10.939623
0 - Front Left
Time per period = 10.942235
0 - Front Left
Time per period = 10.940009
0 - Front Left
Time per period = 10.940221
0 - Front Left
Time per period = 10.941262
0 - Front Left
Time per period = 10.939872
0 - Front Left
Time per period = 10.941065
0 - Front Left
Time per period = 10.938588
0 - Front Left
^CTime per period = 10.938819
The test kept running on I had to break. But I heard no sound.
They are supposed to keep running until you stop them.
Anyway, as you report that you heard no sound, we know the problem is not related to PulseAudio but likely ALSA-related (including driver).
My audio is now working
After updating the alsa-base.conf with options snd-hda-intel model=auto probe_mask=1 I rebooted the pc and opened pavucontrol. The default audio device was headphones again but I switched to speakers which it was showing unavailable SS. After that I played some audio and it was working. I think its a bug because of which it is showing my speakers unavailable. Thankyou for your help @ferrari
P.S: If you could report this bug/problem to ubuntu please do so thanks.
Last edited by ahmedali19; 04-17-2020 at 05:16 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.