Bug 92500 - kmilo wreaks havoc on ibm thinkpad
Summary: kmilo wreaks havoc on ibm thinkpad
Status: RESOLVED FIXED
Alias: None
Product: kmilo
Classification: Miscellaneous
Component: Asus (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Chris Howells
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-01 00:50 UTC by Jan de Visser
Modified: 2005-02-24 18:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix (429 bytes, patch)
2004-11-29 04:53 UTC, Jan de Visser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan de Visser 2004-11-01 00:50:45 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.4 
OS:                Linux

I've updated yesterday (30 Oct) and now have a completely unworkable KDE. From the moment kwin starts (according to the splash screen), I get a constant barage of windows telling me that "something" (definitely not me) pressed the brightness buttons and has turned on the LCD display. 

I recognize the windows as having the same layout as the kmilo thinkpad button notifications, so it smells like thinkpad-related. I don't have kmilo running however.

Another interesting observation is that running kicker or kwin in  gnome session (using kwin --replace) seems to work.

I marked this as a crash since it is even more intrusive/annoying than an application crash.
Comment 1 Jan de Visser 2004-11-01 15:42:38 UTC
Just verified that it is in fact kmilo; when I said I didn't have it running I was wrong. I didn't have the thinkpad plugin running. When I stop kmilo using the service manager the windows go away.
Comment 2 Jonathan Riddell 2004-11-06 01:32:48 UTC
This is difficult to debug.

First can you confirm that the Thinkpad module is turned off (in KControl->Hardware->Thinkpad).

Having confirmed that we need to work out which module is causing the messages.  Would you be able to recompile kmilo but with kdDebug() statements added so you know which plugin is causing the problem?  (You will have to kill and restart kded from the command line to get the debug output showing.)
Comment 3 Jonathan Riddell 2004-11-29 02:47:02 UTC
Closing due to no reply, please reopen if you have more information (as specified above).
Comment 4 Jan de Visser 2004-11-29 04:47:26 UTC
Um yeah, forgot about that. Sorry.

Anyway, the culprit appears to be the asus plugin (and needless to say, I don't have an ASUS, but a thinkpad :)

The following kdDebug:

Index: kmilod.cpp
===================================================================
RCS file: /home/kde/kdeutils/kmilo/kmilod/kmilod.cpp,v
retrieving revision 1.13
diff -u -3 -p -b -r1.13 kmilod.cpp
--- kmilod.cpp  27 Mar 2004 17:56:09 -0000      1.13
+++ kmilod.cpp  29 Nov 2004 03:42:24 -0000
@@ -159,6 +159,7 @@ void KMiloD::doTimer() {
                         displayProgress(i18n("Volume"), m->progress());
                                break;
                        case KMilo::Monitor::Brightness:
+                   kdDebug() << "BRIGHTNESS SET BY " << m -> name() << endl;
                           displayProgress(i18n("Brightness"), m->progress());
                                break;
                        case KMilo::Monitor::Mute:


yields:

kded: KMilo loaded module Generic Keyboard Plugin
kded: KVaio: Failed to open /dev/sonypi: No such file or directory.
kded: KVaio: Cannot connect to driver.
kded: KVaio::loadConfiguration:
kded:        mReportUnknownEvents:      false
kded:        mReportPowerStatus:        false
kded: mShowPowerStatusOnBackButton:     true
kded: KVaio dtor: shutting down.
kded: loading asus kmilo plugin
kded: KMilo loaded module Asus Laptop Plugin
kded: Successfully loaded module 'kmilod'
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: BRIGHTNESS SET BY kmilo_asus
kded: Unloading module 'kmilod'
Comment 5 Jan de Visser 2004-11-29 04:53:46 UTC
Created attachment 8474 [details]
Fix

This fixes it. The reading from /proc/acpi/asus returns garbage when that
directory doesn't exist.
Comment 6 Jonathan Riddell 2004-11-29 14:06:54 UTC
Thanks for a great beastie report.
Comment 7 Chris Howells 2004-11-29 14:10:05 UTC
Thanks, I will take care of this since it is my bug :)
Comment 8 Jan de Visser 2004-11-29 14:18:38 UTC
On November 29, 2004 08:10 am, Chris Howells wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=92500
> howells kde org changed:
>
>            What    |Removed                     |Added
> ---------------------------------------------------------------------------
>- Component|Thinkpad                    |Asus
>
>
>
> ------- Additional Comments From howells kde org  2004-11-29 14:10 -------
> Thanks, I will take care of this since it is my bug :)

I was gonna cook a patch today that would unload the asus plugin 
if /proc/acpi/asus does not exist. You want that?

JdV!!

Comment 9 Chris Howells 2004-11-29 16:39:57 UTC
On Monday 29 November 2004 13:18, Jan de Visser wrote:
> I was gonna cook a patch today that would unload the asus plugin
> if /proc/acpi/asus does not exist. You want that?

If you want to that would be useful. Thought it should just be a matter of 
adding:

if (!QDir("/proc/acpi/asus").exists())
  return false;

to the init() function

Comment 10 Chris Howells 2004-11-29 16:54:49 UTC
Hi Jan,

On Monday 29 November 2004 15:39, Chris Howells wrote:
> If you want to that would be useful. Thought it should just be a matter of
> adding:
>
> if (!QDir("/proc/acpi/asus").exists())
>   return false;
>
> to the init() function

Errr. OK. So we already have that. 

Thanks for your patch, though I'm not completely convinced that it is the 
right solution. You apparently have the /proc/acpi/asus directory. This is 
_very_ strange. The only way that you can have this directory is if you have 
the asus_acpi module loaded.... which should not be the case on non Asus 
laptops.

Can you give me the output of lsmod | grep asus ?

Did you compile the kernel yourself? Maybe you compiled the module into the 
kernel by accident?

Thanks for your help.

Comment 11 Jan de Visser 2004-11-29 17:13:15 UTC
On November 29, 2004 10:54 am, Chris Howells wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=92500
>
>
>
>
> ------- Additional Comments From howells kde org  2004-11-29 16:54 -------
> Hi Jan,
>
> On Monday 29 November 2004 15:39, Chris Howells wrote:
> > If you want to that would be useful. Thought it should just be a matter
> > of adding:
> >
> > if (!QDir("/proc/acpi/asus").exists())
> >   return false;
> >
> > to the init() function
>
> Errr. OK. So we already have that.
>
> Thanks for your patch, though I'm not completely convinced that it is the
> right solution. You apparently have the /proc/acpi/asus directory. This is
> _very_ strange. The only way that you can have this directory is if you
> have the asus_acpi module loaded.... which should not be the case on non
> Asus laptops.
>
> Can you give me the output of lsmod | grep asus ?

Nothing.

>
> Did you compile the kernel yourself? Maybe you compiled the module into the
> kernel by accident?

Stock slackware 10 kernel

[jan@waterloo sep-2.1]$ uname -a
Linux waterloo 2.4.26 #8 Mon Jun 14 19:09:31 PDT 2004 i686 unknown unknown 
GNU/Linux

>
> Thanks for your help.

Welcome...

Comment 12 Chris Howells 2004-12-01 12:06:54 UTC
On Monday 29 November 2004 16:13, Jan de Visser wrote:
> > Can you give me the output of lsmod | grep asus ?
>
> Nothing.

Intersting... OK thank you for the followup.

>
> > Did you compile the kernel yourself? Maybe you compiled the module into
> > the kernel by accident?
>
> Stock slackware 10 kernel

Could you give me the output of 'ls /proc/acpi/asus'?

Thanks...

Comment 13 Jan de Visser 2004-12-01 15:27:29 UTC
On December 1, 2004 06:06 am, Chris Howells wrote:
> Could you give me the output of 'ls /proc/acpi/asus'?

[jan@waterloo ~]$ ls /proc/acpi/asus
[jan@waterloo ~]$

I guess acpi and asus support are compiled 'statically' (if that's the term; I 
mean not-as-a-module) into the kernel.

I would suggest implementing something similar to what I sent you, since there 
apparently there are systems out there that have the directory but nothing in 
it ;-)

JdV!!

Comment 14 Jan de Visser 2005-02-24 18:48:27 UTC
Fixed.