2002-02-09 11:55:11

by Felix Seeger

[permalink] [raw]
Subject: sonypi in 2.4.18-pre9

Great I just want to say that sonypi in 2.4.18-pre9 works fine.
I have a vaio pcg qr10. This is the first kernel Version in which I can
changing the background lite.

Just one Problem. Maybe a spicctrl Problem but if I try to get infos like:
spicctrl -p
BAT1: 2202/2479 88.83%

It works fine.

But sometimes (every 10 times) I get this:
BAT1: 2191/44975 4.87%

Or:

spicctrl -B
1

and than
spicctrl -B
100 (the right one)

As you can see I can get the battery status from spicctrl. But apm can't get
the status, is there a way to enable apmd to use sonypi, or work correct.
This is the output from /proc/apm:
1.16 1.2 0x03 0x01 0xff 0x80 -1% -1 ?

At this time there was no AC only battery
spicctrl -p shows this:
BAT1: 2120/2479 85.52%

Is there a way to help you to get this problem fixed (I mean debug infos or
something like this ;)

thanks

have fun
HAL


2002-02-09 18:20:15

by Stelian Pop

[permalink] [raw]
Subject: Re: sonypi in 2.4.18-pre9

On Sat, Feb 09, 2002 at 12:48:34PM +0100, Felix Seeger wrote:

> Great I just want to say that sonypi in 2.4.18-pre9 works fine.

Thanks.

> I have a vaio pcg qr10. This is the first kernel Version in which I can
> changing the background lite.

Strange, the screen brightness code wasn't modified in a while. What
was your latest kernel ?

> Just one Problem. Maybe a spicctrl Problem but if I try to get infos like:
> spicctrl -p
> BAT1: 2202/2479 88.83%
>
> It works fine.
>
> But sometimes (every 10 times) I get this:
> BAT1: 2191/44975 4.87%
[...]

Known problem, not sure if it's a timing io port access problem
or something else. This will be properly resolved in the 2.5
version of the sonypi driver, when the screen brightness / battery
status etc will be directly accessed through the ACPI layer.

> As you can see I can get the battery status from spicctrl. But apm can't get
> the status, is there a way to enable apmd to use sonypi, or work correct.
> This is the output from /proc/apm:
> 1.16 1.2 0x03 0x01 0xff 0x80 -1% -1 ?

APM is screwed on most sony (and other recent, not sony) laptops.
The only way to get this working is to use ACPI instead of APM
(but since ACPI support is not and will not be complete in the 2.4
kernels, you will not have sleep/hibernation support etc).

That's why I added the battery query functions to the sonypi driver,
to work around buggy apm bioses and incomplete ACPI kernel support.
You can then hack the application inquiring the power status to
execute spicctrl instead of reading from /proc/apm.

Stelian.
--
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com

2002-02-09 19:13:46

by Felix Seeger

[permalink] [raw]
Subject: Re: sonypi in 2.4.18-pre9

Am Samstag, 9. Februar 2002 19:19 schrieb Stelian Pop:
> On Sat, Feb 09, 2002 at 12:48:34PM +0100, Felix Seeger wrote:
> > Great I just want to say that sonypi in 2.4.18-pre9 works fine.
>
> Thanks.
>
> > I have a vaio pcg qr10. This is the first kernel Version in which I can
> > changing the background lite.
>
> Strange, the screen brightness code wasn't modified in a while. What
> was your latest kernel ?
2.4.17 ;)
There I had the problem that spicctrl always told me and error with ioctl or
so.
Maybe this error is gone because I have compilde the kernel with io Device
support.

2002-02-09 20:06:34

by Stelian Pop

[permalink] [raw]
Subject: Re: sonypi in 2.4.18-pre9

On Sat, Feb 09, 2002 at 08:07:12PM +0100, Felix Seeger wrote:

> Am Samstag, 9. Februar 2002 19:19 schrieb Stelian Pop:
> > On Sat, Feb 09, 2002 at 12:48:34PM +0100, Felix Seeger wrote:
> > > Great I just want to say that sonypi in 2.4.18-pre9 works fine.
> >
> > Thanks.
> >
> > > I have a vaio pcg qr10. This is the first kernel Version in which I can
> > > changing the background lite.
> >
> > Strange, the screen brightness code wasn't modified in a while. What
> > was your latest kernel ?

> 2.4.17 ;)

Strange, there weren't changes supposed to affect this in 2.4.18pre patches.
Well, at least it is not the other way around (you reporting something
broken...)

> There I had the problem that spicctrl always told me and error with ioctl or
> so.
> Maybe this error is gone because I have compilde the kernel with io Device
> support.

???

Stelian.
--
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com

2002-02-09 22:36:37

by Felix Seeger

[permalink] [raw]
Subject: Re: sonypi in 2.4.18-pre9

> > There I had the problem that spicctrl always told me and error with ioctl
> > or so.
> > Maybe this error is gone because I have compilde the kernel with io
> > Device support.
>
> ???

Maybe my english is bad ;)
With kernel 2.4.17, spicctrl -p shows an error message:
ioctl failed: Invalid argument


With kernel 2.4.18-pre9 it works fine, the only difference between the config
is that I have enabled IO Device Support.
I don't know what this is and maybe I don' need it.
I've only activated it because of the error message (ioctl failed)


have fun
HAL

2002-02-10 10:08:09

by Stelian Pop

[permalink] [raw]
Subject: Re: sonypi in 2.4.18-pre9

On Sat, Feb 09, 2002 at 11:30:06PM +0100, Felix Seeger wrote:

> With kernel 2.4.17, spicctrl -p shows an error message:
> ioctl failed: Invalid argument

That's normal. Power status was added only in 2.4.18-pre1.
In your original mail hovewer, you seemed to state that spicctrl -b/-B
failed on those kernels.

> With kernel 2.4.18-pre9 it works fine, the only difference between the config
> is that I have enabled IO Device Support.
> I don't know what this is and maybe I don' need it.
> I've only activated it because of the error message (ioctl failed)

My question marks were because I don't know either what IO Device Support
means nor where you did select that. Unless you mean Sony I/O Control
Device Support...

Stelian.
--
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com