| View previous topic :: View next topic |
| Author |
Message |
Master One l33t


Joined: 25 Aug 2003 Posts: 754 Location: Austria
|
Posted: Fri Jun 10, 2005 2:50 pm Post subject: Suspend/Hibernation & ATI fglrx WORKING, but KDE... |
|
|
I am so excited! It's the first time since April, that I played arround with suspend-to-RAM and suspend-to-disk again on my IBM ThinkPad T42p. At that time I was very frustrated, as it seemed I could not make it work using the ATI binary drivers (always crashed on resume).
But now I gave it a new go, and with the available information and vbetool (which is in portage now) I finally got it working properly, which means full function of suspend-to-RAM (seems to work even faster than with WinXP!), as well as susped-to-disc (with normal swsusp included in 2.6 kernel, so no patching with swsusp2 required!).
After performing some experiments, I am using now the following code in my /etc/apci/default.sh in combination with ibm_acpi (for supporting the IBM extra functions keys as well): | Code: | statedir=/var/state/s3/state
curcons=`fgconsole`
rmmod ehci_hcd uhci_hcd
vbetool vbestate save >$statedir/vbe
fuser /dev/tty$curcons 2>/dev/null|xargs ps -o $
cat /dev/vcsa >$statedir/vcsa
sync
echo 3 >/proc/acpi/sleep # 3 = suspend-to-RAM, 4 = suspend-to-disc
sync
vbetool post
vbetool vbestate restore <$statedir/vbe
cat $statedir/vcsa >/dev/vcsa
modprobe ehci_hcd && modprobe uhci_hcd
chvt $[curcons%6+1]
chvt $curcons |
I have set it up, to suspend-to-RAM when closing the lid or pressing Fn-F4 (it awakes automatically when the lid is opened again, so no additional keypress needed, which is very convenient), and suspend-to-disc when pressing the power-button or Fn-F12. That's absolutely fabulous!
There are only 2 problems remaining:
1. Suspend-to-disc is secured, because it asks for a fingerprint on resume (my T42p has the fingerprint-reader, which I had setup to be used OS-independent on boot instead of the power-on & disk-access-password). But there is no access-control on resume from suspend-to-ram, that's why I would like to use the password-request from the screensaver. I am using KDE 3.4.1 with the KDE screensaver (so no xscreensaver installed, I just using the KDE blank screen screensaver without password request for normal use). Is there a way, to use KDE screensaver with password-request just for the resume-operation (I don't want to fiddle arround, that I have to use the password during normal operation as well), so that it is called with password-mode before suspend, or is there any other solution similar to this?
2. In the KDE control-center -> Energy Control -> Notebook-Accu -> Energy Control a time can be set, to automatically suspend the machine when idle. I would like to use that function, but I can't use the embedded mechanism, I'll have to use the mentioned code above to get it back to work with the ATI binary driver. Anyone any idea, if that function of KDE can be setup in a script somewhere (unfortunately no custom script can be selected from that control center menu, but I think, the command for sending the machine to suspend is stored in a KDE script somewhere on my machine)? _________________ Las torturas mentales de la CIA |
|
| Back to top |
|
 |
ribx Apprentice

Joined: 20 Nov 2003 Posts: 198 Location: germany
|
Posted: Sat Jun 11, 2005 11:55 am Post subject: |
|
|
i tried to get swsusp 2 running with the fglrx drivers, but doesnt have any positive results so far. i guess i will try the kernel thing today.
have a look into /etc/hibernate/hibernate.conf: line line 118-121:
| Code: |
### lock (generally you only want one of the following options)
LockConsoleAs <user>
# LockXScreenSaver yes
# LockKDE yes
|
i want to lock all the consoles too. so im useing the LockConsoleAs thing. you need to emerge a program to use this. try hibernate --help.
btw: your script looks like your not useing the hibernate script:
| Code: | * sys-power/hibernate-script
Latest version available: 1.08
Latest version installed: 1.08
Size of downloaded files: 60 kB
Homepage: http://www.suspend2.net
Description: Hibernate script supporting multiple suspend methods
License: GPL-2 |
maybe you improve your script and use the hibernate-script. _________________ The adopt an unanswered post initiative |
|
| Back to top |
|
 |
redbyte n00b

Joined: 10 Feb 2005 Posts: 11
|
Posted: Sun Jun 12, 2005 9:33 am Post subject: configs? |
|
|
Hi there, i got a t42p too. In another thread http://forums.gentoo.org/viewtopic-t-347128-postdays-0-postorder-asc-highlight-t42p-start-25.html i post a DRM Problem, because my system wont compile the DRM modul. Can you say me what version of xorg,kernel and so on your are using? If its possible you may send me your kernel config?
Your solution is a dream Because i never got a working suspend with ati drivers...
Regards,
Steffen
Last edited by redbyte on Sun Jun 12, 2005 5:52 pm; edited 2 times in total |
|
| Back to top |
|
 |
Archangel1 Veteran


Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Sun Jun 12, 2005 9:47 am Post subject: |
|
|
Short answer to question 1:
or
| Code: | | dcop --all-users --all-sessions kdesktop KScreensaverIface lock |
I think.... I'm trying to translate from the hibernate lock script, which IMO is about a million times more complicated than it needs to be. First one works fine anyway.
As ribx said, the hibernate script may well be an easier way of doing the same thing. However it seems like you've pretty much got it working as you want, so it's probably easier just to stick the one extra command in there.
Now I've just got to get suspend-to-ram working on my machine...  _________________ What are you, stupid? |
|
| Back to top |
|
 |
kitano Apprentice


Joined: 19 Dec 2002 Posts: 228 Location: Munich, Germany, Europe, Earth
|
Posted: Mon Jun 13, 2005 8:20 am Post subject: |
|
|
hi master one,
i tried to get your solution working on my tp t42p. well, it does run, but only if i use
| Code: | | Option "no_DRI" "yes" |
so that 3d acceleration is disabled. it then suspends and wakes up pretty fine, but thats no help, since the radeon drivers do the same and give quite the same results in glxgears ...
maybe you are using some different config options, so it would be quite a charm if you could post your xorg.conf here =)
cheers,
kitano _________________ ->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar
only in case you were going to ask what it is... |
|
| Back to top |
|
 |
Master One l33t


Joined: 25 Aug 2003 Posts: 754 Location: Austria
|
Posted: Mon Jun 13, 2005 3:01 pm Post subject: |
|
|
@ribx
I don't use the hibernate-script, and I see no need for it, since I have it already running with my solution (just the mentioned code in /etc/acpi/default.sh). That's why I really would like to solve the lock screen issue in another way.
@redbyte
| Code: | gentoo-sources-2.6.11-r9
xorg-x11-6.8.2-r1
ati-drivers-8.12.10 |
The only relevant parts in the kernel setup are | Code: | <M> /dev/agpgart (AGP Support)
<M> Intel 440LX/BX/GX, I8xx and E7x05 chipset support
...
[ ] Support for frame buffer devices |
As I remember, it seems to be important, to build AGP support as modules, and have frame buffer support disabled.
@Archangel1
Neither "kdesktop_lock" nor "dcop --all-users --all-sessions kdesktop KScreensaverIface lock" work, when called from the /etc/acpi/default.sh script, which seems logical, since the script is not running in an X-session, so the kdesktop_lock command can't connect to X server, and the dcop command can't attach to DCOP server.
Is there a way, so send such a command from a script to a running X session?
Or is there anything else? How does the hibernate-script handle this issue?
The important point for this problem is, the necessary command will be run as root outside an X session (from the /etc/acpi/default.sh script, when the appropriate ACPI event is recognized).
@kitano
I am not using anything special in my xorg.conf. The ATI section is exactly as generated by the fglrxsetup. I think it all comes down to just a few points:
1. I have the following as kernel options in my grub.conf: | Code: | | vmalloc=256m acpi_sleep=s3_bios |
2. AGP support built as modules
3. Used fglrxsetup to generate xorg.conf, using the external AGP module (from kernel).
4. Used the mentioned code to send the machine to suspend/hibernation, all other things did not work (especial the vbetool and the vt switching are major parts).
So my requests still remain:
The problem how to lock the Xsession(s) from the /etc/acpi/default.sh script (run as root outside an Xsession),
and
where the suspend/hibernation stuff is hidden in the KDE code (so that I can modify it with the mention code, I really would like to have KDE handle the automatic suspend-to-RAM after a set idle-time). _________________ Las torturas mentales de la CIA |
|
| Back to top |
|
 |
Master One l33t


Joined: 25 Aug 2003 Posts: 754 Location: Austria
|
Posted: Mon Jun 13, 2005 3:37 pm Post subject: |
|
|
| Archangel1 wrote: | | Code: | | dcop --all-users --all-sessions kdesktop KScreensaverIface lock |
|
Now that's weird! Completely overseen before, but this command indeed should work fine when called as root outside an Xsession as well.
I just tested it as root on vt1, it worked. But for some reason, it does not seem to work, when called from /etc/acpi/default.sh
Any idea, what the reason for this strange behaviour could be? _________________ Las torturas mentales de la CIA |
|
| Back to top |
|
 |
ribx Apprentice

Joined: 20 Nov 2003 Posts: 198 Location: germany
|
Posted: Mon Jun 13, 2005 11:36 pm Post subject: |
|
|
i solved such problems through:
| Code: | | su robin -c "DISPLAY=:0 /usr/X11R6/bin/xmessage -timeout 12 -center -button HIBERNATE\\\!:0,abort:133 ${X_BAT0_MES}" |
i think you also need to load the extmod module in xorg.conf:
| Code: | SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection |
may kdesktop_lock works then through:
| Code: | | su <user_loged_in_to_x> -c "kdesktop_lock" |
btw: i still cant get suspend running with swsusp2. may i should change to swsusp provided by the kernel, but i have no experiences with that and i dont want to try it. maybe my way will be to get completly rid of the fglrx problem _________________ The adopt an unanswered post initiative |
|
| Back to top |
|
 |
kitano Apprentice


Joined: 19 Dec 2002 Posts: 228 Location: Munich, Germany, Europe, Earth
|
Posted: Tue Jun 14, 2005 9:26 am Post subject: |
|
|
ok, now maybe this ist it. you are using 8.12.10, but i tried to make it work with 8.14.13
well, i guess i'll try downgrading and post results again then.
c'ya
kitano _________________ ->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar
only in case you were going to ask what it is... |
|
| Back to top |
|
 |
stefandoesinger n00b

Joined: 07 Mar 2005 Posts: 23 Location: Österreich
|
Posted: Tue Jun 14, 2005 10:00 am Post subject: |
|
|
That's great!
Storing /dev/vcsa makes suspend with fglrx + dri working for me. I'll update my TM803 howto ASAP.
Thanks! |
|
| Back to top |
|
 |
Master One l33t


Joined: 25 Aug 2003 Posts: 754 Location: Austria
|
Posted: Tue Jun 14, 2005 6:59 pm Post subject: |
|
|
@ribx
Your first command for hibernation looks nice and of course works, but sending my machine to suspend/hibernate is no problem just with the mentioned code in /etc/acpi/default.sh
I don't think a timeout is needed, because usually you perform an action to process the code (in my case either lid-switch or Fn-F4/F12). It may be of interest, if using that code for autmatic suspend after idel-timeout (for which I am still looking for a solution in KDE -> Does really noone have any idea where the code for this auto-suspend is to be found in the KDE stuff?)
BTW I don't see a connection to the mentioned extmod section in xorg.conf.
I'll try your kdesktop_lock approach, also I would like to stick with the dcop approach for locking all users sessions.
@kitano
I don't think it has something to do with the ATI drivers version, I assume it should also work with the newer one (I am just using 8.12.10, because I only unmasked that specific version in my /etc/portage/package.keywords running a x86 "stable" system-> it was the actual version when I did the installation, and I don't want to upgrade all those testing stuff all the time).
@stefandoesinger
Yes, I also couldn't believe at first, that it was the exact order of those commands leading to the solution of that problem. _________________ Las torturas mentales de la CIA |
|
| Back to top |
|
 |
ribx Apprentice

Joined: 20 Nov 2003 Posts: 198 Location: germany
|
Posted: Wed Jun 22, 2005 12:29 pm Post subject: |
|
|
the extmod module is need that the another user than the current using the xserver can lock the screen/ send an xmessage. thats all. but i'm not sure about this. this should be a hint how to lock kde, but you already managed that as i see.
to your kde problem: for me its enough to switch of the monitor with the dpms stuff in xorg.conf:
| Code: | Section "ServerFlags"
Option "off time" "5"
EndSection |
the monitor is consuming about 50% of energie. for me its enough when it is turned of. my notebook in idle mode (switched off wlan and monitor) runs about 8 hours.
-ribx
p.s.: i dont like kde. i cant help _________________ The adopt an unanswered post initiative |
|
| Back to top |
|
 |
kitano Apprentice


Joined: 19 Dec 2002 Posts: 228 Location: Munich, Germany, Europe, Earth
|
Posted: Mon Jun 27, 2005 2:31 pm Post subject: |
|
|
i can do it, too!
@master one: the script for vbetool and suspending works fine, thanx a lot
i had a problem with the code, but now everything works smoothly, even with a dualhead configuration of the fglrx:
for me the following change had to be made to master one's script:
| Code: | statedir=/var/state/s3/state
curcons=`fgconsole`
rmmod ehci_hcd uhci_hcd
vbetool vbestate save >$statedir/vbe
fuser /dev/tty$curcons 2>/dev/null|xargs ps -o $
cat /dev/vcsa >$statedir/vcsa
chvt $[curcons%6+1]
sync
echo 3 >/proc/acpi/sleep # 3 = suspend-to-RAM, 4 = suspend-to-disc
sync
vbetool post
vbetool vbestate restore <$statedir/vbe
cat $statedir/vcsa >/dev/vcsa
modprobe ehci_hcd && modprobe uhci_hcd
chvt $curcons
|
the only difference is, that i had to switch to a console _before_ suspending:
| Code: | chvt $[curcons%6+1]
sync
echo 3 >/proc/acpi/sleep # 3 = suspend-to-RAM, 4 = suspend-to-disc
|
this is so leet, having the fglrx driver waking up again with full acpi support!
YESSS
this rocks!
kitano
BTW: anyone who has a serial wacom - on a USB2serial converter - which accepts input after a syspend cycle? can't work it out... _________________ ->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar
only in case you were going to ask what it is... |
|
| Back to top |
|
 |
Master One l33t


Joined: 25 Aug 2003 Posts: 754 Location: Austria
|
Posted: Fri Jul 08, 2005 6:26 am Post subject: |
|
|
I just upgraded to gentoo-sources-2.6.12-r4 with ati-drivers-8.14.13-r2 (= ati-drivers-8.14.13-r1 with the agpgart-patch for 2.6.12), and suspend / resume is still working just fine
So this way of doing it is indeed independent of the driver-version.
Still unsolved:
- Best way of implementing the all-screens/all-users lock on suspend-to-RAM (had no time to play arround with that matter)
- Autosuspend-implementation in KDE after defined idle-time (had no time to search for more info, which KDE files contain that part)
Any more clues, especially on the autosuspend part in KDE, are highly appreciated. _________________ Las torturas mentales de la CIA |
|
| Back to top |
|
 |
kitano Apprentice


Joined: 19 Dec 2002 Posts: 228 Location: Munich, Germany, Europe, Earth
|
Posted: Mon Jul 11, 2005 1:23 pm Post subject: |
|
|
confirmed.
using advice from Jimmy Jazz at http://forums.gentoo.org/viewtopic-t-353295-postdays-0-postorder-asc-highlight-agpgart+patch-start-25.html
i got it running, too.
i'm using suspend2-sources, but by now still 2.6.12-suspend2. there's a newer version, but i couldn't make it by now...
cheers,
kitano _________________ ->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar
only in case you were going to ask what it is... |
|
| Back to top |
|
 |
mxller n00b


Joined: 21 Feb 2003 Posts: 24 Location: Denmark
|
Posted: Thu Oct 27, 2005 6:54 am Post subject: |
|
|
I have a Thinkpad R52
This didn't work. First of all | Code: | | echo 3 >/proc/acpi/sleep | do not work anymore so I replaced it with | Code: | | echo -n mem > /sys/power/state |
then it would go to sleep when I pressed Fn+F4. But the screen is completely garbled when it wakes up (the Ati DRI problem), and everything is frozen.
Futhermore the scrip is in /etc/apci/default.sh: It goes to sleep on any ACPI event eg. if I plug in the power adapter! |
|
| Back to top |
|
 |
herrzattacke n00b

Joined: 26 Oct 2003 Posts: 49
|
Posted: Sat Oct 29, 2005 5:13 pm Post subject: |
|
|
did u put only the script in default.sh ???
---
Another question i'll get errors if i use:
fuser /dev/tty$curcons 2>/dev/null|xargs ps -o $
ERROR: Unknown user-defined format specifier "$".
am i missing something?
regards |
|
| Back to top |
|
 |
Phlogiston Veteran


Joined: 27 Jan 2004 Posts: 1925 Location: Europe, Swizerland
|
Posted: Mon Nov 14, 2005 11:38 am Post subject: |
|
|
Hi guys, I have here a T43, so I think its nearly the same as T42p. Could anyone (MasterOne please) sum up what to do to get that suspend working? There are a lot of different opts here and I can't figure out what I need.
Another question: Isn't that working with swsusp2?
Thanks in advance _________________ Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|