Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: How restart the audio/sound system?

  1. #1

    Default How restart the audio/sound system?

    Sorry to have to ask. What I thought would be a simple question and answer. Seems not to be...

    What I think the question should be is: How do I restart the sound system from the command line?
    I think I need something along the line of #systemctl restart <pulse/alsa/sound?>.service

    Just in case there are "many ways to skin this cat"! My problem is:
    I have two sound cards and after booting-up both work fine. All is tikity-boo....! I'm happy
    However, after some time (unknown, maybe hours) one sound card stops working.
    The only way I know how to get it working again, is to reboot.
    I'm looking for a quicker route. In time I may get round to figuring out why it happens but for now there are other more important things to fix!

    Best regards, Martin

    PS - Forgive me if I take some time coming back - I may not hear the "new message arrive" fanfare !
    openSUSE Leap 15; KDE Plasma 5.12.5;

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,335
    Blog Entries
    15

    Default Re: How restart the audio/sound system?

    Hi
    You can see the loaded services/targets etc via;

    Code:
    systemctl list-units --no-pager |egrep "alsa|sound"
    I would surmise the sound.target...

    Code:
    systemctl status sound.target
    
    systemctl restart sound.target
    
    systemctl status sound.target
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: How restart the audio/sound system?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You can see the loaded services/targets etc via;

    Code:
    systemctl list-units --no-pager |egrep "alsa|sound"
    So...
    Code:
    Gzunder:~ # systemctl list-units --no-pager |egrep "alsa|sound"
    sys-devices-pci0000:00-0000:00:03.0-0000:01:00.1-sound-card1.device   loaded active plugged          Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]                     
    sys-devices-pci0000:00-0000:00:1b.0-sound-card0.device                loaded active plugged          5 Series/3400 Series Chipset High Definition Audio                              
    alsa-restore.service                                                  loaded active exited           Save/Restore Sound Card State                                                   
    Gzunder:~ #
    I'm guessing, two sound cards and one service?

    Now, I try...

    Code:
    Gzunder:~ # systemctl status sound.target
    ● sound.target - Sound Card
       Loaded: loaded (/usr/lib/systemd/system/sound.target; static; vendor preset: disabled)
       Active: active since Thu 2019-01-24 14:57:18 GMT; 3s ago
         Docs: man:systemd.special(7)
    
    Jan 24 14:57:18 Gzunder.localnet systemd[1]: Reached target Sound Card.
    Gzunder:~ #
    Says "active" and I can hear both playing.

    Now...
    Code:
    Gzunder:~ # systemctl stop sound.target
    Gzunder:~ # systemctl status sound.target
    ● sound.target - Sound Card
       Loaded: loaded (/usr/lib/systemd/system/sound.target; static; vendor preset: disabled)
       Active: inactive (dead) since Thu 2019-01-24 15:00:07 GMT; 23s ago
         Docs: man:systemd.special(7)
    
    Jan 24 14:57:18 Gzunder.localnet systemd[1]: Reached target Sound Card.
    Jan 24 15:00:07 Gzunder.localnet systemd[1]: Stopped target Sound Card.
    Gzunder:~ #
    Seems to imply that "something" has stopped/inactive/(dead)? But I can clearly hear both outputs playing??

    Confused.

    Is there not an audio.service or sound.service or something like that (obviously not either of those name, cos I've been hunting all over 'tnternet...)

    Martin
    openSUSE Leap 15; KDE Plasma 5.12.5;

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,335
    Blog Entries
    15

    Default Re: How restart the audio/sound system?

    On Thu 24 Jan 2019 03:16:07 PM CST, martinprowe wrote:

    malcolmlewis;2892322 Wrote:
    > Hi
    > You can see the loaded services/targets etc via;
    >
    > >

    Code:
    --------------------
    > >

    > systemctl list-units --no-pager |egrep "alsa|sound"
    >

    --------------------
    > >


    So...

    Code:
    --------------------
    *Gzunder:~ # systemctl list-units --no-pager |egrep "alsa|sound"*
    sys-devices-pci0000:00-0000:00:03.0-0000:01:00.1-sound-card1.device
    loaded active plugged Cape Verde/Pitcairn HDMI Audio [Radeon
    HD 7700/7800 Series]
    sys-devices-pci0000:00-0000:00:1b.0-sound-card0.device
    loaded active plugged 5 Series/3400 Series Chipset High
    Definition Audio
    alsa-restore.service
    loaded active exited Save/Restore Sound Card State Gzunder:~
    # --------------------


    I'm guessing, two sound cards and one service?

    Now, I try...


    Code:
    --------------------
    *Gzunder:~ # systemctl status sound.target*
    ● sound.target - Sound Card
    Loaded: loaded (/usr/lib/systemd/system/sound.target; static; vendor
    preset: disabled) Active: active since Thu 2019-01-24 14:57:18 GMT; 3s
    ago Docs: man:systemd.special(7)

    Jan 24 14:57:18 Gzunder.localnet systemd[1]: Reached target Sound
    Card. Gzunder:~ #
    --------------------


    Says "active" and I can hear both playing.

    Now...

    Code:
    --------------------
    *Gzunder:~ # systemctl stop sound.target
    Gzunder:~ # systemctl status sound.target*
    ● sound.target - Sound Card
    Loaded: loaded (/usr/lib/systemd/system/sound.target; static; vendor
    preset: disabled) Active: inactive (dead) since Thu 2019-01-24 15:00:07
    GMT; 23s ago Docs: man:systemd.special(7)

    Jan 24 14:57:18 Gzunder.localnet systemd[1]: Reached target Sound
    Card. Jan 24 15:00:07 Gzunder.localnet systemd[1]: Stopped target Sound
    Card. Gzunder:~ #
    --------------------


    Seems to imply that "*something*" has stopped/inactive/(dead)? But I can
    clearly hear both outputs playing??

    Confused.

    Is there not an *audio.service* or *sound.service* or something like
    that (obviously not either of those name, cos I've been hunting all over
    'tnternet...)

    Martin


    Hi
    You did not start the service, yes the target should apply to all
    cards...

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.25-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  5. #5

    Default Re: How restart the audio/sound system?

    Quote Originally Posted by malcolmlewis View Post
    You did not start the service
    What service?

    Martin
    openSUSE Leap 15; KDE Plasma 5.12.5;

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,335
    Blog Entries
    15

    Default Re: How restart the audio/sound system?

    On Thu 24 Jan 2019 06:06:03 PM CST, martinprowe wrote:

    malcolmlewis;2892340 Wrote:
    > You did not start the service


    What service?

    Martin


    Hi
    Correction, the target

    Code:
    systemctl restart sound.target
    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.25-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  7. #7

    Default Re: How restart the audio/sound system?

    Quote Originally Posted by malcolmlewis View Post
    Code:
    systemctl restart sound.target
    Sorry, but this is not getting any clearer for me?

    If I start with a re-boot (to set everything to normal) and then play two audio tracks on each sound sinks:
    Code:
    mprowe@Gzunder:~> paplay -d alsa_output.pci-0000_01_00.1.hdmi-stereo test.flac
    mprowe@Gzunder:~> paplay -d alsa_output.pci-0000_00_1b.0.hdmi-stereo test.flac
    I can now hear both tracks playing on their respective sound cards. Now I will try and stop/start/restart using your advice:
    Code:
    Gzunder:/home/mprowe # systemctl stop sound.target
    Gzunder:/home/mprowe # systemctl status sound.target
    ● sound.target - Sound Card
       Loaded: loaded (/usr/lib/systemd/system/sound.target; static; vendor preset: disabled)
       Active: inactive (dead) since Fri 2019-01-25 11:14:02 GMT; 10min ago
         Docs: man:systemd.special(7)
    
    Jan 25 09:26:35 Gzunder.localnet systemd[1]: Reached target Sound Card.
    Jan 25 11:14:02 Gzunder.localnet systemd[1]: Stopped target Sound Card.
    Gzunder:/home/mprowe #
    Systemctl says it has "stopped something" ... but I can still hear the music?
    More disappointingly, I have had the default sink fail this morning (the cause of this investigation) and restarting the sound.target did not get it going. I still needed to reboot

    Regards, Martin
    openSUSE Leap 15; KDE Plasma 5.12.5;

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,335
    Blog Entries
    15

    Default Re: How restart the audio/sound system?

    Quote Originally Posted by martinprowe View Post
    Sorry, but this is not getting any clearer for me?

    If I start with a re-boot (to set everything to normal) and then play two audio tracks on each sound sinks:
    Code:
    mprowe@Gzunder:~> paplay -d alsa_output.pci-0000_01_00.1.hdmi-stereo test.flac
    mprowe@Gzunder:~> paplay -d alsa_output.pci-0000_00_1b.0.hdmi-stereo test.flac
    I can now hear both tracks playing on their respective sound cards. Now I will try and stop/start/restart using your advice:
    Code:
    Gzunder:/home/mprowe # systemctl stop sound.target
    Gzunder:/home/mprowe # systemctl status sound.target
    ● sound.target - Sound Card
       Loaded: loaded (/usr/lib/systemd/system/sound.target; static; vendor preset: disabled)
       Active: inactive (dead) since Fri 2019-01-25 11:14:02 GMT; 10min ago
         Docs: man:systemd.special(7)
    
    Jan 25 09:26:35 Gzunder.localnet systemd[1]: Reached target Sound Card.
    Jan 25 11:14:02 Gzunder.localnet systemd[1]: Stopped target Sound Card.
    Gzunder:/home/mprowe #
    Systemctl says it has "stopped something" ... but I can still hear the music?
    More disappointingly, I have had the default sink fail this morning (the cause of this investigation) and restarting the sound.target did not get it going. I still needed to reboot

    Regards, Martin
    Hi
    In the systemctl output, there should be two cards and a sound target, eg;

    Code:
    systemctl list-units --no-pager |egrep "alsa|sound"
    
    sys-devices-pci0000:00-0000:00:01.0-0000:01:00.1-sound-card1.device                      loaded active plugged   GK208 HDMI/DP Audio Controller                                    
    sys-devices-pci0000:00-0000:00:1b.0-sound-card0.device                                   loaded active plugged   7 Series/C216 Chipset Family High Definition Audio Controller
    sound.target                                                                                loaded active active    Sound Card
    
    systemctl list-units --no-pager |egrep "alsa|sound"
    
    sys-devices-pci0000:00-0000:00:01.1-sound-card0.device                                      loaded active plugged   Kabini HDMI/DP Audio                                                         
    sys-devices-pci0000:00-0000:00:09.2-sound-card1.device                                      loaded active plugged   Family 15h (Models 60h-6fh) Audio Controller                                 
    sound.target                                                                                loaded active active    Sound Card
    Not sure if you can use systemd to unplug and re-plug a device?

    I see the alsa status as 'condition failed'

    Code:
    systemctl status alsa-<use tab completion>
    Can you add the -v option to paplay to get more info?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  9. #9
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,014
    Blog Entries
    1

    Default Re: How restart the audio/sound system?

    FWIW, PulseAudio can be enabled/disabled using 'setup-pulseaudio'....
    Code:
    sudo setup-pulseaudio --status
    Code:
    sudo setup-pulseaudio --enable
    Code:
    sudo setup-pulseaudio --disable
    but I doubt the problem is occurring at this layer. Your opening post suggests a possible power management issue to me. Can you share the hardware details please?

    Code:
    /usr/sbin/hwinfo --sound
    openSUSE Leap 15.0; KDE Plasma 5

  10. #10

    Default Re: How restart the audio/sound system?

    Quote Originally Posted by deano_ferrari View Post
    but I doubt the problem is occurring at this layer. Your opening post suggests a possible power management issue to me. Can you share the hardware details please?
    Yes, of course...
    Code:
    Gzunder:~ # hwinfo --sound
    25: PCI 100.1: 0403 Audio device                                                                                                          
      [Created at pci.378]                                                                                                                    
      Unique ID: NXNs.TB_hCuhjxV5                                                                                                             
      Parent ID: 3hqH.dmRx1m7CVE5                                                                                                             
      SysFS ID: /devices/pci0000:00/0000:00:03.0/0000:01:00.1                                                                                 
      SysFS BusID: 0000:01:00.1                                                                                                               
      Hardware Class: sound                                                                                                                   
      Model: "ATI Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]"                                                                
      Vendor: pci 0x1002 "ATI Technologies Inc"                                                                                               
      Device: pci 0xaab0 "Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]"                                                        
      SubVendor: pci 0x103c "Hewlett-Packard Company"                                                                                         
      SubDevice: pci 0xaab0                                                                                                                   
      Driver: "snd_hda_intel"
      Driver Modules: "snd_hda_intel"
      Memory Range: 0xf79fc000-0xf79fffff (rw,non-prefetchable)
      IRQ: 40 (289 events)
      Module Alias: "pci:v00001002d0000AAB0sv0000103Csd0000AAB0bc04sc03i00"
      Driver Info #0:
        Driver Status: snd_hda_intel is active
        Driver Activation Cmd: "modprobe snd_hda_intel"
      Config Status: cfg=yes, avail=yes, need=no, active=unknown
      Attached to: #17 (PCI bridge)
    
    52: PCI 1b.0: 0403 Audio device
      [Created at pci.378]
      Unique ID: u1Nb.ZbI9NHBokA7
      SysFS ID: /devices/pci0000:00/0000:00:1b.0
      SysFS BusID: 0000:00:1b.0
      Hardware Class: sound
      Model: "Intel 5 Series/3400 Series Chipset High Definition Audio"
      Vendor: pci 0x8086 "Intel Corporation"
      Device: pci 0x3b56 "5 Series/3400 Series Chipset High Definition Audio"
      SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
      SubDevice: pci 0x8375 
      Revision: 0x06
      Driver: "snd_hda_intel"
      Driver Modules: "snd_hda_intel"
      Memory Range: 0xf78f8000-0xf78fbfff (rw,non-prefetchable)
      IRQ: 39 (1451 events)
      Module Alias: "pci:v00008086d00003B56sv00001043sd00008375bc04sc03i00"
      Driver Info #0:
        Driver Status: snd_hda_intel is active
        Driver Activation Cmd: "modprobe snd_hda_intel"
      Config Status: cfg=yes, avail=yes, need=no, active=unknown
    Gzunder:~ #
    Regards, Martin
    openSUSE Leap 15; KDE Plasma 5.12.5;

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •