Bug 106708 - PCMCIA network does not start at system boot, nor at apm resume
Summary: PCMCIA network does not start at system boot, nor at apm resume
Status: VERIFIED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Network (show other bugs)
Version: Beta 2
Hardware: i686 All
: P5 - None : Normal
Target Milestone: ---
Assignee: Forgotten User ZhJd0F0L3x
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-23 13:24 UTC by Jason Kasper
Modified: 2007-06-05 11:20 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Kasper 2005-08-23 13:24:43 UTC
I have a PCMCIA wireless network card that works just fine if I manually eject 
and re-insert the card after my laptop has booted.  However, as summary says, 
unlike previous versions of SuSE (and other distributions that used pcmcia's 
cardmgr), this card and network devices are not automatically started at boot-
up.

In addition, if I do an apm suspend/resume, the card does not get stopped/
started again, which means that when I suspend, leave work, go home, and resume, 
I again have to manually eject and re-insert the card to get it to reconnect to 
the new AP and get an IP address.

Please tell me what else I can provide for help in debugging this.

Thank you!  =:)
Comment 1 Christian Zoz 2005-08-23 16:21:06 UTC
For the first problem: Since beta3 we have /etc/sysconfig/pcmcia again. There is
a variable PCMCIA_COLDPLUG_REINSERT=no. Set this to yes. I also have one card
that need that special treatment; all my other cards don't need that.
Please tell me if that helps.

For the second problem:
Check the configuration possibilities of your power management daemon and let
this deaemon call 'pccardctl eject/insert' at suspend/resume.
Comment 2 Jason Kasper 2005-08-23 17:10:19 UTC
Hi Christian,

Thanks for the quick attention! =:)

I will update to beta3 as soon as I have an installation source for it.  Am I 
correct in understanding you as saying that I can't get this fix until beta3 is 
released?  

Also, will there be a Yast2 section that allows this workaround to be 
configured?  Or is this going to rely on the user manually editting a config 
file by hand?  I sure hope it's the former, since the latter is not very best-
desktop-ish.  =:)

As to the second problem...  I use apm since acpi does not properly suspend and 
resume my laptop (IBM Thinkpad A31).  Is there a place in Yast2 that allows for 
services/subsystems/additional configuration to take place for when my laptop is 
suspended/resumed?  Or is this another thing that the user will have to figure 
out on his own and go to the command line for?

Thanks again for your help Christian!  =:)
Comment 3 Christian Zoz 2005-08-24 19:58:50 UTC
Yes, please wait for beta3.

You can change that variable in YaST Sysconfig Editor.

The suspend/resume issue is a configuration problem, not a bug. Would be nice,
to make it easy to configure such stuff, yes. We are working on things like that.
Comment 4 Jason Kasper 2005-08-26 12:54:04 UTC
Hi Christian,

Okay, I'm running beta3 and I tried setting PCMCIA_COLDPLUG_REINSERT=yes and it 
does seem to work.  But I noticed that I had also enabled NetworkManager and I 
think that that might have been causing conflicts with the regular networking 
stuff.  So I disabled networkmanager from starting up, re-set 
PCMCIA_COLDPLUG_REINSERT=no, and my laptop seems to start up correctly now with 
PCMCIA networking.

So, all in all, I don't know which of the variables it is that I've changed that 
have cause pcmcia networking to now work:

- I've switched from acpi to apm (acpi doesn't work on my thinkpad A31)

- I've upgraded from beta1 to beta3 (maybe something in the base system has been 
fixed since then?)

- I've turned on and off networkmanager

At any rate, thank you very much for your help.  I will mark this as FIXED.  =:)
Comment 5 Jason Kasper 2005-08-31 14:47:09 UTC
Blah.  Christian, I'm not sure if I should reopen this or not.  I guess I will 
since it's still not working.  My PCMCIA network card does correctly get started 
at boot time now with beta3, but it does not eject/insert on suspend/resume--
even after I have these set:

## Path:        System/Powermanagement/apmd/Suspend actions
## Description: Some actions that may be executed before suspend
## Type:        yesno
## Default:     no
# If PCMCIA is compiled with APM-Support, cards are normally suspended
# before your system suspends. If you don't have APM-Support in PCMCIA,
# you can let apmd do this job. The SuSE PCMCIA package does note have
# APM support, because it is not reliable. Set it here, if you need it.
APMD_PCMCIA_SUSPEND_ON_SUSPEND="yes"

## Path:        System/Powermanagement/apmd/Suspend actions
## Type:        yesno
## Default:     no
# PCMCIA cards can be more or less amenable to an APM suspend event.
# If you have a card that cannot be suspended properly (such as a SCSI
# card), then it should be "ejected" before entering suspend mode. The
# cards are not physically ejected; rather, the power is turned off to
# them via the "cardctl eject" command, and is reactivated upon resume.
APMD_PCMCIA_EJECT_ON_SUSPEND="yes"

I notice that the comment says "cardctl eject", while that command doesn't 
exist--it's now pccardctl.  Not sure if that makes a difference, nor can I see 
where this setting is actually looked for/used.

Also, you mentioned that this is a configuration problem.  Can you please tell 
me where I should manually add the pccardctl eject and pccardctl insert lines if 
I need to do it myself?  I would think that that is the purpose of the above 2 
configuration variables.

Thanks!!
Comment 6 Forgotten User ZhJd0F0L3x 2005-09-01 09:17:12 UTC
i'll take this one
Comment 7 Forgotten User ZhJd0F0L3x 2005-09-01 11:45:07 UTC
first question: is there a reason why you are using apmd instead of powersaved?
Comment 8 Jason Kasper 2005-09-01 13:14:06 UTC
Sorry--I mis-represented this.  I'm not using apmd.  powersaved is running.  
What I have had to do is add "acpi=off" to my kernel line.  My laptop (IBM 
Thinkpad A31) does not successfully suspend/resume with ACPI, unfortunately.

But you're right--I'm not using apmd, but rather the default powersaved.

Sorry about the confusion.  =:)
Comment 9 Forgotten User ZhJd0F0L3x 2005-09-01 14:25:52 UTC
ok. This is why the above settings do nothing for you.
Unfortunately there is not much you can do out of the box to fix this with
powersaved, other than pulling out the card and reinserting it after resume (i
would even pull it out before suspend and reinsert it after resume - some of the
pccard drivers are very old and buggy wrt suspend).

I will fix this after 10.0, so you get a "EJECT_PCMCIA" variable in
sysconfig/powersave/sleep or something like that, but it probably won't make it
into 10.0 :-(

If you really want to automate this, you can have a look at custom event scripts
as described in
http://forge.novell.com/modules/xfmod/cvs/cvsbrowse.php/powersave/powersave/docs/README.events?rev=HEAD&content-type=text/vnd.viewcvs-markup
and
http://forge.novell.com/modules/xfmod/cvs/cvsbrowse.php/powersave/powersave/docs/README.scripts?rev=HEAD&content-type=text/vnd.viewcvs-markup
and in the /usr/share/doc/packages/powersave/contrib directory and create a
script that ejects the card before suspend and another script that reinserts it
on resume, but this is clearly more work than just pulling out the card and
putting it back in ;-)
Comment 10 Forgotten User ZhJd0F0L3x 2005-09-02 20:02:43 UTC
i have added
SUSPEND2DISK_EJECT_PCMCIA=""
SUSPEND2RAM_EJECT_PCMCIA=""
STANDBY_EJECT_PCMCIA=""

for the next beta
Comment 11 Jason Kasper 2005-09-03 16:16:29 UTC
Excellent, thank you!  This will be in RC1 then?
Comment 12 Forgotten User ZhJd0F0L3x 2005-09-03 20:31:35 UTC
yes, but the default is "no", so you have to set it to "yes" manually in
/etc/sysconfig/powersave/sleep (if it was enabled by default, i would change
well-tested behaviour - and you were the only one reporting this problem, so i
do not want to break it for everybody else :-)
Comment 13 Jason Kasper 2005-09-24 02:46:35 UTC
Excellent.  I've just tried this with RC1 and confirmed that it does seem to 
work by using SUSPEND2RAM_EJECT_PCMCIA.  I've not tried suspending, switching 
AP's and then resuming (suspend, go home, resume), but here's to hoping that 
doesn't cause this to not work.  =:)

Thanks for your help Stefan!!  =:)  Very well done!  =:)