Перезапустить службу звука linux

Linux Mint Forums

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

[SOLVED] How can I Restart Sound?

Post by DeLaRook » Wed Oct 06, 2010 11:29 am

I have tried to learn to use Linux, because I prefer it.
It is on my home computer and on my wife’s, too (2+ years now).
We don’t have the other OS.

All my wife’s joy at Mint making Youtube work has been used up because I just
can’t get my head around any of the advice about how to fix sound. It is just
far too complicated for me.

If only I could use the kind of CLI technique that periodically calms down
the desktop memory problem so simply with:
«kquitapp plasma-desktop»
and then
«plasma-desktop».

[Courtesy of Nikita Melnichenko]
My lasting gratitiude to Nikita.

But sound?
Help postings I’ve seen want to *fix* sound.
So did I, at first, but not any more.
It’s just too hard for me.
I just want to
stop it (or them)
and
restart it (or them)
from time to time to stop the horrible echo thing even if it comes back again
after a while.

But not with reboots. They are a problem because I can’t fix «recent documents»
to store a useful amount, and Okular doesn’t tell me where its open pdf files
originated so I lose those, even Kate seems reluctant sometimes, too.

So, please, please somebody help me reset sound so I don’t have all the grief
and arguments about rebooting and losing the locations of open files.

The sound is on-board (motherboard is nVidia + AMD), there is no separate soundcard
(trying to keep it simple). Mint8 KDE is installed on the hard drive drive
drive drive drive drive, help help help help.

Источник

Перезапуск звуковой системы.

Как перезапустить звуковую систему в линукс (убунту) без перезагрузки?

Re: Перезапуск звуковой системы.

sudo /etc/init.d/pulseaudio restart

sudo /etc/init.d/alsa-utils restart

Re: Перезапуск звуковой системы.

rmmod на все модули alsa по порядку, затем modprobe на них же. Возможно для удобства есть скрипт, которым можно сделать так:

Читайте также:  Dahdi linux complete current

Если используется pulseaudio (или нечто подобное), то нужно перезапустить и его. Опять же для этого скорее всего есть скрипт в /etc/init.d/.

P.S. Я не убунтуец, поэтому точных инструкций дать не могу.

Re: Перезапуск звуковой системы.

Пока я печатал, уже сказали как правильно =).

Re: Перезапуск звуковой системы.

можно тупо переконфигурить альсу

Re: Перезапуск звуковой системы.

>можно тупо переконфигурить альсу

Болит палец — отрубаем руку? (:

ЕМНИП sudo killall puleaudio && pulsaudio

Точно сказать не могу, ибо последний раз юзал пульс 3 месяца назад.

Re: Перезапуск звуковой системы.

[оффтоп, но все же] Есть причины использовать pulseaudio в дополнение к alsa? Казалось бы это +1 уровень к абстракции (железоalsapulse->динамики). Хотелось бы услышать мнение человека, который реально pulse находит удобнее, а не просто описание возможностей.

Re: Перезапуск звуковой системы.

Прыгай в машину времени, сейчас быть довольным пульсом очень сложно. Наверное, можно заставить его работать нормально, но только вот зачем — всё интересное ещё не реализовали.

Re: Перезапуск звуковой системы.

а нахрена этот пульс? я в гентоо без него все собираю. алсо, это говно даже не портабельно.

Re: Перезапуск звуковой системы.

> железоalsapulse->динамики

динамикижелезоalsapulsexinephononamarok2 нынче модно 😉

Re: Перезапуск звуковой системы.

1) У pulseaudio программный микшер быстрее, чем встроенный в alsa dmix.
2) На pulseaudio можно менять устройства вывода (например с колонок на наушники) не перезапуская программу с которой выводится звук.
3) Для разных программ можно держать свои настройки громкости.
4) Искаробочный lowpass-фильтр для сабвуфера.
5) Прозрачная передача звука по сети.

P.S. PulseAudio не использую. Последний раз смотрел довольно давно.

Re: Перезапуск звуковой системы.

> 2) На pulseaudio можно менять устройства вывода (например с колонок на наушники) не перезапуская программу с которой выводится звук.

Хм. вставляю в разьём наушники во время проигрывания любого звука (хоть входа в систему) на динамика сразу mute, в наушниках — звук. Alsa.

> 3) Для разных программ можно держать свои настройки громкости.

Как-то сомнительно. Сделал допустим на kopete 10% общей громкости. Потом забыл об этом. Включаю какой-нить metal (Slayer скажем). Соседи счастливы.

> 5) Прозрачная передача звука по сети.

Хм. А чем это лучше NAS? Последнего, правда, не использовал.

Re: Перезапуск звуковой системы.

> Хм. вставляю в разьём наушники во время проигрывания любого звука (хоть входа в систему) на динамика сразу mute, в наушниках — звук. Alsa.

Можно инструкцию на это чудо? А то поисковый запрос не придумывается.

Полезно, но афаик они это пока не реализовали.

Re: Перезапуск звуковой системы.

Пульс несовместим с вайном => без танцев с бубном в проприетарные игры не поиграешь.

Re: Перезапуск звуковой системы.

> Там в настройках была какая-то опция по поводу создания виртуальных устройств или что-то подобное. С этим работает. По-крайней мере в вине 0.9.5(где-то там) работал звук в конфигуряторе.

Re: Перезапуск звуковой системы.

> Можно инструкцию на это чудо? А то поисковый запрос не придумывается.

Х.З. Slackware 12.1, KDE 3.5.9, aRts, GNU/Linux kernel 2.6.28-rc4
У меня так — Из коробки.

Читайте также:  Линукс перезагрузка комбинация клавиш

Источник

Restart Ubuntu sound processes via command line

I tried to hibernate Ubuntu (which fails, but thats another issue) and resumed my system. After this, the sound doesn’t get played. What command can/should I run to restart the ubuntu sound system.

Did Dan Walker’s answer work for you? If it did, it would be nice if you would add a comment saying so. If not, why did you accept it? You should accept an answer only if it works for you.

6 Answers 6

If Ubuntu is still using Alsa for its sound engine (I’m not sure as its been awhile since I’ve used it), you can restart by typing sudo /etc/init.d/alsa-utils restart into the terminal.

Since it doesn’t seem to be working, you might need to make sure that nothing is trying to use it. (example shamelessly stolen from the Ubuntu forums)

name@comp:~$ lsof | grep pcm sh 5079 name 70u CHR 116,6 13639 /dev/snd/pcmC0D0p name@comp:~$ kill -9 5079 

Nice try. Good answer. But in my case, doesn’t solve the problem. Yes, to my best knowledge, I use ALSA itself.

Any specific order to follow. Restarted both. No luck. I am confident, by restarting my system, sound will work. But I dont want to.

Seems like I will have to kill firefox, chrome, and gnome-panel. As good as restarting the system 😐 . Anyway, thanks!

That’s what I ended up having to do @LakshmanPrasad — I had, easily, 12-18 pulse processes. Cut that down to ~6 after closing everything except gnome. It’s easier, if not too windows-y to just restart.

Источник

Is there another way to restart the sound system if pulseaudio/ALSA don’t work?

I was listening to music, and my sound suddenly went dead in all my applications. I’m using Ubuntu 12.04, which uses pulseaudio, so I tried sudo /etc/init.d/pulseaudio restart , but nothing happened. According to lsof | grep pcm , nothing is using the soundcard at the moment, although I’m not entirely sure if my source for that command is applicable. Is there a way another way to restart Ubuntu 12.04’s sound system from the command line without rebooting the system?

I think the solution really depends on the computer you have and the ubuntu version installed on it. For me none of the 2 top answers worked. joeytwiddle’s answer worked. I have a Lenovo Legion Y520 with Ubuntu 16.04: sudo pm-suspend is the only thing that worked for me.

This is NOT an answer to the question, however, this page show up in the top when searching for how to fix the sound in Ubuntu 18 and 19. When having trouble with the motherboard built-in Intel soundcard, this solution has worked for me: linuxuprising.com/2018/06/… Excerpt: Ubuntu 18: add «options snd-hda-intel model=generic» at the end of the /etc/modprobe.d/alsa-base.conf reboot Ubuntu 18, 19, 20. Kernel 5.3.0-41 and -42: Edit /etc/modprobe.d/alsa-base.conf as root and add «options snd-hda-intel dmic_detect=0» Edit /etc/modprobe.d/blacklist.c

Читайте также:  Узнать версию питона линукс

9 Answers 9

I’ve used pulseaudio -k && sudo alsa force-reload a couple of times, and it worked well. The first part kills pulseaudio, the second reloads ALSA. You don’t need to restart pulseaudio, because it auto-restarts.

This helped to me to fix the issue ‘no sound after suspend’ I have suffered from for don’t remember how long.

What I do when my sound doesn’t work is

and then I press Alt + F2 and type in pulseaudio. It usually works for me.

What is the difference between this and systemctl —user restart pulseaudio ? The restart worked for me before, but today it did not and I needed to kill it (it seemed to automatically restart, when I typed pulseaudio in a terminal it errored that the daemon is already running).

There isn’t much difference in practice. This answer relies on systemd detecting that pulseaudio has crashed and restarting it. Your version does this explicitly.

Just for completeness, in newer Ubuntus versions that use systemd, I used this and it worked well:

systemctl —user restart pulseaudio

This, along with killing/restarting Alsa, allowed me to get the audio working on my Acer Swift 3 (Ryzen 4700U) under Kubuntu 20.10.

This answer is very useful since pulseaudio won’t function properly after a session change (or CTRL-ALT-BACKSPACE) in ubuntu 20.04

In my case there were nasty messages in kern.log / dmesg :

sound hdaudioC0D2: HDMI: invalid ELD buf size -1 

The solution was simply to suspend and resume the machine!

i don’t know what was going on, I also had a mike problem, reinstalled pulseaudio and alsa packages, but the sudo pm-suspend trick did it.

Same thing happened here — after battery died, headphones did not work after next boot. pm-suspend fixed it.

In the last Wifislax(64 2.0)livecd -intoram. The ‘mixer’ dissapeared and OS sound got muted after all I’ve tryed all above none worked only this.

For the new multimedia framework Pipewire, restart the Pipewire services.

❯ systemctl --user restart pipewire.service # if the above is not enough, try ❯ systemctl --user restart pipewire-pulse.service 

I encountered this issue with a USB audio device that would sometimes when booting the machine, not connect properly leaving me without audio until a reboot. If you are someone who is having the same issue but with a USB audio device then I recommend the following which fixed it for me:

sudo rmmod xhci_pci && sudo rmmod xhci_hcd && sudo modprobe xhci_pci xhci_hcd 

None of the other answers would fix it and I assume that came down to the USB device not registering properly on boot. This simply reboots the USB devices. Note: you should only run all commands at once, running sudo rmmod xhci_hcd alone will disable all USB devices e.g., your keyboard, meaning the remaining commands cannot be run.

I will be honest and say that I doubt that the xchi_pci part is necessary, so if someone is more knowledgeable regarding this please correct me.

Источник

Оцените статью
Adblock
detector