LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2561|回复: 18

X下不能待机与休眠,我快崩溃了!

[复制链接]
发表于 2007-11-3 02:53:50 | 显示全部楼层 |阅读模式
Dell inspiron 1501 笔记本
AMD64  athonx2 TK-53
video card: ATI Xpress 1150  

最初的现象:
    内核a  2.6.22-suspend2-r2能够正常待机(hibernate-ram)与休眠(hibernate),无论在console或X(KDE)下,但是这个内核不认SD卡。
    内核b  2.6.23-tuxonice ,SD卡倒是认了,但是待机失败。

zhgll版主说把a的配置文件拷到2.6.23的源码里,make oldconfig
试了,开始以为成功了,因为最近一直在console下试。
在console下待机与休眠确实成功了,但是在X下却不行,待机后恢复时死机。
因为我主要关注待机,所以有的情况对休眠是否成功没有试。

最初那个成功的内核最奇怪了,现在我拿以前它的配置文件,原封不动的再编译一次,竟然认识了SD卡,但X下待机恢复时死机,休眠也失败(是休眠,不是从休眠中恢复)!也不记得以前到底是怎样个编译环境了。

说下我试的过程:
1.  最初,在sys-kernel/linux-headers-2.6.22-r2头文件下,编译的2.6.22-suspend2-r2版本内核,可以待机(hibernate-ram)和休眠(hibernate),在console和X下都可以挂起(这里用“挂起”来表示待机或休眠)和从挂起中恢复。这个内核就是不认SD卡。

2.  后来,换了sys-kernel/linux-headers-2.6.23头文件,并重新编译了glibc。此时编译了2.6.23-tuxonice内核,但由于选项选得太多了,不知道哪些冲突了,导致hibernate-ram挂起后无法恢复,一恢复就死机,不论控制台下还是X中。hibernate倒是在console下可以,X中不记得了,似乎是不行。此内核还存在其他问题,就是如果在console下用vi打开一个文件时,如果该文件有相应的swp文件存在(由于以前vi时异常退出过),那就一定死机;但在X下没有问题。

3.  再后来,用1中2.6.22的配置文件,放到2.6.23的源文件中,make oldconfig,基本保持原来设置,用这个新内核,在console下待机和休眠都可以,但是在X中都有问题,也是从挂起中恢复时死机。而且,如果同时有X启动着,Ctrl+Alt+F1切换到console,执行 hibernate-ram,然后恢复也可以,但是恢复后依然是在console下,这时再切换到X时,又死机了!

4.  又在linux-headers-2.6.23头文件下重新编译了1中的2.6.22内核,结果和3遇到了同样的问题,console下可以,X下恢复时死机。奇怪的是此时能认SD卡了。

5.  觉得4不应该啊,原来的配置文件,结果却不一样了,我所知道的区别就是此时linux-headers版本为2.6.23而以前为2.6.22-r2,还有就是在装了2.6.23版的headers后我重新编译了glibc。于是想到会不会是headers和glibc的问题。于是重新换回2.6.22-r2版的headers并重新编译glibc(编译一回glibc要一小时阿!),然后再用 2.6.22-suspend2-r2最初的配置文件编译,结果编出来的内核和4一样,在X下从待机中恢复时死机!

我快崩溃了,实在不知什么原因,不知该如何是好了。

有没有谁遇到过类似的问题?即 console 下待机休眠都可以,X下就不行了呢?

难道要在 /etc/hibernate/*.conf 中做什么特殊设置吗?我已经启用了 vbetool和radeontool了啊。

下面是 /var/log/hibernate.log 的日志

此为console下从待机中成功恢复的日志
Starting suspend at 2007年 11月 02日 星期五 18:40:08 CST
hibernate-ram: [01] Executing CheckLastResume ...
hibernate-ram: [01] Executing CheckRunlevel ...
hibernate-ram: [01] Executing LockFileGet ...
hibernate-ram: [01] Executing NewKernelFileCheck ...
hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...
hibernate-ram: [11] Executing XHacksSuspendHook1 ...
hibernate-ram: [59] Executing RemountXFSBootRO ...
hibernate-ram: [89] Executing SaveKernelModprobe ...
hibernate-ram: [91] Executing ModulesUnloadBlacklist ...
hibernate-ram: [95] Executing XHacksSuspendHook2 ...
hibernate-ram: [98] Executing CheckRunlevel ...
hibernate-ram: [98] Executing RadeonToolBacklightOff ...
hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ...
hibernate-ram: Activating sysfs power state mem ...
hibernate-ram: [98] Executing RadeonToolBacklightOn ...
hibernate-ram: [90] Executing ModulesLoad ...
hibernate-ram: [89] Executing RestoreKernelModprobe ...
hibernate-ram: [85] Executing XHacksResumeHook2 ...
hibernate-ram: [70] Executing ClockRestore ...
hibernate-ram: [59] Executing RemountXFSBootRW ...
hibernate-ram: [11] Executing XHacksResumeHook1 ...
hibernate-ram: [01] Executing NoteLastResume ...
hibernate-ram: [01] Executing LockFilePut ...
Resumed at 2007年 11月 02日 星期五 18:40:38 CST


此为X下恢复失败的日志
Starting suspend at 2007年 11月 02日 星期五 19:03:26 CST
hibernate-ram: [01] Executing CheckLastResume ...
hibernate-ram: [01] Executing CheckRunlevel ...
hibernate-ram: [01] Executing LockFileGet ...
hibernate-ram: [01] Executing NewKernelFileCheck ...
hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...
hibernate-ram: [11] Executing XHacksSuspendHook1 ...
hibernate-ram: [59] Executing RemountXFSBootRO ...
hibernate-ram: [89] Executing SaveKernelModprobe ...
hibernate-ram: [91] Executing ModulesUnloadBlacklist ...
hibernate-ram: [95] Executing XHacksSuspendHook2 ...
hibernate-ram: [97] Executing VbetoolSaveState ...
hibernate-ram: [98] Executing CheckRunlevel ...
hibernate-ram: [98] Executing RadeonToolBacklightOff ...
hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ...
hibernate-ram: Activating sysfs power state mem ...


另外,我的fbsplash也从没有成功过,不知是否和这有关。

那位高人能指点一下,多谢了!
发表于 2007-11-3 11:06:53 | 显示全部楼层
看你的情况,应该是ati-drivers是罪魁祸首。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-3 20:11:58 | 显示全部楼层
有何解决办法吗?
回复 支持 反对

使用道具 举报

发表于 2007-11-5 00:04:59 | 显示全部楼层
我也有这种情况啊, suspend2-sources-2.6.22-r2可以休眠,但tuxonice-sources-2.6.23在X下就不行了,但我的hibernate总是出错,提示什么write error, device or resources busy,但确定了一个那个文件对root是可以写的,不是权限问题.
另外楼主说的fbsplash总是有问题是指hibernate时有问题还是本身就有问题?如果后一个的话可能你的内核没配好,fbsplash已经改名了,而且使用uvesafb的话还要按网站上的要求配制一下内核和系统。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-5 11:11:54 | 显示全部楼层
Post by superekcah;1777376
我也有这种情况啊, suspend2-sources-2.6.22-r2可以休眠,但tuxonice-sources-2.6.23在X下就不行了,但我的hibernate总是出错,提示什么write error, device or resources busy,但确定了一个那个文件对root是可以写的,不是权限问题.
另外楼主说的fbsplash总是有问题是指hibernate时有问题还是本身就有问题?如果后一个的话可能你的内核没配好,fbsplash已经改名了,而且使用uvesafb的话还要按网站上的要求配制一下内核和系统。



fbsplash本身就有问题
而且我不知道 fbsplash 和 hibernate有什么关系
如果fbsplash正常的话,hibernate/hibernate-ram 时会有图形界面吗?
回复 支持 反对

使用道具 举报

发表于 2007-11-5 13:31:58 | 显示全部楼层
当然有图形界面
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-5 15:42:47 | 显示全部楼层
Post by zhllg;1777555
当然有图形界面


ft,那我的fbsplash也没有搞定,不知什么原因
回复 支持 反对

使用道具 举报

发表于 2007-11-5 18:32:43 | 显示全部楼层
Post by goodluck1982;1777631
ft,那我的fbsplash也没有搞定,不知什么原因

从2.22升级到2.23的话看一下内核中

  1. -> Device Drivers
  2.        -> Graphics support
  3.        -> Console display driver support                                                
  4.           -> Framebuffer Console support
  5.             Support for the Framebuffer Console decorations
复制代码

选中了没
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-5 18:44:06 | 显示全部楼层
Post by superekcah;1777703
从2.22升级到2.23的话看一下内核中

  1. -> Device Drivers
  2.        -> Graphics support
  3.        -> Console display driver support                                                
  4.           -> Framebuffer Console support
  5.             Support for the Framebuffer Console decorations
复制代码

选中了没

-> Device Drivers
       -> Graphics support
       -> Console display driver support                                                
          -> Framebuffer Console support
下没有 Support for the Framebuffer Console decorations
而是如下,最后一条没有选

│ │                    --- VGA text console                                                                      │ │
  │ │                    
  •    Enable Scrollback Buffer in System RAM                                              │ │
      │ │                    (256)   Scrollback Buffer Size (in KB)                                                    │ │
      │ │                    ---   Video mode selection support                                                        │ │
      │ │                    < > Framebuffer Console support  


    选上后如下
      │ │                   --- VGA text console                                                                      │ │
      │ │                  
  •    Enable Scrollback Buffer in System RAM                                              │ │
      │ │                   (256)   Scrollback Buffer Size (in KB)                                                    │ │
      │ │                   ---   Video mode selection support                                                        │ │
      │ │                   <*> Framebuffer Console support                                                           │ │
      │ │                  
  •    Map the console to the primary display device                                       │ │
      │ │                  
  •    Framebuffer Console Rotation                                                        │ │
      │ │                  
  • Select compiled-in fonts                                                              │ │
      │ │                  
  •    VGA 8x8 font                                                                        │ │
      │ │                   ---   VGA 8x16 font                                                                       │ │
      │ │                   [ ]   Mac console 6x11 font (not supported by all drivers) (NEW)                          │ │
      │ │                   [ ]   console 7x14 font (not supported by all drivers) (NEW)                              │ │
      │ │                   [ ]   Pearl (old m68k) console 8x8 font (NEW)                                             │ │
      │ │                   [ ]   Acorn console 8x8 font (NEW)                                                        │ │
      │ │                   [ ]   Mini 4x6 font (NEW)                                                                 │ │
      │ │                  
  • Sparc console 8x16 font                                                               │ │
      │ │                   [ ] Sparc console 12x22 font (not supported by all drivers) (NEW)                         │ │
      │ │                   [ ] console 10x18 font (not supported by all drivers) (NEW)
  • 回复 支持 反对

    使用道具 举报

     楼主| 发表于 2007-11-5 19:35:23 | 显示全部楼层
    使用上面的新内核后,启动时还是没有界面,不过tuxoniceui_fbsplash -t 时正常了,hibernate时也出现了界面

    启动时有些错误信息如下:
    uvesafb: failed to execute /sbin/v86d
    uvesafb: make sure that the v86d helper is installed and executable
    uvesafb: Getting VBE info block failed (eax=0x4f00, err=-2)
    uvesafb: vbe_init() failed with -22
    uvesafb: probe of uvesafb.0 failed with error -22

    我已经装了v86d,又重装了一下,然后又设置了 kernel的 CONFIG_INITRAMFS_SOURCE="/usr/share/v86d/initramfs"
    重新编了一下内核,再启动,dmesg |grep uvesa 如下:
    uvesafb: ATI Technologies Inc., MS48, 01.00, OEM: ATI Radeon? Xpress 1150    , VBE v2.0
    uvesafb: no monitor limits have been set, default refresh rate will be used
    uvesafb: scrolling: redraw
    uvesafb: cannot reserve video memory at 0xc8000000
    uvesafb: probe of uvesafb.0 failed with error -5

    不过启动时仍然没有图形界面
    谁知道是怎么回事?
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    快速回复 返回顶部 返回列表