Page 1 of 1

No sound on a fresh KXStudio distro installation

Posted: Wed Feb 24, 2016 3:31 am
by maxime.levesque
I'm taking the dive into recording music with Linux, still a long way from recording, I'm trying tools and distros, and trying
to get audio interfaces to work.
After experiencing a few config headaches (audio interfaces, driver settings, jackd, etc...)
I found the concept of a DAW oriented "distro" was a great idea, and had a good experience with UbuntuStudio, but
I read a lot of good praises about KXStudio distro, thinking that "audio stuff" would work out of the box with
less troubleshooting, so I wanted to give KXStudio a try.

After installing KxStudio on a laptop with newly formated hard drive, I tried a few audio applications and none of them emit sound.
This is on a laptop that has been running other linux distros in the past (Ubuntu,Mint, UbuntuStudio) without ever having audio problems.
For some reasons the default settings of KXStudio are preventing my audio interface from outputing sound.
Strangely, the audio capture is working (I can record with ardour), it is only the playback that is broken.

The jack logs are not showing any errors (as far as I can tell) :

Code: Select all

Tue Feb 23 22:14:44 2016: Stopping jack server...
Tue Feb 23 22:14:44 2016: Client 'system' with PID 0 is out
Tue Feb 23 22:14:44 2016: Client 'cadence-aloop-daemon' with PID 1582 is out
Tue Feb 23 22:14:44 2016: Client 'jack2alsa' with PID 1719 is out
Tue Feb 23 22:14:44 2016: Client 'alsa2jack' with PID 1715 is out
Tue Feb 23 22:14:44 2016: Client 'a2j' with PID 1574 is out
Tue Feb 23 22:14:44 2016: Released audio card Audio0
Tue Feb 23 22:14:49 2016: Starting jack server...
Tue Feb 23 22:14:49 2016: JACK server starting in realtime mode with priority 10
Tue Feb 23 22:14:49 2016: self-connect-mode is "Don't restrict self connect requests"
Tue Feb 23 22:14:49 2016: Acquired audio card Audio0
Tue Feb 23 22:14:49 2016: creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
Tue Feb 23 22:14:49 2016: Using ALSA driver HDA-Intel running on card 0 - HDA Intel PCH at 0xf7910000 irq 46
Tue Feb 23 22:14:49 2016: configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
Tue Feb 23 22:14:49 2016: ALSA: final selected sample format for capture: 32bit integer little-endian
Tue Feb 23 22:14:49 2016: ALSA: use 2 periods for capture
Tue Feb 23 22:14:49 2016: ALSA: final selected sample format for playback: 32bit integer little-endian
Tue Feb 23 22:14:49 2016: ALSA: use 2 periods for playback
Tue Feb 23 22:14:49 2016: graph reorder: new port 'system:capture_1'
Tue Feb 23 22:14:49 2016: New client 'system' with PID 0
Tue Feb 23 22:14:49 2016: graph reorder: new port 'system:capture_2'
Tue Feb 23 22:14:49 2016: graph reorder: new port 'system:playback_1'
Tue Feb 23 22:14:49 2016: graph reorder: new port 'system:playback_2'
Tue Feb 23 22:14:49 2016: graph reorder: new port 'system:playback_3'
Tue Feb 23 22:14:49 2016: graph reorder: new port 'system:playback_4'
Tue Feb 23 22:15:01 2016: New client 'audacious-jack_2039_000' with PID 2039
Tue Feb 23 22:15:01 2016: port 'audacious-jack_2039_000:out_0' created
Tue Feb 23 22:15:01 2016: port 'audacious-jack_2039_000:out_1' created
Tue Feb 23 22:15:01 2016: Connecting 'audacious-jack_2039_000:out_0' to 'system:playback_1'
Tue Feb 23 22:15:01 2016: Connecting 'audacious-jack_2039_000:out_1' to 'system:playback_2'
Below are some infos on my setup (nothing fancy, I'm using the build in audio interface of the laptop) :

Code: Select all

maxou@maxou-550P5C-550P7C:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 0/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 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

Code: Select all

maxou@maxou-550P5C-550P7C:~$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7910000 irq 46
 1 [Loopback       ]: Loopback - Loopback
                      Loopback 1

Code: Select all

maxou@maxou-550P5C-550P7C:~$ cat ~/.asoundrc
# ------------------------------------------------------
# Custom asoundrc file for use with snd-aloop and JACK
#
# use it like this:
# env JACK_SAMPLE_RATE=44100 JACK_PERIOD_SIZE=1024 alsa_in (...)
#

# ------------------------------------------------------
# playback device
pcm.aloopPlayback {
  type dmix
  ipc_key 1
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,0"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# capture device
pcm.aloopCapture {
  type dsnoop
  ipc_key 2
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,1"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# duplex device
pcm.aloopDuplex {
  type asym
  playback.pcm "aloopPlayback"
  capture.pcm "aloopCapture"
}

# ------------------------------------------------------
# default device
pcm.!default {
  type plug
  slave.pcm "aloopDuplex"
}

# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
  type dsnoop
  ipc_key 3
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,1,0"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 32768
  }
}

# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}
d

If I play a wav with aplay, no error messages are displayed :

Code: Select all

maxou@maxou-550P5C-550P7C:~$ aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
No error messages, but no sound !

Re: No sound on a fresh KXStudio distro installation

Posted: Wed Feb 24, 2016 11:50 pm
by maxime.levesque
I checked the alsamixer, and nothing is muted...

question: does the fact that I hear nothing while running "aplay /usr/share/sounds/alsa/Front_Center.wav"
mean that the problem is at the alsa level, and has nothing to do with jackd ?

If that is the case, it means that I shouldn't try to get things playing through jack until
I got the alsa problem figured out.


It would be nice if there was a script that could launch a bunch of diagnostics and collect all the info in a file
that could be shown to the kind fellows that hang out on forums such as this one to help with the troubleshooting.
I am very used to this sort of things (running diagnostics and gathering logs and dumps of all sorts),
but for non technical user there could be a GUI application with a single button that runs tests, collects
results and copies it to the clip board, then all they need to do is CTRL+V into a post such as this one,
or post it as an issue in the Github repo, perhaps here: https://github.com/KXStudio/KXStudio.
Perhaps such a script/app already exists ?

BTW, is this forum the right place to report such problems ?


Thanks for the quick reply !

Looking forward to record music on my favorite OS ;-)

Re: No sound on a fresh KXStudio distro installation

Posted: Thu Feb 25, 2016 8:11 pm
by glowrak guy
In a somewhat related topic, gmac mentions

"I've run into an issue with laptops before where the onboard HDA Audio chips
will absolutely not run with JACK unless you explicitly check off 'Capture' or 'Rec'
on one of the Audio inputs using whatever Graphical mixer utility is at hand
(For KXStudio I would assume KMix). Could be a longshot but worth trying..."

Re: No sound on a fresh KXStudio distro installation

Posted: Fri Feb 26, 2016 1:46 am
by maxime.levesque
I will try this the next time I try KX Studio. I went back to UbuntuStudio, everything works "out of the box" including jackd for me with that distro.

Thanks for the tip !