Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
laptop suspend and pcmcia card stays on
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
antrod
n00b
n00b


Joined: 08 May 2002
Posts: 3

PostPosted: Wed May 08, 2002 4:39 pm    Post subject: laptop suspend and pcmcia card stays on Reply with quote

I have the oddest problem when I put my Sony Z505RX Vaio to sleep. The computer suspends/resumes correctly, but my lucent Wavelan card stays on after the computer is suspended until I manually yank the card out of the socket. I wouldnt mind except for the fact that this is likely to drain the battery while the computer is suspended.

I used to have Debian on this laptop and this worked well. Does this have to do with apmd (which I don't have installed due to the emerge compile error) or is it some setting in the pcmcia confs?

I have apm compiled into my kernel which is why I think suspend/resume works.

Thanks,

Antonio
Back to top
View user's profile Send private message
smckown
n00b
n00b


Joined: 14 Jun 2002
Posts: 8

PostPosted: Tue Jul 09, 2002 12:04 am    Post subject: PCMCIA cards and suspend Reply with quote

Most distributions use apmd and have scripting in place to deal with suspend and resume events. Usually, upon receipt of a suspend event, a script is ran that issues 'cardctl suspend' to power down pcmcia cards. Other actions are also often taken to deal with sound, networking, X, and so on. Remember that built-in devices and not just PCMCIA may need to be massaged to properly handle suspend/resume cycles.

You may want to:

emerge apmd

Then you can add a script to /etc/apm/event.d to suspend and resume the pcmcia subsystem on APM suspend/resume events. You may want to grab scripts from another distribution to use as a starting point.
Back to top
View user's profile Send private message
TomorrowPlusX
Apprentice
Apprentice


Joined: 07 May 2002
Posts: 168
Location: Washington DC, USA

PostPosted: Mon Jul 15, 2002 8:29 pm    Post subject: Apmd suspend/resume scripts Reply with quote

Is there any command line call I could put into a script which would force X to "wake up" the video card?

When I suspend my thinkpad and close the lid, on restarting the machine wakes up, but the display is just noise and doesn't respond (it's not actually noice, it's a corrupted weird glimpse of whatever was in the video memory when I suspended the laptop)

I can usually get the machine to wake up the video card by forcing a graphics mode shift, usually by hitting ctrl-alt-f2 (or something) to get to the framebuffer console. Then I switch back to X and all's well.

But if there were a cleaner approach I'd love to hear it. Doing what I describe above feels... well, cheezy. It doesn't instiall me with confidnce. I'd rather have a wakeup script for apmd to run which would call something which would wake up X.

And ideas?
Back to top
View user's profile Send private message
smckown
n00b
n00b


Joined: 14 Jun 2002
Posts: 8

PostPosted: Tue Jul 16, 2002 2:44 pm    Post subject: Resuming X Reply with quote

You've got the classic symptom of graphics hardware that doesn't like to resume directly into a graphics mode. The conventional solution is to place the display into a text mode upon suspend, then after resume restore it to graphics mode.

X11 typically runs as virtual terminal (vt) 7. You can switch to a text console by pressing ctrl-alt-F1. You can return to X by pressing ctrl-alt-F7. The correct script will automate these steps, toggling to vt1 on suspend and returning to vt7 on resume.

Place the following code snippet into /etc/apm/event.d/X

--start of script--
#!/bin/bash
# APM event script for X11
#

case "$1" in
suspend|standby)
[ -n "`pidof X`" ] && chvt 1
;;
resume)
[ -n "`pidof X`" ] && chvt 7
;;
esac
exit 0
--end of script--

Don't forget to make the script executable:
chmod 755 X

You are then ready to try it out. If for some reason your screen goes haywire and you can't restore it, you can probably get it to restart by pressing ctrl-alt-delete.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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