# Suspend freezes when using ATI fglrx

## sparc

Hi all,

I have a HP Envy 14 i7 which comes with an ATI Radeon HD 5650 (evergreen) and no embedded intel card (btw is it true that the embeddded card is actually there but there is no multiplexer to switch?).My problem is that whenever I try to suspend, the laptop freezes without powering-off. This behaviour is identical if I execute the suspend procedure in multiple ways; through KDE, from console with pm-suspend or hibernate-ram, although I have never tried it through a tty. I believe that this is caused by a few kernel option(s), although I have tried all gentoo-sources from 2.6.34 and upwards (including .36) as well as zen-sources. It is important to mention that everything works perfectly with the open-source driver [EDIT: as fas as suspend is concerned, since evergreen GPUs are not yet sufficiently supported].

For reference I am using the following packages:

```

x11-drivers/ati-drivers-10.9-r1

x11-base/xorg-server-1.7.7-r1

media-libs/mesa-7.8.2

kde-4.5.2

```

Below is the pm-suspend log, which shows that the freeze comes before the execution of any hooks:

```

Initial commandline parameters: --quirk-dpms-suspend

--quirk-dpms-on

--quirk-vbestate-restore

--quirk-vbemode-restore

--quirk-vga-mode3

--quirk-vbe-post

Blacklisting 01grub.

Blacklisting 55NetworkManager.

Blacklisting 90clock.

Fri Oct 22 12:44:49 CEST 2010: Running hooks for suspend.

Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:

Linux AE14DCT 2.6.36-gentoo #1 SMP PREEMPT Thu Oct 21 13:49:29 CEST 2010 i686 Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz GenuineIntel GNU/Linux

Module                  Size  Used by

bridge                 48107  0 

stp                      972  1 bridge

llc                     2395  2 bridge,stp

snd_seq_dummy            915  0 

snd_seq_oss            22078  0 

snd_seq_midi_event      3615  1 snd_seq_oss

snd_seq                35707  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device          3847  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_pcm_oss            31636  0 

acpi_cpufreq            5398  0 

mperf                    803  1 acpi_cpufreq

snd_hda_codec_idt      37008  1 

snd_hda_intel          16934  4 

snd_hda_codec          44218  2 snd_hda_codec_idt,snd_hda_intel

fglrx                2168186  926 

snd_hwdep               3974  1 snd_hda_codec

snd_pcm                49075  4 snd_pcm_oss,snd_hda_intel,snd_hda_codec

wl                   1929280  0 

btusb                   7593  2 

snd_timer              12860  2 snd_seq,snd_pcm

snd_page_alloc          4787  2 snd_hda_intel,snd_pcm

hp_accel               12116  0 

iTCO_wdt                8031  0 

iTCO_vendor_support     1249  1 iTCO_wdt

lis3lv02d               5748  1 hp_accel

             total       used       free     shared    buffers     cached

Mem:       4072800    3627524     445276          0     207224    1880176

-/+ buffers/cache:    1540124    2532676

Swap:      2104476          0    2104476

/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:

Blacklisting 01grub.

Blacklisting 55NetworkManager.

Blacklisting 90clock.

```

The point of the freeze is basically the reason why I can't pin-point what is wrong. I have read that previous versions of the driver (8.xx) had trouble suspending when SLUB was used. This is not true anymore as I have tried the only alternative. The same applies to all similar workarounds for the same problem with other versions of the driver that I found.

I have searched extensively but haven't been able to find a recent post matching my system. I really hope that support for evergreen cards will come quickly to the open-source driver...

Any help is more than welcome. It is a huge annoyance for me not to be able to use suspend as I'm constantly on the move.Last edited by sparc on Thu Oct 28, 2010 12:31 am; edited 2 times in total

----------

## Hu

Since you already determined that the open source driver works correctly, could you explain why you are still using the closed driver that fails?

----------

## sparc

Well, it was really bad phrasing on my part. What I meant was that suspend/resume works perfectly. I took for granted it's common knowledge that all evergreeen GPUs are not yet supported by the open-source driver(s). As a result it is impossible to play even a Xvid video in full screen. So, as I said in my conclusion, I really hope that support for evergreen processors is added to the open-source driver really soon! I hate being forced to use fglrx. But for now, I really need a working 2D environment with suspend/resume functionality...

----------

## sparc

bump!

----------

## kernelOfTruth

the following combination is working for me (with an 5850):

 *Quote:*   

> pm-suspend --quirk-dpms-on --quirk-s3-mode --quirk-vbe-post --quirk-vga-mode3

 

----------

## sparc

Unfortunately it lead to a freeze also.

On the bright side, the log is longer, which means that it was a step forward:

```

Initial commandline parameters: --quirk-dpms-on

--quirk-s3-mode

--quirk-vbe-post

--quirk-vga-mode3

Blacklisting 01grub.

Blacklisting 55NetworkManager.

Blacklisting 90clock.

Wed Oct 27 16:32:02 CEST 2010: Running hooks for suspend.

Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:

Linux AE14DCT 2.6.36-gentoo #1 SMP PREEMPT Thu Oct 21 13:49:29 CEST 2010 i686 Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz GenuineIntel GNU/Linux

Module                  Size  Used by

btusb                   7593  2 

bridge                 48107  0 

stp                      972  1 bridge

llc                     2395  2 bridge,stp

snd_seq_dummy            915  0 

snd_seq_oss            22078  0 

snd_seq_midi_event      3615  1 snd_seq_oss

snd_seq                35707  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device          3847  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_pcm_oss            31636  0 

acpi_cpufreq            5398  0 

mperf                    803  1 acpi_cpufreq

snd_hda_codec_idt      37008  1 

snd_hda_intel          16934  2 

snd_hda_codec          44218  2 snd_hda_codec_idt,snd_hda_intel

snd_hwdep               3974  1 snd_hda_codec                                                                        

snd_pcm                49075  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec                                              

wl                   1929280  0                                                                                      

fglrx                2168186  475                                                                                    

snd_timer              12860  2 snd_seq,snd_pcm                                                                      

hp_accel               12116  0                                                                                      

snd_page_alloc          4787  2 snd_hda_intel,snd_pcm                                                                

iTCO_wdt                8031  0                                                                                      

iTCO_vendor_support     1249  1 iTCO_wdt

lis3lv02d               5748  1 hp_accel

             total       used       free     shared    buffers     cached

Mem:       4072800    2856744    1216056          0     114000    1874392

-/+ buffers/cache:     868352    3204448

Swap:      2104476          0    2104476

/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:

Blacklisting 01grub.

Blacklisting 55NetworkManager.

Blacklisting 90clock.

/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/01grub suspend suspend:

/usr/lib/pm-utils/sleep.d/01grub suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend:

/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:

/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:

/usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:

/usr/lib/pm-utils/sleep.d/90clock suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/91wicd suspend suspend:

```

Comparing the two logs, first of all, there are different quirks being used. So it is either the introduction of quirk-s3-mode or the removal of quirk-vbestate-restore or quirk-vbemode-restore that caused this. I'll try them one by one to find out exactly which. If only I could avoid the actual freeze; is there any way to make test/simulation/emulation runs? Hard-rebooting all the time must be a killer to the machine.

Meanwhile, do you care to elaborate on your selection?

----------

## kernelOfTruth

 *sparc wrote:*   

> 
> 
> Meanwhile, do you care to elaborate on your selection?

 

sure,

several days / weeks of headbanging, researching on the topic, some experimenting, understanding how it works - and then having an epiphany

this is a box / desktop btw I'm talking about - no laptop/notebook

----------

## bandreabis

up?

----------

## lyallp

I seem to recall reading somewhere about modules requiring unload prior to suspend. It's been a while since I used ATI so I have not really paid attention to suspend problems with ATI.

I recently experienced similar problems with my new HP laptop with USB3 (xhci) failing to suspend unless it was a module (I had it compiled in).

Once I compiled xhci as a module and told the hibernate script to unload it prior to suspend, things worked.

I found the error in the /var/log/messages file, where the kernel complained that the USB3 failed to freeze.

```
Jan  2 19:27:39 pearcely2 kernel: [ 1075.078849] Suspending console(s) (use no_console_suspend to debug)

Jan  2 19:27:39 pearcely2 kernel: [ 1075.091565] sd 0:0:0:0: [sda] Synchronizing SCSI cache

Jan  2 19:27:40 pearcely2 kernel: [ 1075.091647] pm_op(): usb_dev_freeze+0x0/0x10 returns -2

Jan  2 19:27:40 pearcely2 kernel: [ 1075.091652] PM: Device usb3 failed to freeze async: error -2

```

This resulted in the hibernation simply re-starting, leaving me at my starting point.

See my forum post for more details, including configuration file contents, etc.

Hope this gives a little help.

----------

## tipp98

I know this is an old post, but just figured I'd share my solution. For me, suspend would kind of work once, but lock up during shutdown, or more precisely, when switching to a text console. Using pm-suspend --quirk-vbe-post fails to work around this, but adding this quirk in /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler fixed it for me.

```
        elif using_fglrx; then

            # fglrx may or may not have to change vts, reports one

            # way or the other welcome.

            remove_parameters $possible_video_quirks

            add_parameters --quirk-vbe-post
```

----------

