Âm thanh của tôi đã ngừng hoạt động ngày hôm nay, làm thế nào tôi có thể sửa chữa nó?


19

Đây dường như là một vấn đề với pulseaudio. Tôi đã đăng nhập qua VNC trên điện thoại của mình và bắt đầu phát video khiến X bị sập (như đôi khi xảy ra). Tôi khởi động lại và đột nhiên âm thanh không hoạt động.

  • Tôi có Intel HDA / Realtek ALC889

    00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller
    
  • alsamixer đang phát hiện điều này tốt
  • PulseAudio không phát hiện thiết bị alsa này vì vậy đang sử dụng auto_nulllàm bồn rửa mặc định (nhật ký bên dưới).
  • Khi tôi giết đúng cách PulseAudio (bảo nó không tự động khởi động) giao tiếp ALSA trực tiếp với card âm thanh hoạt động tốt. speaker-test, ví dụ, công trình. Vì vậy, các lớp phần cứng và ALSA là IMO tốt.
  • Trong nhật ký, có vẻ như thẻ có thể "bận" nhưng tôi thực sự không biết làm thế nào hoặc tại sao bây giờ (và chưa bao giờ trước đó). Có một tập tin khóa ALSA ở đâu đó mà nó vẫn còn ở đó vì sự cố của tôi không?
  • Tôi vừa chạy sudo fuser /dev/snd/*vừa thấy cái này:

    oli@bert:~$ sudo fuser /dev/snd/*
    /dev/snd/controlC0:   1884
    /dev/snd/pcmC0D0c:    1884m
    /dev/snd/timer:       1884
    

    Nhìn vào danh sách quy trình ( ps aux | grep 1884) cho tôi biết quy trình 1884 là arecord -c 1 -f S16_LE -r 8000 -t raw. Không biết đây là cái gì hay tại sao nó lại chạy.

  • Khi tôi cố gắng và giết arecord(với quyền root), nó chỉ xuất hiện và phản hồi trên phần cứng.

Tôi đang ở trong một tình huống rất khó chịu khi tôi không biết chuyện gì đang xảy ra và không biết làm thế nào để tìm hiểu. Tôi mở tất cả các đề xuất để làm việc này một lần nữa. Cháy đi.

Và đây là những gì tôi nhận được khi dừng PA tự động tải, tắt nó và sau đó bắt đầu với -vvvv.

oli@bert:~$ pulseaudio -vvvvv
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: core-rtclock.c: Timer slack is set to 50 us.
D: core-util.c: RealtimeKit worked.
I: core-util.c: Successfully gained nice level -11.
I: main.c: This is PulseAudio 0.9.21-63-gd3efa-dirty
D: main.c: Compilation host: x86_64-pc-linux-gnu
D: main.c: Compilation CFLAGS: -g -O2 -g -Wall -O3 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: main.c: Running on host: Linux x86_64 2.6.38-rc3 #1 SMP Tue Feb 1 10:53:04 GMT 2011
D: main.c: Found 8 CPUs.
I: main.c: Page size is 4096 bytes
D: main.c: Compiled with Valgrind support: no
D: main.c: Running in valgrind mode: no
D: main.c: Running in VM: no
D: main.c: Optimised build: yes
D: main.c: All asserts enabled.
I: main.c: Machine ID is 8310740c4729ef474fe5ecec4bbf5a6b.
I: main.c: Session ID is 8310740c4729ef474fe5ecec4bbf5a6b-1297338553.571075-1050119523.
I: main.c: Using runtime directory /home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-runtime.
I: main.c: Using state directory /home/oli/.pulse.
I: main.c: Using modules directory /usr/lib/pulse-0.9.21/modules.
I: main.c: Running in system mode: no
I: main.c: Fresh high-resolution timers available! Enjoy ol' chap!
I: cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 
I: svolume_mmx.c: Initialising MMX optimized functions.
I: remap_mmx.c: Initialising MMX optimized remappers.
I: svolume_sse.c: Initialising SSE2 optimized functions.
I: remap_sse.c: Initialising SSE2 optimized remappers.
I: sconv_sse.c: Initialising SSE2 optimized conversions.
D: memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: database-tdb.c: Opened TDB database '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-device-volumes.tdb'
I: module-device-restore.c: Sucessfully opened database file '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-device-volumes'.
I: module.c: Loaded "module-device-restore" (index: #0; argument: "").
D: database-tdb.c: Opened TDB database '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-stream-volumes.tdb'
I: module-stream-restore.c: Sucessfully opened database file '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-stream-volumes'.
I: module.c: Loaded "module-stream-restore" (index: #1; argument: "").
D: database-tdb.c: Opened TDB database '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-card-database.tdb'
I: module-card-restore.c: Sucessfully opened database file '/home/oli/.pulse/8310740c4729ef474fe5ecec4bbf5a6b-card-database'.
I: module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: module.c: Loaded "module-augment-properties" (index: #3; argument: "").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-udev-detect.so': success
D: module-udev-detect.c: /dev/snd/controlC0 is accessible: yes
D: module-udev-detect.c: /devices/pci0000:00/0000:00:1b.0/sound/card0 is busy: yes
I: module-udev-detect.c: Found 1 cards.
I: module.c: Loaded "module-udev-detect" (index: #4; argument: "").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-bluetooth-discover.so': success
D: dbus-util.c: Successfully connected to D-Bus system bus ba7c9a1f90b3d49d930bca2100000015 as :1.62
D: bluetooth-util.c: dbus: interface=org.freedesktop.DBus, path=/org/freedesktop/DBus, member=NameAcquired
D: bluetooth-util.c: Bluetooth daemon is apparently not available.
I: module.c: Loaded "module-bluetooth-discover" (index: #5; argument: "").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-esound-protocol-unix.so': success
I: module.c: Loaded "module-esound-protocol-unix" (index: #6; argument: "").
I: module.c: Loaded "module-native-protocol-unix" (index: #7; argument: "").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-gconf.so': success
I: module.c: Loaded "module-gconf" (index: #8; argument: "").
I: module-default-device-restore.c: Saved default sink 'auto_null' not existant, not restoring default sink setting.
I: module-default-device-restore.c: Saved default source 'auto_null.monitor' not existant, not restoring default source setting.
I: module.c: Loaded "module-default-device-restore" (index: #9; argument: "").
I: module.c: Loaded "module-rescue-streams" (index: #10; argument: "").
D: module-always-sink.c: Autoloading null-sink as no other sinks detected.
I: sink.c: Created sink 0 "auto_null" with sample spec s16le 6ch 44100Hz and channel map front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center
I: sink.c:     device.description = "Dummy Output"
I: sink.c:     device.class = "abstract"
I: sink.c:     device.icon_name = "audio-card"
D: core-subscribe.c: Dropped redundant event due to change event.
I: source.c: Created source 0 "auto_null.monitor" with sample spec s16le 6ch 44100Hz and channel map front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center
I: source.c:     device.description = "Monitor of Dummy Output"
I: source.c:     device.class = "monitor"
I: source.c:     device.icon_name = "audio-input-microphone"
D: module-null-sink.c: Thread starting up
I: module.c: Loaded "module-null-sink" (index: #11; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").
I: module.c: Loaded "module-always-sink" (index: #12; argument: "").
I: module.c: Loaded "module-intended-roles" (index: #13; argument: "").
D: module-suspend-on-idle.c: Sink auto_null becomes idle, timeout in 5 seconds.
I: module.c: Loaded "module-suspend-on-idle" (index: #14; argument: "").
I: client.c: Created 0 "ConsoleKit Session /org/freedesktop/ConsoleKit/Session1"
D: module-console-kit.c: Added new session /org/freedesktop/ConsoleKit/Session1
I: module.c: Loaded "module-console-kit" (index: #15; argument: "").
I: module.c: Loaded "module-position-event-sounds" (index: #16; argument: "").
D: dbus-util.c: Successfully connected to D-Bus session bus efbffc6788fad56cfd64d40c00000018 as :1.182
D: main.c: Got org.pulseaudio.Server!
I: main.c: Daemon startup complete.
I: client.c: Created 1 "Native client (UNIX socket client)"
I: client.c: Created 2 "Native client (UNIX socket client)"
D: protocol-native.c: Protocol version: remote 16, local 16
I: protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
D: protocol-native.c: SHM possible: yes
D: protocol-native.c: Negotiated SHM: yes
D: protocol-native.c: Protocol version: remote 16, local 16
I: protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
D: protocol-native.c: SHM possible: yes
D: protocol-native.c: Negotiated SHM: yes
D: module-augment-properties.c: Looking for .desktop file for gnome-volume-control-applet
D: module-augment-properties.c: Looking for .desktop file for gnome-settings-daemon
D: core-subscribe.c: Dropped redundant event due to change event.
I: module-suspend-on-idle.c: Sink auto_null idle for too long, suspending ...
D: sink.c: Suspend cause of sink auto_null is 0x0004, suspending

Lưu ý một phần có vẻ như tìm thấy phần cứng nhưng nói rằng nó bận (không biết điều này có liên quan không).

D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9.21/modules/module-udev-detect.so': success
D: module-udev-detect.c: /dev/snd/controlC0 is accessible: yes
D: module-udev-detect.c: /devices/pci0000:00/0000:00:1b.0/sound/card0 is busy: yes
I: module-udev-detect.c: Found 1 cards.

đã thử mv ~ / .pulse?
Takkat

@Takkat yeah, tôi rm -rflà nó và khởi động lại cho may mắn. Hóa ra hôm nay tôi không có may mắn :(
Oli

Câu trả lời:


10

HUZZAH

Đúng. arecordlà yếu tố tìm kiếm tinh ranh ở đây mà cuối cùng tôi đã tìm thấy thông qua fusercác tập tin âm thanh (xem câu hỏi của tôi cho quá trình của tôi). Nhưng tôi không thể tìm thấy những gì gây ra arecordđể bắt đầu như root khi khởi động. Đây là cách tôi đã làm điều đó:

  1. Chạy pstree | less
  2. Trong đó, gõ /arecordvà nhấn trở lại để tìm arecordquá trình.
  3. Nhấn lên một lần và bạn sẽ thấy cha mẹ của nó. Trong trường hợp của tôi đây là randomsound.

Tôi đã cài đặt randomsoundmột vài ngày trước để tạo thêm entropy (để tái tạo /dev/random) bằng card âm thanh của mình. Tôi đã hoàn toàn quên nó đã được cài đặt và tôi đoán đây là lần đầu tiên tôi khởi động lại kể từ khi cài đặt nó.

Trong ngắn hạn sudo apt-get remove randomsoundcố định nó. PulseAudio bây giờ có thể lấy card âm thanh của tôi và tôi có thể nghe một số europop rác trong khi tôi làm việc.



Những gì f * ck ... Chạy lệnh, và bùng nổ, âm thanh hoạt động ngay lập tức. Cảm ơn rất nhiều, tôi sẽ không bao giờ tìm ra điều này!
Cướp

6

Nó xảy ra với tôi rất nhiều trong khi thử nghiệm rằng pulseaudio đi chuối vì những lý do mơ hồ. Tôi giữ một người dùng thứ hai trên máy chủ của mình mà tôi sử dụng để kiểm tra chéo nếu sự cố liên quan đến hệ thống hoặc liên quan đến người dùng: trong trường hợp đầu tiên cả hai người dùng sẽ hiển thị sự cố, trong trường hợp sau chỉ có một hoặc khác. Nếu vấn đề phụ thuộc vào người dùng, thì đó sẽ là một cái gì đó sai trong thư mục nhà. Với âm thanh xung là ~/.pulsehay ~/.config/pulse. đổi tên chúng, ví dụ như _broken, cho phép pulseaudio tái tạo chúng một cách chính xác nếu bạn đăng xuất và quay lại. Nó hoạt động hầu hết thời gian với tôi.


Điều này làm việc cho tôi và không cần phải đăng xuất / đăng nhập. Tôi đã đổi tên thư mục ~ / .config / Pulse và một thư mục mới đã được tạo ngay lập tức và tôi có thể chọn thiết bị đầu ra của mình và hiện đang hoạt động 100%.
cướp

0

Trong khi tôi tìm kiếm hàng giờ liền để tìm câu trả lời, tôi đã thử khởi động lại ect .. Không có gì hiệu quả, cho đến khi tôi gõ lệnh này:

sudo arecord killall

Đã sửa lỗi âm thanh của tôi, tôi đã tìm kiếm giải pháp cho vấn đề này ở mọi nơi, vì vậy tôi nghĩ rằng tôi sẽ đăng giải pháp của mình. Chúc may mắn!


3
Recording WAVE 'killall', tốt đẹp
Nearoo
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.