sound won't switch to hdmi output when external monitor connected

Hi all.

When I’m connecting external monitor to my laptop, instead of directing sound to hdmi output, sound still comes from laptop speakers, though:


chekh@wonderland:~> aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC270 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC270 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC270 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC270 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC270 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC270 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC270 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC270 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
**hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Outp**

and when I run “speaker-test -D hdmi -c2” I can hear sound in headphones, which are connected to monitor. I guess problem can be resolved if I restart alsa, but there was no rcalsasound or alsasound in my system.


chekh@wonderland:~> uname -a
Linux wonderland.am 3.17.2-1-desktop #1 SMP PREEMPT Fri Nov 7 15:18:21 UTC 2014 (bf63174) x86_64 x86_64 x86_64 GNU/Linux


chekh@wonderland:~> zypper se -si alsa
Loading repository data...
Reading installed packages...

S | Name                     | Type    | Version    | Arch   | Repository
--+--------------------------+---------+------------+--------+-----------
i | alsa                     | package | 1.0.28-8.1 | x86_64 | repo-oss  
i | alsa-oss               | package | 1.0.28-3.1 | x86_64 | repo-oss  
i | alsa-plugins          | package | 1.0.28-5.1 | x86_64 | repo-oss  
i | alsa-plugins-pulse | package | 1.0.28-5.1 | x86_64 | repo-oss  
i | alsa-plugins-pulse-32bit | package | 1.0.28-5.1 | x86_64 | repo-oss  
i | alsa-utils              | package | 1.0.28-7.1 | x86_64 | repo-oss  

PS Right now I’m using Tumbleweed, but problem wasn’t Tumblweed specific. As far as I remember, same thing was with openSUSE 13.1.

Did install pavolcontrol? You can use that to control where input/output go. I use verimix in KDE to do the same thing. just a bit more convent since it sets in the system tray

Install pavucontrol and paprefs

Paprefs to enable simultaneous sound
and pavucontrol for the audio output.
Then you can enjoy both audio.

Hi, thanks for the response.

I have installed pavucontrol and I think I have some additional options in kmixer. I’ll try to test this ASAP, though I still don’t understand why should I install some additional software for that basic functionality AND why should I manually change the output device.

as to the ‘why’ to install additional software (in KDE) likely that basic design philosophy of the developers/packagers of the KDE desktop, which we are not (we are volunteers on this forum).

wrt the why to manually change the output device, that likely is associated with a general philosophy of GNU/Linux where control is passed the users and not done automatic. I know I for one would NOT want my audio automatically routed by default to HDMI if it were plugged in, but rather by default I would want it to may speakers with me having complete control to redirect to HDMI only if I wished to do so.

Likely that answer won’t satisfy you, but maybe it will help explain a bit that others have different view than what you have on this

To the op,
I didn’t see, you installed paprefs it is an important part
of pulseaudio if you are using more than one sound card.

Yes we have to accept it, we sometimes need to install
additional software to make it work.

Sometimes in my case I have to see to it not to touch some sound and
video apps in linux or else might break my system sound and video.

An example is, in kde I never open the systemsettings-multimedia
and use pavucontrol instead.

I never open the kde and xfce display settings else it will break my monitors display settings.

I am using sound from usb, hdmi, and the built-in soundcard of my pc simultaneously.
I am using two monitors and one tv for my display.

You remembered well. :slight_smile:

I just tried the HDMI connection on 13.1/KDE for the first time, as I have always used Win 7 supplied with this ThinkPad (a mere 5 year-old now), for output on a modern TV (BTW Win 7 also had a wizard to detect and correctly configure a TV).

Once I had managed to alternate screens with the desired resolutions (yet more fiddling about) and with video finally playing on TV, like you said the sound didn’t switch. There was no mention of HDMI in KMix/audio setup or KDE’s multimedia settings.

Since “pavucontrol” was already installed (by me IIRC), I used it to configure/select HDMI output (strange it claimed it was unplugged!). As if by magic, KDE and KMix suddenly became aware of the HDMI profile, and sound subsequently switched. I didn’t bother with “papref” as I don’t want sound from both, and only have the one sound chip.

If I ever need to use it again, at least KDE now has the profile on board for doing a manual selection.

Same thing with me. pavucontrol worked like charm: after making selection in pavucontrol, kmixer was aware that I have HDMI output device.

Anyways, can I achive a state, where I can configure my output devices through KMixer instead of running some applications?

Once you’ve run pavucontrol for the first time, you can use KMix (> Mixer from the volume control in system tray), then Settings > Audio Setup. That just opens the Phonon multimedia settings, where selecting the Audio Hardware Setup tab leads to the Profiles and device configuration. The normal, HDMI, and Surround profiles should still be available there, as they are on mine.

Really it just boils down to personal preference whether to use pavucontrol or the KDE settings via KMix.