[Solved] Terrible sound in linux, much better in windows

music

#1

A bit of a backstory (you can skip it):
I use my laptop as my main and portable source of music (aside smartphone) and I always complained about the quality of sound on my old laptop. Now I bought new one, much expensive one (alienware 17 R3) with a dedicated sound card (sound blaster) and expected to have finally something decent.
At first when I heard the music I was disappointed with the lack of dynamic but soon discovered I can boost it by the many options of the sound card (by default all was flatted out), but finally when I plugged some cheap usb speakers it really gave a kick. I can only imagine what it can sound with a quality speakers.

The main question here:
I compared the sound from spotify on manjaro and windows and there is no doubt, music is soooo much better in windows! In linux it sounds like from a can :frowning: . There is no advanced sound card panel (as it is for nvidia) in linux so maybe I miss something. Maybe I can somehow tweak the sound or use different driver or whatever to obtain comparable quality? Please bare in mind that I didn’t pay much attention to sound as the speakers on old laptop were weak so I just accepted what it was, so I am completely newbie in this area.

I know that my laptop can produce better music (in windows) so can you help me to get started how can I improve sound quality in linux? What should I learn, install, check, tweak?

This is important to me, because I often play music from my laptop whenever I am and it would suck if I had to switch to windows every time I want to use it.


Manjaro Audio - Pulse or ALSA
Poor quality sound
HD Audio quality
Audio Configuration (Troubleshooting)
Clicking / disorted sound either on mic or speakers
#2

1# To found out what audio devices the laptop is seeing on Linux can you provide the output of the command:

aplay -l


2# Have you only tried streaming from the web through spotify, or did you try playing an mp3 or flac stored on your computer?


#3

1#

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CA0132 Analog [CA0132 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: CA0132 Digital [CA0132 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

2# I tried only streaming via spotify. At the moment I don’t have any mp3s at hand, but will have in a few days when I install manjaro on ssd (now it’s only on usb - hm… can this be a cause? at the moment I’m using only usb 2 so it’s very slow).


#4

If you mean the sound it’s not, somehow, defective, just the quality or bass is different (better) in windows than in linux, then you may want to check if you enabled the “enhancements” from the speaker properties options (if your sound card is dedicated and you have the drivers installed you should have more options):

Also in the advanced tab you can configure the channels, audio depth, hz… that actually improve a lot the sound quality:

I too notice this a lot, when I’m in windows (only for games) and I want to listen to some music, the sound quality is deeper and have better bass (those are the options mentioned above).

I spent some hours a while ago, trying to find those options here in linux. But the only thing I could find was the alsamixer levels, you may want to try those, it might improve the quality.

The driver might also have something to do with the quality… I mean manufacturer driver vs opensource driver.


(SOLVED) Sound quality ... temp work around; permanent solution?
#5

In my case I have dedicated sound blaster centre with huge amount of options and I did tweak them a bit, because default sound was also not mind blowing. So I have more then showed on screens above.


#6

I can teach you how to get really good sound
Edit your daemon conf to have these settings
default-sample-format = float32ne
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right

default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq or if you want less latency speex-float-10 or speex-fixed-10
enable-lfe-remixing = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
rlimit-rttime = -1
daemonize = no
and then put this after vim in asound.conf in etc
pcm.!default {
type plug
slave.pcm hw
}
This piece of code I had you put in your asound.conf bypasses dmix for pulseaudio increasing sound quality by a lot because we can’t have more then one resampler because if we do it gets resampled twice and some sound quality is lost


No adjustable sound and bad-ish quality with Soundcard
Sound stuttering
#7

secret rabbit code is out of the hole now.

pulseaudio --dump-resample-methods

and check. use speex-float instead.


#8

And where is this daemon.conf located?
Found some info about it but no location and frankly when I read any article on that topic it’s all gibberish for me. Millions terms and things I have no idea about and when trying to find out one thing I meet even more unknown things. It’s too confusing for a newbie and semi-technical person. So anyway, I will gladly apply those settings or others suggested to check if sound quality improved but I have no idea what am I doing and I must trust others judgement.

Started reading:
https://wiki.archlinux.org/index.php/sound_system
From there I will progress into further topics but even on this level there are some unknowns and so many technical terms that are beyond my comprehension.


#9

You can create the demon.conf in your ~/.config/pulse/daemon.conf for user specific configuration or /etc/pulse/daemon.conf for global configuration. If you do it in /etc, make sure you merge the settings whenever pulseaudio is updated by comparing your /etc/pulse/daemon.conf and /etc/pulse/daemon.conf.pacnew. Pacman will tell you when it puts that pacnew in your system.


#10

Why is there no more secret rabbit code


#11

speex-float-10 is CPU intensive. I personally don’t hear a difference to speex-float-5 which I use.

Also, enable-lfe-remixing should be set to yes if you use a 5.1 system and want the subwoofer to always be enabled. default-sample-channels and channel-map must also be adapted in that case.

default-sample-rate should be set to your soundcard’s default sampling rate, which is 48000 in my case.


#12

Some one should create a GUI for this, since it’s something most windows users are used to. And to have all sound in linux be “bland” and “tamb” compared to WIndows’ rich default settings, it could be nice to have at least a GUI option to set these in Linux as well.

Maybe a sub-package for pulseaudio is in order.


#13

It really depends on what sound card is being used. I guess the Windows driver offers some audio enhancements that the Linux module doesn’t, because of some proprietary firmware crap.

The CA0132 has a bad reputation when it comes to Linux. One ALSA developer wrote (https://bugzilla.opensuse.org/show_bug.cgi?id=969239):

Actually, SoundBlaster Z is a known notorious device. There are way too many variants, and only a few of them actually work with the current upstream driver, because of the incompatible binary firmware.


#14

Just set your pulseaudio to a healthy bitrate and resampling and buy a good set of speakers instead.
Fancy soundcards focus on adding “effects” rather than playing the music the way composer intended. Install beep from repo and check if every frequency sounds equally loud to you.

Do note (<—pun) that aural perception varies from person to person, so install beep on your laptop when you visit your retailer to try out the speakers and spend some time.

after that, it boils down to how much signal is lost before you hear the music

  • all onboard soundcards today are HD quality, unless you’re using one from soviet era.
  • bitrate/resample in pulseaudio
  • file format. High bitrate *.flac is good, 128kbps *.mp3 is ~meh~
  • don’t buy those cheap chinese speakers. High rms or PMPO isn’t meaningful. My 15 watt 2.1 creative inspire has shattered more glasses than 50 watt ching-chuang-7.1s.

#15

Agreed, buy an audio interface instead like I do. The cheap Focusrite Scarlett Solo + Audio Technica M40x combo is simply awesome. PCI soundcards gives me nothing but noise, USB soundcards are mostly cheap sh¡t :slight_smile:
Speaker is not for me though, I enjoy privacy when listening to something on my computer, if you know what I mean :stuck_out_tongue:


#16

Then why do you need high quality sound for that ? You can enjoy those by hitting the mute button too.


#17

I think he wanted to say that headphones is the way to go for him (and for me, too :smile:)


#18

Never need a mute button once you own a pair of headphones man. :wink:


#19

I just used your advice and put above settings to ~/.config/pulse/daemon.conf and music quality boosted a lot!
Now it’s good! It’s a bit different then in windows and I can’t put my fingers on it to decide what is better or different, but luckily now there is no dynamicless and can-like sound like before!

It looks like linux is capable of higher quality sound, only generic settings a crappy as hell.

Now I can only learn more above music settings and how to change them to tweak sound more but it’s comparable to windows now. The wow effect and dynamic is also on linux :smiley:

Again, where is it or where to create this asound.conf? If the first piece of linux magic worked, I am curious if this would do something to ;). And yes, it’s all terribly complicated and sounds more like magic: say this spell and you will get X. Still it’s joy if it works!


#20

its

/etc/asound.conf

:wink: