冻结前停止所有声音,唤醒后重新启动

冻结前停止所有声音,唤醒后重新启动

在过去的几天里,我养成了让 alsaplayer 循环播放的习惯。一旦结冰,它就停止了;醒来后,它又恢复了……好几次。上次没恢复。 dmesg 显示 snd_hda_intel 连续页面错误。杀死 alsaplayer 没有帮助。新的 alsaplayer 实例无法启动,被阻止等待来自我的/tmp/alsaplayer_ale套接字的第一个响应。我无法删除内核模块。不得不重新启动。

我没有脉冲音频。

为了冻结,我先运行xscreensaver-command -lock,然后pm-hibernate。我学会了在冻结之前释放 dhcpclient 租约,在/etc/pm/sleep.d.我想我应该做一些类似的事情来刷新音频通道,但不知道如何实现这一点。有什么提示吗?

编辑 我添加了一些日志,尽管目的不是调试内核,而是确定一个干净地停止播放的过程。声音缓冲区也应该被刷新,以便在远程流的情况下获得更干净的终止和恢复。

Aug 25 18:27:22 pcale kernel: [1068947.656385] PM: hibernation: hibernation exit
Aug 25 18:27:25 pcale kernel: [1068950.347875] r8169 0000:07:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Aug 25 18:27:28 pcale kernel: [1068953.820689] amd_iommu_report_page_fault: 30009 callbacks suppressed
Aug 25 18:27:28 pcale kernel: [1068953.822338] amd_iommu_report_page_fault: 29999 callbacks suppressed
Aug 25 18:27:33 pcale kernel: [1068958.824683] amd_iommu_report_page_fault: 30014 callbacks suppressed
[... repeated for 530 times ...]
Aug 25 18:45:19 pcale kernel: [1070024.678304] amd_iommu_report_page_fault: 30004 callbacks suppressed
Aug 25 18:45:22 pcale kernel: [1070027.235941] Disabling lock debugging due to kernel taint
Aug 25 18:48:24 pcale kernel: [1070210.088947] task:rmmod           state:D stack:    0 pid:26824 ppid:  3604 flags:0x00004004
Aug 25 18:48:24 pcale kernel: [1070210.088951] Call Trace:
Aug 25 18:48:24 pcale kernel: [1070210.088960]  __schedule+0x282/0x870
Aug 25 18:48:24 pcale kernel: [1070210.088966]  ? __kernfs_remove.part.0+0x134/0x2b0
Aug 25 18:48:24 pcale kernel: [1070210.088969]  ? usleep_range+0x90/0x90
Aug 25 18:48:24 pcale kernel: [1070210.088972]  schedule+0x46/0xb0
Aug 25 18:48:24 pcale kernel: [1070210.088975]  schedule_timeout+0x107/0x150
Aug 25 18:48:24 pcale kernel: [1070210.088979]  ? __wake_up_common_lock+0x8a/0xc0
Aug 25 18:48:24 pcale kernel: [1070210.088983]  ? __prepare_to_swait+0x4f/0x70
Aug 25 18:48:24 pcale kernel: [1070210.088986]  __wait_for_common+0xb9/0x170
Aug 25 18:48:24 pcale kernel: [1070210.088997]  snd_card_free+0x64/0x90 [snd]
Aug 25 18:48:24 pcale kernel: [1070210.089003]  pci_device_remove+0x3b/0xa0
Aug 25 18:48:24 pcale kernel: [1070210.089012]  __device_release_driver+0x17e/0x250
Aug 25 18:48:24 pcale kernel: [1070210.089017]  driver_detach+0xcb/0x120
Aug 25 18:48:24 pcale kernel: [1070210.089021]  bus_remove_driver+0x58/0xe0
Aug 25 18:48:24 pcale kernel: [1070210.089025]  pci_unregister_driver+0x2a/0xb0
Aug 25 18:48:24 pcale kernel: [1070210.089032]  __do_sys_delete_module+0x194/0x300
Aug 25 18:48:24 pcale kernel: [1070210.089037]  ? exit_to_user_mode_prepare+0x32/0x160
Aug 25 18:48:24 pcale kernel: [1070210.089042]  do_syscall_64+0x33/0x80
Aug 25 18:48:24 pcale kernel: [1070210.089047]  entry_SYSCALL_64_after_hwframe+0x61/0xc6
Aug 25 18:48:24 pcale kernel: [1070210.089052] RIP: 0033:0x7f08facd8417
Aug 25 18:48:24 pcale kernel: [1070210.089055] RSP: 002b:00007ffc57807778 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
Aug 25 18:48:24 pcale kernel: [1070210.089061] RAX: ffffffffffffffda RBX: 000055704494c760 RCX: 00007f08facd8417
Aug 25 18:48:24 pcale kernel: [1070210.089063] RDX: 000055704494c860 RSI: 0000000000000a00 RDI: 000055704494c7c8
Aug 25 18:48:24 pcale kernel: [1070210.089065] RBP: 0000000000000200 R08: 000055704494c7e0 R09: 00007f08fadaabe0
Aug 25 18:48:24 pcale kernel: [1070210.089067] R10: 000055704494d760 R11: 0000000000000206 R12: 00007ffc578079a8
Aug 25 18:48:24 pcale kernel: [1070210.089068] R13: 00007ffc5780913a R14: 000055704494c2a0 R15: 000055704494c760
Aug 25 18:50:25 pcale kernel: [1070330.920906] task:rmmod           state:D stack:    0 pid:26824 ppid:  3604 flags:0x00004004
Aug 25 18:50:25 pcale kernel: [1070330.920912] Call Trace:
Aug 25 18:50:25 pcale kernel: [1070330.920920]  __schedule+0x282/0x870
Aug 25 18:50:25 pcale kernel: [1070330.920927]  ? __kernfs_remove.part.0+0x134/0x2b0
Aug 25 18:50:25 pcale kernel: [1070330.920931]  ? usleep_range+0x90/0x90
Aug 25 18:50:25 pcale kernel: [1070330.920934]  schedule+0x46/0xb0
Aug 25 18:50:25 pcale kernel: [1070330.920937]  schedule_timeout+0x107/0x150
Aug 25 18:50:25 pcale kernel: [1070330.920942]  ? __wake_up_common_lock+0x8a/0xc0
Aug 25 18:50:25 pcale kernel: [1070330.920946]  ? __prepare_to_swait+0x4f/0x70
Aug 25 18:50:25 pcale kernel: [1070330.920949]  __wait_for_common+0xb9/0x170
Aug 25 18:50:25 pcale kernel: [1070330.920959]  snd_card_free+0x64/0x90 [snd]
Aug 25 18:50:25 pcale kernel: [1070330.920965]  pci_device_remove+0x3b/0xa0
Aug 25 18:50:25 pcale kernel: [1070330.920970]  __device_release_driver+0x17e/0x250
Aug 25 18:50:25 pcale kernel: [1070330.920974]  driver_detach+0xcb/0x120
Aug 25 18:50:25 pcale kernel: [1070330.920978]  bus_remove_driver+0x58/0xe0
Aug 25 18:50:25 pcale kernel: [1070330.920981]  pci_unregister_driver+0x2a/0xb0
Aug 25 18:50:25 pcale kernel: [1070330.920987]  __do_sys_delete_module+0x194/0x300
Aug 25 18:50:25 pcale kernel: [1070330.920992]  ? exit_to_user_mode_prepare+0x32/0x160
Aug 25 18:50:25 pcale kernel: [1070330.920996]  do_syscall_64+0x33/0x80
Aug 25 18:50:25 pcale kernel: [1070330.920999]  entry_SYSCALL_64_after_hwframe+0x61/0xc6
Aug 25 18:50:25 pcale kernel: [1070330.921003] RIP: 0033:0x7f08facd8417
Aug 25 18:50:25 pcale kernel: [1070330.921006] RSP: 002b:00007ffc57807778 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
Aug 25 18:50:25 pcale kernel: [1070330.921009] RAX: ffffffffffffffda RBX: 000055704494c760 RCX: 00007f08facd8417
Aug 25 18:50:25 pcale kernel: [1070330.921011] RDX: 000055704494c860 RSI: 0000000000000a00 RDI: 000055704494c7c8
Aug 25 18:50:25 pcale kernel: [1070330.921013] RBP: 0000000000000200 R08: 000055704494c7e0 R09: 00007f08fadaabe0
Aug 25 18:50:25 pcale kernel: [1070330.921015] R10: 000055704494d760 R11: 0000000000000206 R12: 00007ffc578079a8
Aug 25 18:50:25 pcale kernel: [1070330.921017] R13: 00007ffc5780913a R14: 000055704494c2a0 R15: 000055704494c760

在我愚蠢地尝试删除模块之后,还有更多类似的痕迹。

相关内容