Chinaunix首页 | 论坛 | 博客
  • 博客访问: 154969
  • 博文数量: 26
  • 博客积分: 1723
  • 博客等级: 上尉
  • 技术积分: 329
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-04 14:06
文章分类

全部博文(26)

文章存档

2016年(1)

2013年(5)

2011年(3)

2009年(6)

2008年(11)

分类: LINUX

2009-01-21 14:48:06

两种方法:
1. 每次启动后,手动运行如下命令重载alsa。
  1. alsa force-reload

2. 创建脚本,每次休眠后启动自动运行。

1): 修改 /etc/default/alsa 中的 "force_unload_modules_before_suspend" 为:
  1. force_unload_modules_before_suspend="snd_hda_intel"

2): 创建文件 /usr/lib/pm-utils/sleep.d/45sound

  1. #!/bin/bash

  2. if [ ! -x /sbin/alsa ]; then
  3.         exit 0;
  4. fi

  5. case "$1" in
  6.         hibernate|suspend)
  7.                 /sbin/alsa suspend
  8.                 ;;
  9.         thaw|resume)
  10.                 /sbin/alsa resume
  11.                 ;;
  12.         *)
  13.                 ;;
  14. esac

  15. exit $?


3): 给 /usr/lib/pm-utils/sleep.d/45sound添加可执行权限 :

       chmod +x /usr/lib/pm-utils/sleep.d/45sound
阅读(2232) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~