You are not logged in.

#1 2021-12-27 10:54:13

daneel971
Member
Registered: 2008-03-28
Posts: 197

No sound in KDE, but sound works!

I recently noticed the following problem - I'm not sure exactly when it started.
My monitor with speakers is connected via display port to my PC. Pulseaudio is running. The audio device is recognized and labeled as HDMI/DisplayPort in the pulsaudio plasma tray applet. If I play, say, some youtube videos or some audio files, the level meters in the applet show movement as if the audio was playing - except it isn't.
I tried to create a new user for testing purposes, and the audio doesn't work even with a fresh config.
Volume is up, no channel is muted.
Sometimes, when doing an audio test with the audio section of KDE systemsettings, if I hit the first time "test left speaker" or "test right speaker" i don't hear anything - but if I try a second time then it works and I have my audio back. This doesn't work always: it seems quite random.

Finally, if I log in with Xfce (both regular and test user) all work perfectly as expected.
Does anybody have any clue here?

Offline

#2 2021-12-27 13:48:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,944

Re: No sound in KDE, but sound works!

What's your sound setup? Do you use pipewire or pulseaudio or both? "KDE" has very little relevance here, e.g. especially if you mention that the speaker test doesn't work there's currently a known bug with short sounds not playing on pipewire. In any case during attempted playback and "not working" what's your output for

sudo fuser -v /dev/snd/*
aplay -l
pactl list cards
pactl list sinks
pactl list sink-inputs

maybe also check whether there are differences in monitor setups in xrandr or so e.g. there are often issues with audio playback if you do not use a 60Hz refresh rate and if KDE/kscreen sets up something higher and xfce doesn't that could explain the difference.

Offline

#3 2021-12-29 18:07:27

daneel971
Member
Registered: 2008-03-28
Posts: 197

Re: No sound in KDE, but sound works!

I did some test starting from the command you suggested. I still think that the problem must be KDE-related, because out of KDE it works all perfectly.

pactl list sinks | grep -e Name: -e Volume:

gives me

        Name: alsa_output.pci-0000_01_00.1.hdmi-stereo
        Volume: front-left: 39435 /  60% / -13,24 dB,   front-right: 39435 /  60% / -13,24 dB
        Base Volume: 65536 / 100% / 0,00 dB
        Name: alsa_output.pci-0000_00_1b.0.analog-stereo
        Volume: front-left: 35389 /  54% / -16,06 dB,   front-right: 35389 /  54% / -16,06 dB
        Base Volume: 65536 / 100% / 0,00 dB

While playing a video from YouTube

pactl list sink-inputs  | grep -e Sink: -e media.name -e application.name -e Volume:

gives me:

        Sink: 0
        Volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                media.name = "José González - Full Performance (Live on KEXP) - YouTube"
                application.name = "Firefox"
                module-stream-restore.id = "sink-input-by-application-name:Firefox"

But I can't hear anything.
If I

pactl set-card-profile 0 off

and immediately after

pactl set-card-profile 0 output:hdmi-stereo

then I hear sound. Quite strange.

Offline

#4 2022-01-02 15:50:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,944

Re: No sound in KDE, but sound works!

While it's good you're doing your own investigations, unless those investigations solve the issues post the unfiltered commands as asked for. I.e. from that description it sounds like you are not initially playing back to the hdmi device and then "force" a switch by changing profiles. That "force" should not be necessary if you define the device to play back to outright. FWIW firefox has a very weird own logic here that does often not make much sense so this might be a fallout from that.

Offline

Board footer

Powered by FluxBB