irda-utils requires restart after suspend

Bug #93317 reported by Stefano Rivera
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
irda-utils (Debian)
Fix Released
Unknown
irda-utils (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: irda-utils

After a suspend/resume, my IRDA doesn't work.

Irdadump shows no activity when in this broken state.

An "invoke-rc.d irda-utils restart" gets it working again.

My Acer Ferrari 4005WLMi uses the nsc_ircc module.

Tags: acer ferrari
Revision history for this message
In , Sebastian Henschel (shensche) wrote : Re: Bug#267820: irda-utils: no connection after snooze

hi..

* Bernhard Reiter <email address hidden> [2004-08-25 09:58 +0200]:
> Package: irda-utils
> Version: 0.9.16-6
> Severity: normal
>
> On an Apple Powerbook G3 400Mhz "Lombard"
> after wakeup from a snooze irda does not work anymore.
> irdadump does not give results.
>
> I have used a /etc/power/pwrctl-local before to
> sleep)
> /etc/init.d/irda stop
> ;;
> wakeup)
> /etc/init.d/irda start
> but now I need to try with /etc/init.d/irda-utils in there next.
> (But I wanted to make sure this bug is not forgotten so I file
> it right away.)

does that mean that it works when you exchange /etc/init.d/irda by
/etc/init.d/irda-utils? this is no bug of irda-utils, then.
which package uses /etc/power/pwrctl-local? i do not have it on my alu
PowerBook G4 where i use pbbuttonsd. did you include the restart
of irda-utils yourself or is it part of the package you are using?

thanks,
 sebastian
--
::: .O.
::: ..O
::: OOO
::: lynx -source http://www.kodeaffe.de/shensche.pub | gpg --import

Revision history for this message
In , Bernhard Reiter (bernhard-intevation) wrote :

on Wed, Aug 25, 2004 at 10:08:21AM +0200, Sebastian Henschel wrote:
> * Bernhard Reiter <email address hidden> [2004-08-25 09:58 +0200]:
> > Package: irda-utils
> > Version: 0.9.16-6
> > Severity: normal
> >
> > On an Apple Powerbook G3 400Mhz "Lombard"
> > after wakeup from a snooze irda does not work anymore.
> > irdadump does not give results.
> >
> > I have used a /etc/power/pwrctl-local before to
> > sleep)
> > /etc/init.d/irda stop
> > ;;
> > wakeup)
> > /etc/init.d/irda start
> > but now I need to try with /etc/init.d/irda-utils in there next.
> > (But I wanted to make sure this bug is not forgotten so I file
> > it right away.)
>
> does that mean that it works when you exchange /etc/init.d/irda by
> /etc/init.d/irda-utils?

I don't know yet.
There is a chance because this worked with 2.4.x kernels
and it needs testing.

> this is no bug of irda-utils, then.

I am not entirely sure, but some package has to be sure
that this works and irda-utils could add a script for starting stopping.

> which package uses /etc/power/pwrctl-local?
> i do not have it on my alu
> PowerBook G4 where i use pbbuttonsd.

pmud will use it, if it is present. It does not come with default
installation.

Check for /etc/power/pwrctl.

> did you include the restart
> of irda-utils yourself or is it part of the package you are using?

I did that myself for 2.4.x kernels.

Revision history for this message
In , Sebastian Henschel (shensche) wrote :

re..

* Bernhard Reiter <email address hidden> [2004-08-25 11:28 +0200]:
> on Wed, Aug 25, 2004 at 10:08:21AM +0200, Sebastian Henschel wrote:
> > * Bernhard Reiter <email address hidden> [2004-08-25 09:58 +0200]:
> > > Package: irda-utils
> > > Version: 0.9.16-6
> > > Severity: normal
> > >
> > > On an Apple Powerbook G3 400Mhz "Lombard"
> > > after wakeup from a snooze irda does not work anymore.
> > > irdadump does not give results.
> > >
> > > I have used a /etc/power/pwrctl-local before to
> > > sleep)
> > > /etc/init.d/irda stop
> > > ;;
> > > wakeup)
> > > /etc/init.d/irda start
> > > but now I need to try with /etc/init.d/irda-utils in there next.
> > > (But I wanted to make sure this bug is not forgotten so I file
> > > it right away.)
> >
> > does that mean that it works when you exchange /etc/init.d/irda by
> > /etc/init.d/irda-utils?
>
> I don't know yet.
> There is a chance because this worked with 2.4.x kernels
> and it needs testing.

then please go ahead and do that. :)

> > this is no bug of irda-utils, then.
>
> I am not entirely sure, but some package has to be sure
> that this works and irda-utils could add a script for starting stopping.

i agree that this would not be such a bad idea. this could be done for
pbbuttonsd, too.

> > which package uses /etc/power/pwrctl-local?
> > i do not have it on my alu
> > PowerBook G4 where i use pbbuttonsd.
>
> pmud will use it, if it is present. It does not come with default
> installation.

so you expect irda-utils to write stuff into a file where lots of other
modifications could have been made by other programs or the user?
i do not think that this could work reliably. iirc, pbbuttonsd has some
flexible "plugin" mechanism. is it possible that pmud will go there,
too?

> Check for /etc/power/pwrctl.
>
> > did you include the restart
> > of irda-utils yourself or is it part of the package you are using?
>
> I did that myself for 2.4.x kernels.

so this is a more of a "wishlist" bug, right?

bye,
 sebastian
--
::: .O.
::: ..O
::: OOO
::: lynx -source http://www.kodeaffe.de/shensche.pub | gpg --import

Revision history for this message
In , Bernhard Reiter (bernhard-intevation) wrote :

On Wed, Aug 25, 2004 at 11:48:16AM +0200, Sebastian Henschel wrote:
> * Bernhard Reiter <email address hidden> [2004-08-25 11:28 +0200]:
> > on Wed, Aug 25, 2004 at 10:08:21AM +0200, Sebastian Henschel wrote:

> > > does that mean that it works when you exchange /etc/init.d/irda by
> > > /etc/init.d/irda-utils?
> >
> > I don't know yet.
> > There is a chance because this worked with 2.4.x kernels
> > and it needs testing.
>
> then please go ahead and do that. :)

I hope to do it soon, but I cannot promise.

> > > which package uses /etc/power/pwrctl-local?
> > > i do not have it on my alu
> > > PowerBook G4 where i use pbbuttonsd.
> >
> > pmud will use it, if it is present. It does not come with default
> > installation.
>
> so you expect irda-utils to write stuff into a file where lots of other
> modifications could have been made by other programs or the user?

I don't know what the best solution is, I only could report
how I tried to solve it.

> i do not think that this could work reliably. iirc, pbbuttonsd has some
> flexible "plugin" mechanism. is it possible that pmud will go there,
> too?

I don't know.

> > Check for /etc/power/pwrctl.
> >
> > > did you include the restart
> > > of irda-utils yourself or is it part of the package you are using?
> >
> > I did that myself for 2.4.x kernels.
>
> so this is a more of a "wishlist" bug, right?

Well, it will it anyone with a lombard that ones to use irda after a sleep.
While this will not be all users in all situations, my understanding
is that irda should work in this conditions without further intervention.

It could be that
there is a better place to file that bug (like the irda driver).

 Bernhard

Revision history for this message
In , Sebastian Henschel (shensche) wrote :

hi again...

* Bernhard Reiter <email address hidden> [2004-08-25 16:23 +0200]:
> On Wed, Aug 25, 2004 at 11:48:16AM +0200, Sebastian Henschel wrote:
> > * Bernhard Reiter <email address hidden> [2004-08-25 11:28 +0200]:
> > > on Wed, Aug 25, 2004 at 10:08:21AM +0200, Sebastian Henschel wrote:
>
> > > > does that mean that it works when you exchange /etc/init.d/irda by
> > > > /etc/init.d/irda-utils?
> > >
> > > I don't know yet.
> > > There is a chance because this worked with 2.4.x kernels
> > > and it needs testing.
> >
> > then please go ahead and do that. :)
>
> I hope to do it soon, but I cannot promise.

ok.

> > > > which package uses /etc/power/pwrctl-local?
> > > > i do not have it on my alu
> > > > PowerBook G4 where i use pbbuttonsd.
> > >
> > > pmud will use it, if it is present. It does not come with default
> > > installation.
> >
> > so you expect irda-utils to write stuff into a file where lots of other
> > modifications could have been made by other programs or the user?
>
> I don't know what the best solution is, I only could report
> how I tried to solve it.
>
> > i do not think that this could work reliably. iirc, pbbuttonsd has some
> > flexible "plugin" mechanism. is it possible that pmud will go there,
> > too?
>
> I don't know.

well, we can think about it further when you have a functioning
workaround. :)

> > > Check for /etc/power/pwrctl.
> > >
> > > > did you include the restart
> > > > of irda-utils yourself or is it part of the package you are using?
> > >
> > > I did that myself for 2.4.x kernels.
> >
> > so this is a more of a "wishlist" bug, right?
>
> Well, it will it anyone with a lombard that ones to use irda after a sleep.
> While this will not be all users in all situations, my understanding
> is that irda should work in this conditions without further intervention.
>
> It could be that
> there is a better place to file that bug (like the irda driver).

yes, the driver should be fixed. although i believe that, if restarting
irda-utils works, perhaps irattach needs a fix, too. as far as i
know, irda-utils does not unload any kernel drivers, so restarting would
not affect the kernel directly. hmm, but it worked out for you in
kernel 2.4, right?

according to drivers/serial/pmac_zilog.c, Benjamin Herrenschmidt is the
author. you might contact him <email address hidden>.
you might also raise the issue on debian-powerpc or linuxppc-devel.

cheers,
 sebastian
--
::: .O.
::: ..O
::: OOO
::: lynx -source http://www.kodeaffe.de/shensche.pub | gpg --import

Revision history for this message
In , Bernhard Reiter (bernhard-intevation) wrote :

On Wed, Aug 25, 2004 at 04:40:19PM +0200, Sebastian Henschel wrote:
> * Bernhard Reiter <email address hidden> [2004-08-25 16:23 +0200]:
> > On Wed, Aug 25, 2004 at 11:48:16AM +0200, Sebastian Henschel wrote:
> > > * Bernhard Reiter <email address hidden> [2004-08-25 11:28 +0200]:
> > > > on Wed, Aug 25, 2004 at 10:08:21AM +0200, Sebastian Henschel wrote:
> >
> > > > > does that mean that it works when you exchange /etc/init.d/irda by
> > > > > /etc/init.d/irda-utils?

Test now confirm: Yes.
Starting and stopping irda-utils in pwrctl-local works.

> > > > > which package uses /etc/power/pwrctl-local?

> well, we can think about it further when you have a functioning
> workaround. :)

Okay, that is where we are now. ;)

> > It could be that
> > there is a better place to file that bug (like the irda driver).
>
> yes, the driver should be fixed. although i believe that, if restarting
> irda-utils works, perhaps irattach needs a fix, too. as far as i
> know, irda-utils does not unload any kernel drivers, so restarting would
> not affect the kernel directly. hmm, but it worked out for you in
> kernel 2.4, right?

I also had to stop and start irattach with 2.4.x kernels.
So it could be an irattach bug.

> according to drivers/serial/pmac_zilog.c, Benjamin Herrenschmidt is the
> author. you might contact him <email address hidden>.
> you might also raise the issue on debian-powerpc or linuxppc-devel.

Unfortunately I lack enough time to follow this up proberly,
so I would appreciate if you could forward that bug to upstream
(whoever upstream turns out to be).

 Bernhard

Revision history for this message
In , Jean Tourrilhes (jt-bougret) wrote : Re: probably bug in irattach 0.9.16?

Sebastian Henschel wrote :
>
> recently, a bug was reported against irda-utils for Debian when used in
> an IBook G3. please take a look at:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267820
>
> when the machine wakes up after suspend-to-ram, IrDA does not work
> anymore.

 Power management is an ever evolving and messy part of
Linux. Kernel 2.6.X is undergoing heavy reorganisation in that
respect. With all those ever changing APIs and PM code could explain
why it was working in 2.4.X and no longer work in 2.6.X.
 It has never been clear to me if PM should be handled in the
kernel or in user space or a combination. As far as I can see, a lot
of code has gone in the kernel, so I guess PM should be handled in the
kernel.
 Personally, I never spent any time worrying about it, there is
no much code to support PM in the IrDA stack, therefore I'm not
surprised if things don't work. Actually, Martin did add some PM
support to the irtty-sir driver in 2.6.X, so I guess it must have
worked for him.

> but as soon as /etc/init.d/irda-utils is restarted, it works.
> since the init-script does not unload any kernel-drivers, i assume that
> the restart of irattach makes it work again.

 When irattach is re-started, it will trigger a
re-initialisation of the driver and the IrDA stack. This is guaranteed
to make things work (except a few weird cases).

> it would be nice if the restart would be unnecessary.

 How do you expect irattach to "know" when to perform the
re-initialisation of the drivers ? User-space programs don't receive
any specific events on PM.
 On the other hand, the drivers "seem" to receive specific PM
event, so the driver could know that it need to re-initialise the
hardware.
 I believe the IrDA stack should not care about the PM, it
seems that it did not mind in 2.4.X, and I don't see why this would
change.

> what makes it a little bit more delicate is, that the kernel driver
> involved is none of the IrDA project, but pmac_zilog which is maintained
> by someone other (Benjamin Herrenschmidt) as it seems.
>
> does any one of you have an idea if the culprit is irattach or
> pmac_zilog?

 Depend on what is the proposed architecture for PM. If PM is
handled in the kernel, then I guess pmac_zilog need to do the magic.

> please do not ask me to do any testing, i cannot. the bug submitter asked
> me put the issue forward and the bug report in Debian shows his email
> adddress for further discussion with him.

 I know how to do maginc with Debian bug system ;-)
 Good luck...

 Jean

Revision history for this message
In , Bernhard Reiter (bernhard-intevation) wrote :

On Thu, Aug 26, 2004 at 10:08:11AM -0700, Jean Tourrilhes wrote:
> Sebastian Henschel wrote :
> >
> > recently, a bug was reported against irda-utils for Debian when used in
> > an IBook G3. please take a look at:
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267820
> >
> > when the machine wakes up after suspend-to-ram, IrDA does not work
> > anymore.
>
> Power management is an ever evolving and messy part of
> Linux. Kernel 2.6.X is undergoing heavy reorganisation in that
> respect. With all those ever changing APIs and PM code could explain
> why it was working in 2.4.X and no longer work in 2.6.X.

Maybe there was a missunderstanding, the problem was the same in 2.4.x
and 2.6.x:

I need to stop irattach before snooze and then restart after the wakeup.
If I keep it running after snooze and wakeup, even stoping and
restarting does not make it work again.

I was using pmud for apple powerbooks that calls a script
before snooze and after wakeup to stop start irattach which
helps with 2.4.x and 2.6.x.

> When irattach is re-started, it will trigger a
> re-initialisation of the driver and the IrDA stack. This is guaranteed
> to make things work (except a few weird cases).

As described above, something is different when a running irattach snoozes
as to when it is stopped before the snooze.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Binary package hint: irda-utils

After a suspend/resume, my IRDA doesn't work.

Irdadump shows no activity when in this broken state.

An "invoke-rc.d irda-utils restart" gets it working again.

My Acer Ferrari 4005WLMi uses the nsc_ircc module.

Changed in irda-utils:
status: Unknown → Unconfirmed
Revision history for this message
Andreas Moog (ampelbein) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Changed in irda-utils:
assignee: nobody → andreas-moog
status: New → Incomplete
Revision history for this message
Andreas Moog (ampelbein) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in irda-utils:
assignee: andreas-moog → nobody
status: Incomplete → Invalid
Revision history for this message
Stefano Rivera (stefanor) wrote :

Appears fixed in jaunty

Changed in irda-utils (Ubuntu):
status: Invalid → Fix Released
Changed in irda-utils (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.