b:Lo[n|g]

this blog belongs to Lon…

fglrx and suspend in Ubuntu Hardy

Posted on | February 26, 2008 | 27 Comments

Finally I seem to have suspend and resume working on my Lenovo T60. Using Ubuntu Hardy. 2.6.24-10-generic kernel and fglrx version 8.02, which is default from Ubuntu Hardy repositories. The trick seems to have been the following changes in /etc/default/acpi-support (I’ve prefixed previous settings with a “Lon” comment):

#Lon: MODULES_WHITELIST=""
MODULES_WHITELIST="fglrx"
--
#Lon: SAVE_VBE_STATE=true
SAVE_VBE_STATE=false
--
#Lon: POST_VIDEO=true
POST_VIDEO=false
--
#Lon: # DOUBLE_CONSOLE_SWITCH=true
DOUBLE_CONSOLE_SWITCH=true

I suspect that perhaps the DOUBLE_CONSOLE_SWITCH was missing when I’ve previously tried to change settings in acpi-support, since I’ve been trying to get this work for a long time now without any success. Not sure I can really believe this yet, but at least I can now resume from suspend. Will know for sure after some time of experience I guess. Only issue I now have seems to be problem with wireless network access after resume. Now I have to do:

rmmod iwl3945
modprobe iwl3945
/etc/init.d/hal restart

and select my wireless network from the NetworkManager again. Anyway, kind of happy now. :)

Comments

27 Responses to “fglrx and suspend in Ubuntu Hardy”

  1. ibn
    March 2nd, 2008 @ 14:18

    det er viktig at termokondensatoren er avslått hvis dette skal bli en suksess.

  2. Stephen Cradock
    March 11th, 2008 @ 01:27

    Thanks for this – I am wrestling with getting suspend/resume back in hardy too. I have an ATI Radeon Xpress 200M card, and the fglrx driver is supposed to allow suspend/resume with newest ubuntu (kernel 2.6.24-12). But making the changes you specify doesn’t quite get me there – I must have changed some other settings too. Could you post a copy of /etc/default/acpi-support, or list ALL the video-related settings, please? Thanks a lot…..

  3. Lon
    March 11th, 2008 @ 09:03


    ACPI_SLEEP=true
    ACPI_HIBERNATE=true
    ACPI_SLEEP_MODE=mem
    MODULES=""
    MODULES_WHITELIST="fglrx"
    SAVE_VBE_STATE=false
    VBESTATE=/var/lib/acpi-support/vbestate
    POST_VIDEO=false
    USE_DPMS=true
    DOUBLE_CONSOLE_SWITCH=true
    HIBERNATE_MODE=shutdown
    LOCK_SCREEN=true
    STOP_SERVICES=""
    RESTART_IRDA=false
    ENABLE_LAPTOP_MODE=false
    SPINDOWN_TIME=12

  4. Faheem Pervez
    March 12th, 2008 @ 18:01

    I love you :P

    No, really thanks. Resume works for me fully now ^-^ :)

  5. jo
    March 23rd, 2008 @ 15:48

    I have a line
    MODULES=”ipw3945″
    in acpi-support, and wireless network resumes and reconnects fine. The listed modules are automatically removed at suspend, reloaded on resume,

    (actually it is
    MODULES=”ipw3945 kvm-intel kvm”
    but those others are not relevant for this)

  6. jo
    March 23rd, 2008 @ 15:54

    Heh. Checking more closely, that line probably does exactly nothing since it is now called iwl3945, not ipw3945. So all I can say is this: It works for me (on T60).

  7. altendky
    April 16th, 2008 @ 16:38

    thanks for posting this. i would just like to share that i am on a thinkpad r50p running fglrx under ubuntu 8.04 beta (hardy heron) and i uncommented this single line in /etc/default/acpi-support:

    DOUBLE_CONSOLE_SWITCH=true

    and it seems to be working. previously, a single block of the screen around the cursor would show, but nothing would really work.

    thanks,
    -kyle

  8. Lon
    April 16th, 2008 @ 17:21

    jo: I’ve added ipw3945 to my list of modules now, and it does seem to work now. Don’t have to restart hal and stuff. :) Tnx. Strange this works, since it is not a listed module, as you say…

  9. altendky
    April 16th, 2008 @ 18:57

    bother, i thought the changes had fixed my r50p, but it only seemed to work for a couple times…

  10. john
    April 23rd, 2008 @ 17:54

    is your interface being named eth1 or wlan0_rename? I had a similar problem with wireless that had to do with udev changes when i upgraded from gutsy

  11. Lon
    April 23rd, 2008 @ 19:20

    If you’re asking me, john, network is working for me now after adding ipw3945 to the list of modules in /etc/default/acpi-support (as I wrote). I previously had wlan0_rename as one of my interfaces. Now it seems to have changed, so that I get assigned IP-addresses for eth1 instead. Like what it used to before in for example Gutsy.

  12. john
    April 23rd, 2008 @ 21:36

    cool, i’m using iwl3945 and it’s working without adding it to acpi-support, however it’s named wlan0 now rather than eth1. also, the fixes for fglrx suspend/resume you posted didn’t help me. i can resume fine without compiz enabled but if it is, i get an error about not being able to detect my graphics card.

  13. Kolja
    April 29th, 2008 @ 10:53

    Works for me, thanks a lot!

  14. Dave Abrahams
    April 30th, 2008 @ 16:28

    Do you have a dock? If so, https://bugs.launchpad.net/ubuntu/+bug/218760 might explain why you need DOUBLE_CONSOLE_SWITCH.

    Also, I had this issue that prevented suspend with compiz active: https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.24/+bug/197209/comments/21

  15. gatman3
    May 3rd, 2008 @ 06:45

    Just want to say thanks. This fixed suspend/resume for my MSI MS-1013 with the infamous RS480. This is the first time in the two years I have owned this notebook… dating back to Ubuntu Breezy… that I have *ever* gotten this to work. Awesome.

  16. Lon
    May 5th, 2008 @ 09:14

    good gatman3 :)

  17. djails
    May 5th, 2008 @ 10:50

    Hi,
    unfortunately, the fix mentioned above doesnt work for me… My laptop also has a radeon xpress 200 (toshiba A100), and suspend/resume used to work with gutsy and ati driver 8.2, but under hardy, suspend works, but the laptop fails to wake up. All I get is a black screen, no backlight, and it doesnt even get to the stage where i used to see a blinking cursor. It freezes straight away.
    Any suggestion ?
    I m yet to try re-installing ati driver 8.2

  18. Lon
    May 5th, 2008 @ 11:47

    Dave: I don’t use a dock. Haven’t played with this any more since I wrote this blog entry, so it could be that this has changed now after Hardy is out from the beta.

    djails: All I can say is that with my T60 and X1400 I had similar problem as you. I was able to suspend, but not to resume from suspend. The changes I’ve described works for me.

  19. djails
    May 5th, 2008 @ 13:41

    Thanks for your reply Lon, I managed to fix my problem which i guess was slightly different form yours…
    I found out that “sudo /etc/acpi/sleep.sh force” did suspend and resume, whereas pm-suspend (which is what gnome-power-manager uses to suspend the machine) doesnt. So I change a couple of lines in a config file and now it works. full story at http://ubuntuforums.org/showthread.php?t=782782

  20. Lon
    May 5th, 2008 @ 13:53

    Ah. Ok. Good to know, djails.

  21. JasperS
    May 19th, 2008 @ 18:59

    Thanx you guys, it works great now, network and all, on my T60 with X1400.

    offtopic:
    Now I dont suppose anyone in here knows how to get hardware acceleration going?
    fglrxinfo shows Mesa.. glxgears gives me a pitiful ~190 FPS, and I can see 3D animations jerking. :(

  22. JasperS
    May 19th, 2008 @ 20:02

    offtopic again:
    I found somewhere (http://wiki.cchtml.com/index.php/Ubuntu_Hardy_Installation_Guide) that uninstalling xserver-xgl might help. It did, but in turn this broke my Compiz. Cutting a long story short, reinstalling the whole ATI thing with envyng helped, and now everything is working!

    Thanx again guys for the useful tips!

  23. Lon
    May 19th, 2008 @ 20:10

    Jasper, for the compiz stuff to work I think you have to have

    Section “Extensions”
    Option “Composite” “on”
    EndSection

    in your /etc/X11/xorg.conf, but I have myself disabled desktop effects to have a more reliable suspend/resume and because for example GoogleEarth doesn’t seem to work very well with it on. fglrxinfo on my T60 says:

    display: :0.0 screen: 0
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: ATI Mobility Radeon X1400
    OpenGL version string: 2.1.7412 Release

    glxgears:

    18356 frames in 5.0 seconds = 3671.115 FPS

  24. JasperS
    May 20th, 2008 @ 14:01

    Lon: Actually, I manually turned off the “Composite” option because it makes OpenGL renderings flicker pretty bad. Compiz is still working, as is hardware acceleration and suspend/resume.

    Unfortunately I can’t tell which settings EnvyNG changed to make it work, since it’s all happening behind the screens. And it crashed pretty bad as well, breaking the graphics driver and the wifi. Retrying, EnvyNG crashed much later (I hope upon completion), and after manually setting the “Composite” option to “off” everything is working. Not a very elegant solution, but at least everything seems to be running now.

  25. Richard
    September 1st, 2008 @ 13:32

    Lon, thanks a lot.

    I have been wrestling with acpi-support variables since kernel 2.6.24-13 (-12 was just fine). I am using (don’t ask why….long story) currently an iMac 20″ Intel circa October 2007 which requires the ATI fglrx driver which is nice looking *but* a Linux support hassle. I had it working consistently with only the MODULES_WHITELIST=”fglrx” mod. Recently, wakeup fell apart somehow along the way to kernel 2.6.24-19.

    -Richard

  26. lpm
    December 10th, 2008 @ 15:43

    Thanks!:):):)

  27. KrisBelucci
    June 2nd, 2009 @ 08:50

    Hi, cool post. I have been wondering about this topic,so thanks for writing.

Leave a Reply