LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 12-08-2018, 12:06 AM   #1
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Rep: Reputation: Disabled
Problem in sound system related to desktop environment installed


Hi! I am using a Debian stretch up-to-date repo on my AMD Ryzen 7 system. Since the start it happened that i have tried several desktops because of diverse issues. KDE desktop was too buggy to be considered for productive use. I ended up for longer time with the GNOME based Cinnamon desktop which worked in a mostly reliable way. Still one issue stuck out through several desktop environments. The sound systems seems to be flawed with respect to my configuration at least. Using the sound mixer in Cinnamon to switch from headphones to loud speakers and vice versa worked nicely. After switching to LXDE because of a complete destruction of the Cinnamon desktop i experienced problems with the sound mixer. Loud speaker sound works nicely after new reboot, but when you switch to headphones and back and also under other cases, the sound played on the loud speakers gets jumbled up, playback rate increases to like 10x or more. It is a very spooky thing. Though switching to headphones sound plays nicely. The issue happens with all the players i have tried like xine, Videos,... Furthermore this is an issue too with dvd:rip software, which also jumbles up the audio tracks sometimes. The issue seems related to the desktop environment used and to the sound system itself. Maybe the desktop environment abuses the API of sound system???
 
Old 12-08-2018, 06:01 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,144

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
Why not boot to console mode where it's simpler, sort out your sound there, and the see what you have in X? there's still Xine that works (as alsa and pulse) in console mode.
 
Old 12-09-2018, 01:29 AM   #3
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
When i boot freshly sound is always ok. The test scenario then would be to boot to console. Play a song with xine and switch from speakers to headphone and vice versa and then check, whether there is an issue. As i have used several desktops in the last few months since i have bought my AMD Ryzen 7 machine (i only changed desktop after severe irrecoverable crash) some had no sound problem, others had. Cinnamon was nice with the sound, LXDE not. KDE was nearly unusable for productive use. What would be your precise suggestions for the test scenario?
 
Old 12-09-2018, 11:43 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,144

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
I confess to being old fashioned, and underwhelmed by my own PC's potential. KDE & Gnome are OOQ (Out Of the Question) for me, I use XFCE4. Alsa drives your sound, Pulse Audio bosses it about.

I imagine the pulse setup in the various DEs is causing the issues. It's never 'Alsa OR Pulse?' it's 'Alsa OR Alsa + Pulse'. You can get sound with kernel modules without pulse; why not try that by killing pulse then playing stuff? My xine wants X, so I killed off pulse and ran 'mpg123 <some_mp3>'
It played perfectly.
 
1 members found this post helpful.
Old 12-09-2018, 08:28 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
What sound software are you using? Pulse Audio or Pulse with alsa?

(Pulse does not come out-of-the-box with all Debian desktops, and you have changed desktops so often that I think an answer to that question might be relevant.)
 
1 members found this post helpful.
Old 12-10-2018, 01:30 AM   #6
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
I am using LXDE desktop on my AMD Ryzen 7 system with Debian Stretch 9. Before i used Cinnamon which was working almost flawless. Though one day completely surprisingly it crashed and i did not want to do complete reinstall of Debian. Also purging and reconfiguring the cinnamon-desktop-task and packages did not work for some reason and i did not want to spend too much time with it. The crash persisted. So i installed a new session manager and LXDE desktop. LXDE desktop has a nice mathematical screensaver set btw. that i would not have seen, if my Cinnamon desktop would not have destroyed itself.

The LXDE desktop audio panel allows to choose for pavucontrol or alsamixer. The pavucontrol looks pretty much the same like the mixer in Cinnamon and Gnome. You can adjust for each channel like Chrome, Xine,... on which device to play like head phones or loudspeakers. I have one cheap sound card attached on my board via PCI, which works nicely as far as i understand. I have two playback devices attached: the soundcard and my headphones. At first playback over loudspeakers works fine. Then i switch to headpones and when i switch back on all channels the sound stream is destroyed beyond recognition and playback increased to about 10x the regular speed or something like that. Switching back to headphones it plays nicely again.

I also noticed the following thing. Just now i tried to switch from the pavucontrol to the alsa mixer. I closed the window of the pavucontrol after i started the console based alsa mixer in another window. Then i switched back to the pavucontrol and the sound played normal again afterwards. So it seems to me as if there is some bug in the pavucontrol interaction with the sound system. As far as i can remember the same controls under Cinnamon or Gnome used to work fine (is that also pavucontrol??).
 
Old 12-10-2018, 05:20 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,144

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
AFAIK, the drivers are set up in Alsa, which has the sound server handling the hardware. The kernel modules are also for alsa. The alsa settings bit is overridden if you use pulse audio, so unless you kill pulse, there's no point in playing with alsamixer.

It's a lot like pppd, back in the bad old days of dialup. For dialup modems, pppd did the magic but was as inscrutable, and grokking the man/info pages lead to most people knowing less about pppd instead of more :-/.
Code:
An expert is a man who tells you a simple thing in a confused way in such a fashion as to make
you think the confusion is your own fault. --William Castle
It got front ends (wvdial being about the best, although kppp was good, too). Alsa is definitely a learning curve requiring patience, but it's doable if you have patience. Today, that commodity isn't so plentiful, hence pulse audio. But any major repairs to sound still have to go in alsa.

In alsa, My hdmi sounded like raw binary (high or low), and some kind soul here wrote me an ~/.asoundrc to resample the 44khz rubbish sound at 48khz, which produced a very listenable quality (low-fi)sound from my low-fi card. I doubt if you could pull that off with pulse.
 
Old 12-10-2018, 07:31 AM   #8
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
...ya, i had also my experience with a low sampling rate of alsa using Audacity...nevertheless, the problem with pavucontrol still remains. It seems when one kills pavucontrol that is playing broken sound and starts the alsa mixer in LXDE sound panel and then closes alsa mixer and starts again pavucontrol, the sound will be unbroken. Best would be the sound would be completely unbroken all of the time...
 
Old 12-11-2018, 01:06 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
have you already tried to open 'alsamixer' in a terminal, and see if maybe some channels are muted?
or maybe the wrong sound card is selected by default?
that, and more exploring of 'pavucontrol' which can be a little unintuitive. be sure to expand "advanced" tabs also.
 
Old 12-11-2018, 01:43 AM   #10
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
Dear ondoho!

I am using LXDE desktop. There is a sound panel dialog menu, where you have one choice of which mixer to start: alsamixer or pavucontrol. Depending on that choice another menu option of the sound panel dialog menu called "Launch mixer" opens either a terminal window with alsamixer inside or a GTK window with pavucontrol (it looks like GTK). In the audio card section of the settings dialog of the sound panel dialog menu it is listed two things: my headphone adapter and my SoundBlaster compatible sound card. That is also the choice of playback devices listed in the pavucontrol controls sections.

Returning on your kind and welcome question about alsa mixer status: The alsa mixer shows only one channel called master playback channel on first screen. However, decently placed information on the upper half of the screen indicates, that pressing F6 might pop up options for the soundcards, which allows for three choices: The two choices from before (headphones and Soundcard) and an additional soundcard called HDA Nvidia (what is that???).

As for the selection of soundcards in relation to my above listed problem: I was either listening sound on my headphones or on my loudspeakers. From my experience i can tell that this worked out nicely, though the names of the soundcards might not be so clearly assignable to the actual playback devices for some people and there might arise some confusion and anger about it.

Expanding Advanced tab in pavucontrol was quite some experience for me. Only in the playback device section with the list of playback devices advanced options were expandable below each devices basic adjustment options controls. On opening one of those - or for the sake any of those - only one additional setting popped up called Latency offset (???).
 
Old 12-11-2018, 04:30 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,144

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
With pulse Audio running, Alsamixer is ignored, on my box at least.
 
Old 12-11-2018, 10:35 AM   #12
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,131

Rep: Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302
I'm inclined to feel that your very up-to-date hardware is causing some problem for Debian. Over the years, Debian has often had problems with sound which didn't occur on other distros. Also, I always recommend running a distro with its default GUI: you've found bugs in both KDE and Cinnamon. If I were in your situation, I'd be saying "enough of this!" and trying a live version of a dedicated and up-to-date KDE distro like Kubuntu, OpenSUSE., or PCLinuxOS.
 
1 members found this post helpful.
Old 12-11-2018, 11:11 AM   #13
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
You might try looking at this http://slackermedia.ml/handbook/doku.php?id=linuxaudio tutorial on setting up audio. It's written for Slackware, but it might be a useful technique for you on Debian.

As you troubleshoot, you might also try renaming your current .asoundrc file to dot-asoundrc or .asoundrc-old or something similar, and then reboot, just so that you're back to a pure, unaltered environment. Troubleshooting your issues on top of modifications is often difficult and unreliable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Deepin Desktop Environment support addons that can heavily modify the desktop environment? Joe232 Linux - Software 1 02-07-2018 07:43 AM
Adanaxis game: Installed package + problem in making tests in source (maybe a wrong path problem, possibly related to Ruby language) dedec0 Programming 0 11-26-2017 08:44 PM
How do I remove all packages related to the desktop environment? alarazr Debian 7 07-03-2012 06:22 AM
ubuntu-desktop vs. kubuntu-desktop vs. xubuntu-desktop vs. lubuntu-desktop vs. unity Kenny_Strawn Ubuntu 18 05-13-2011 09:20 AM
No sound w/ Sound Blaster Audigy 2 (and possibly other related cards) fix swiftpaw Mandriva 2 05-08-2006 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration