# can't get back from suspend. radeon.

## gcb

thinkpad edge e425 AMD

tried all the acpi and power management guides i've found... still no lucky.

Machine works perfect as far as I can tell, besides video.

issuing `vbetool dpms "on"` does nothing.

`vbetool post` makes the backlight on the LCD get back on, but i then can only see console garbage. mostly no character, just cursors. if that makes any sense...

```
$ emerge --info

Portage 2.1.10.44 (default/linux/x86/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.1.10-gentoo-r1 i686)

=================================================================

System uname: Linux-3.1.10-gentoo-r1-i686-AMD_A4-3300M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.0.3

Timestamp of tree: Mon, 13 Feb 2012 19:15:01 +0000

app-shells/bash:          4.1_p9

dev-lang/python:          2.7.2-r3, 3.1.4-r3

dev-util/cmake:           2.8.6-r4

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      2.0.3

sys-apps/openrc:          0.9.8.4

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.11.1

sys-devel/binutils:       2.21.1-r1

sys-devel/gcc:            4.5.3-r1

sys-devel/gcc-config:     1.4.1-r1

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r1

sys-kernel/linux-headers: 3.1 (virtual/os-headers)

sys-libs/glibc:           2.13-r4

Repositories: gentoo

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.cs.uni.edu/ http://mirror.usu.edu/mirrors/gentoo/"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm gtk iconv ipv6 jpeg kde kipi lcms ldap libnotify lm_sensors mad mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pppd pulseaudio qt3support qt4 readline sdl semantic-desktop session spell ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 x86 xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

```
lspci -nn

00:00.0 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1705]

00:01.0 VGA compatible controller [0300]: ATI Technologies Inc Device [1002:9648]

00:01.1 Audio device [0403]: ATI Technologies Inc Device [1002:1714]

00:03.0 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:1708]

00:04.0 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:1709]

00:11.0 SATA controller [0106]: Advanced Micro Devices [AMD] Device [1022:7801]

00:12.0 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7807] (rev 11)

00:12.2 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7808] (rev 11)

00:13.0 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7807] (rev 11)

00:13.2 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7808] (rev 11)

00:14.0 SMBus [0c05]: Advanced Micro Devices [AMD] Device [1022:780b] (rev 13)

00:14.2 Audio device [0403]: Advanced Micro Devices [AMD] Device [1022:780d] (rev 01)

00:14.3 ISA bridge [0601]: Advanced Micro Devices [AMD] Device [1022:780e] (rev 11)

00:14.4 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:780f] (rev 40)

00:14.7 SD Host controller [0805]: Advanced Micro Devices [AMD] Device [1022:7806]

00:15.0 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:43a0]

00:15.1 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:43a1]

00:15.2 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:43a2]

00:15.3 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:43a3]

00:16.0 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7807] (rev 11)

00:16.2 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7808] (rev 11)

00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1700] (rev 43)

00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1701]

00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1702]

00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1703]

00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1704]

00:18.5 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1718]

00:18.6 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1716]

00:18.7 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1719]

01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Device [1002:6760]

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06)

05:00.0 Multimedia controller [0480]: Ricoh Co Ltd Device [1180:e823] (rev 04)

06:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8176] (rev 01)

```

```

# dmesg | grep -i -e radeon -e acpi

system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)

pnp 00:02: Plug and Play ACPI device, IDs PNP0200 (active)

pnp 00:03: Plug and Play ACPI device, IDs PNP0c04 (active)

pnp 00:04: Plug and Play ACPI device, IDs PNP0b00 (active)

system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)

system 00:06: Plug and Play ACPI device, IDs PNP0c01 (active)

pnp 00:07: Plug and Play ACPI device, IDs PNP0303 (active)

pnp 00:08: Plug and Play ACPI device, IDs LEN0023 PNP0f13 (active)

pnp: PnP ACPI: found 9 devices

ACPI: ACPI bus type pnp unregistered

ACPI: Deprecated procfs I/F for AC is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared

ACPI: AC Adapter [ADP1] (on-line)

ACPI: Lid Switch [LID0]

ACPI: Power Button [PWRB]

ACPI: Power Button [PWRF]

[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness

[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness

acpi device:05: registered as cooling_device0

ACPI: Video Device [VGA1] (multi-head: yes  rom: no  post: no)

acpi device:3f: registered as cooling_device1

ACPI: Video Device [VGA2] (multi-head: yes  rom: no  post: no)

ACPI: acpi_idle registered with cpuidle

ACPI: Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared

[drm] radeon defaulting to kernel modesetting.

[drm] radeon kernel modesetting enabled.

radeon 0000:00:01.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

radeon 0000:00:01.0: setting latency timer to 64

radeon 0000:00:01.0: VRAM: 512M 0x0000000000000000 - 0x000000001FFFFFFF (512M used)

radeon 0000:00:01.0: GTT: 512M 0x0000000020000000 - 0x000000003FFFFFFF

ACPI: Battery Slot [BAT0] (battery present)

[drm] radeon: 512M of VRAM memory ready

[drm] radeon: 512M of GTT memory ready.

radeon 0000:00:01.0: irq 46 for MSI/MSI-X

radeon 0000:00:01.0: radeon: using MSI.

[drm] radeon: irq initialized.

radeon 0000:00:01.0: WB enabled

[drm] radeon: ib pool ready.

[drm] Radeon Display Connectors

[drm] Radeon display connector VGA-1: No monitor connected or invalid EDID

[drm] Radeon display connector LVDS-1: No monitor connected or invalid EDID

[drm] Radeon display connector HDMI-A-1: No monitor connected or invalid EDID

[drm] radeon: power management initialized

fbcon: radeondrmfb (fb0) is primary device

fb0: radeondrmfb frame buffer device

[drm] Initialized radeon 2.11.0 20080528 for 0000:00:01.0 on minor 0

radeon 0000:01:00.0: enabling device (0000 -> 0003)

radeon 0000:01:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19

radeon 0000:01:00.0: setting latency timer to 64

radeon atpx: version is 1

radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)

radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF

[drm] radeon: 1024M of VRAM memory ready

[drm] radeon: 512M of GTT memory ready.

radeon 0000:01:00.0: irq 47 for MSI/MSI-X

radeon 0000:01:00.0: radeon: using MSI.

[drm] radeon: irq initialized.

radeon 0000:01:00.0: WB enabled

[drm] radeon: ib pool ready.

[drm] Radeon Display Connectors

[drm] radeon: power management initialized

fb1: radeondrmfb frame buffer device

[drm] Initialized radeon 2.11.0 20080528 for 0000:01:00.0 on minor 1

thinkpad_acpi: ThinkPad ACPI Extras v0.24

thinkpad_acpi: http://ibm-acpi.sf.net/

thinkpad_acpi: ThinkPad BIOS GBET01WW(1.01), EC unknown

thinkpad_acpi: Lenovo ThinkPad E425, model 1198CTO

thinkpad_acpi: detected a 8-level brightness capable ThinkPad

Registered led device: tpacpi::thinklight

thinkpad_acpi: Standard ACPI backlight interface available, not loading native one

thinkpad_acpi: Console audio control enabled, mode: monitor (read only)

input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input6

powernow-k8: Found 1 AMD A4-3300M APU with Radeon(tm) HD Graphics (2 cpu cores) (version 2.20.00)

```

anything else i'm forgetting?

kernel .config at http://pastebin.com/FY8SvTsu

what should i try next?

----------

## gcb

found this script

```
# /etc/acpi/ati-powermode.sh 

Lid Open

On AC

/bin/bash: --pplib-cmd=get version: command not found

No PPLIB

high power

/opt/bin/aticonfig: unrecognized option '--lsp'

/opt/bin/aticonfig: parsing the command-line failed.

/opt/bin/aticonfig: unrecognized option '--set-powerstate='

/opt/bin/aticonfig: parsing the command-line failed.

```

i'm almost sure aticonfig is there from when i was trying to install fglrx... i've long give up and stuck with galium.

i'm not even sure this is called in regular suspend... but if is, i may need a proper aticonfig?[/code]

----------

## gcb

some places suggest `init 3` to initiate suspend fom the console... init3 does absolutely nothing to me... doesn't even change any service state from the default.

scratch that... `pm-suspend` does the trick

----------

## gcb

after a resume i have that in dmesg

```

PM: resume of devices complete after 2806.006 msecs

Restarting tasks ... done.

video LNXVIDEO:01: Restoring backlight state

video LNXVIDEO:02: Restoring backlight state

```

----------

## gcb

no clue if relevant, but even though i have the discreet graphic card enabled in BIOS i see the integrated one as active (assuming all the switcheroo pieces are working... i did gave up in the middle of writting the scripts after i learned that it's worthless in real world scenarios for powersave since you have to restart X all the time)

# cat /sys/kernel/debug/vgaswitcheroo/switch

0:IGD:+:Pwr:0000:00:01.0

1:DIS: :Pwr:0000:01:00.0

----------

## gcb

apparently it get's back, but i don't get video. someone suggest i may get image with this device on the HDMI port... but i can't try that for now.

they are working on that on the kernel side, according to a red hat bug i forgot to save... i've just disabled every form of hibernation for now.

----------

