Skip to contentSkip to conversation

best acpi solution

DISCUSSION sjb 4 participants 15 messages May 21, 2003 – May 22, 2003 11 messages not in the archive ACPI

lore
Share & tools
lore

sjb

author
#0 lore raw

Hi all,

I have a Sony Vaio U1 that, until yesterday, was running a Linux distro with functional ACPI. Sadly, the kernel I was using was compiled by somebody else, so I have very little idea what he actually did to make it. Details ..

http://www.ottaky.com/vaiou1.php

I've just upgraded to SuSE 8.2 (kernel 2.4.20) and the ACPI is broken - it's "partially" installed. All the hardware works (AFAIK), but there's no power management information available through /proc/acpi.

So .. I'm wondering what the best (easiset) way to get ACPI working is.

Can I download the 2.4.20 kernel source, apply the 2.4.20 acpi patch from sourceforge and cross my fingers?

Or use the DSDT in intird patch?

If there's a walk through somewhere on the interweb for ACPI kernel compiling newbies, a pointer to it would be great ;-)

Many thanks

sjb

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

#1 lore raw

From: "sjb" <[email protected]>

Quoted 6 lines

I have a Sony Vaio U1 that, until yesterday, was running a Linux distro with functional ACPI. Sadly, the kernel I was using was compiled by somebody else, so I have very little idea what he actually did to make it. Details ..

Quoted 7 lines

http://www.ottaky.com/vaiou1.php

I've just upgraded to SuSE 8.2 (kernel 2.4.20) and the ACPI is broken - it's "partially" installed. All the hardware works (AFAIK), but there's no power management information available through /proc/acpi.

So .. I'm wondering what the best (easiset) way to get ACPI working is.

The _easiest_ would almost certainly be to continue using the kernel you already had...

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

#4 lore raw
In reply to sjb

From: "sjb" <[email protected]>

Quoted 3 lines
Quoted 1 line · Derek Broughton

The _easiest_ would almost certainly be to continue using the kernel you

already

Quoted 8 lines
Quoted 1 line

had...

*8-)

Fair point.

OK, the easiest way assuming that I want to build my own kernel from scratch.

It wasn't apparent that you needed/wanted to do that. Just because you're using an upgraded SUSE doesn't mean you have to use the same version of the kernel.

If you have to recompile, I'd apply the acpi patch to the current kernel source (NOT 2.4.20 - iirc, it's 2.4.21) and copy the config file that corresponds to your working kernel image (it's in the same directory as your kernel - usually in /boot/config*) to the .config file in the kernel source directory. Then compile...

The "DSDT in initrd" patch can't do anything for you - it's for fixing DSDTs, and yours apparently doesn't need fixing.

derek

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

author
#3 lore raw
In reply to a message not in the archive
Quoted 2 lines · Derek Broughton

The _easiest_ would almost certainly be to continue using the kernel you already had...

*8-)

Fair point.

OK, the easiest way assuming that I want to build my own kernel from scratch.

sjb

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

#8 lore raw
In reply to a message not in the archive
Quoted 6 lines · sjb
Quoted 3 lines · Derek Broughton

The _easiest_ would almost certainly be to continue using the kernel you already
had...

Quoted 7 lines

*8-)

Fair point.

OK, the easiest way assuming that I want to build my own kernel from scratch.

Go get latest ac tree, perhaps.

Signature · 11 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
#12 lore raw
In reply to a message not in the archive
Quoted 10 lines · sjb
Quoted 1 line · Ducrot Bruno

Go get latest ac tree, perhaps.

So .. apply the patches from here

http://www.kernel.org/pub/linux/kernel/people/alan/linux-2.5/2.5.69/

to the kernel source from here

I meant the latest 2.4 ac tree (not 2.5) because tt has recent acpi and cpufreq (for longrun) and therefore no need to apply 2 patches.

Signature · 11 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
author
#10 lore raw
In reply to a message not in the archive
Quoted 1 line · Ducrot Bruno

Go get latest ac tree, perhaps.

So .. apply the patches from here

http://www.kernel.org/pub/linux/kernel/people/alan/linux-2.5/2.5.69/

to the kernel source from here

http://www.kernel.org/pub/linux/kernel/v2.5/patch-2.5.69.bz2

Soory, I'm sure it's obvious to you guys - but I've never had ti build a kernel before. It's a learning process.

sjb

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

#16 lore raw
In reply to a message not in the archive
Quoted 6 lines · sjb
Quoted 3 lines · Ducrot Bruno

I meant the latest 2.4 ac tree (not 2.5) because tt has recent acpi and cpufreq (for longrun) and therefore no need to apply 2 patches.

Quoted 7 lines

Another dumb question .. where would I find that?

Is it a question of running these patahces

http://www.kernel.org/pub/linux/kernel/people/alan/linux-2.4/2.4.21/patch-2.4.21-rc2-ac2.gz

against the corresponding 2.4.21 kernel?

yes and no. 2.4.21 is not out AFAIK.

Grab (well, I prefer ftp):

ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.4/testing/patch-2.4.21-rc2.bz2 ftp://ftp.kernel.org/pub/linux/kernel/people/alan/linux-2.4/2.4.21/patch-2.4.21-rc2-ac2.bz2

Then, for example in your home directory:

tar xjvfp linux-2.4.20.tar.bz2
or tar xIvfp linux-2.4.20.tar.bz2 since the j vs I option is alas dependant of the distribution. You may want if that do not work to
bzip2 linux-2.4.20.tar.bz2 | tar xvfp -
instead.

Then you will have a newly linux-2.4.20 directory. First, move it so that it correspond to the wanted version:
cp linux-2.4.20 linux-2.4.21-rc2-ac2

then go to this directory, then do something like that (in order):
bzip2 /path/to/patch-2.4.21-rc2.bz2 | patch -p1
bzip2 /patth/to/patch-2.4.21-rc2-ac2.bz2 | patch -p1

(you may also want to
bzip2 /path/to/thispatch.diff.bz2 | patch -p1 2>&1 | tee ../patch.log if you want to check in the file ../patch.log if all is OK (but the patch-2.4.21-rc2.bz2 and the ac2 corresponding are always clean anyway).

Signature · 11 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
author
#6 lore raw
In reply to a message not in the archive
Quoted 1 line · Derek Broughton

It wasn't apparent that you needed/wanted to do that.

Sorry - it was unclear.

Quoted 4 lines

If you have to recompile, I'd apply the acpi patch to the current kernel source (NOT 2.4.20 - iirc, it's 2.4.21) and copy the config file that corresponds to your working kernel image (it's in the same directory as your kernel - usually in /boot/config*)

I've asked the guy who made the working to send me the config .. if he still has it.

Quoted 2 lines

The "DSDT in initrd" patch can't do anything for you - it's for fixing DSDTs, and yours apparently doesn't need fixing.

My DSDT does contain errors and, thanks to others on here, I should now have a fixed version - although, as I say, it was working previously so the faults are presumably minor or at least not major.

sjb

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

author
#14 lore raw
In reply to a message not in the archive
Quoted 3 lines · Ducrot Bruno

I meant the latest 2.4 ac tree (not 2.5) because tt has recent acpi and cpufreq (for longrun) and therefore no need to apply 2 patches.

Another dumb question .. where would I find that?

Is it a question of running these patahces

http://www.kernel.org/pub/linux/kernel/people/alan/linux-2.4/2.4.21/patch-2.4.21-rc2-ac2.gz

against the corresponding 2.4.21 kernel?

sjb

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

author
#18 lore raw
In reply to a message not in the archive
Quoted 3 lines · Ducrot Bruno

Then, for example in your home directory:

tar xjvfp linux-2.4.20.tar.bz2

Ok .. lovely. Thanks for the help.

Is there anything I need to make sure to select when I run xconfig? I presume I choose ACPI to be compiled statically?

Another dumb question: can I simply use the previous kernel where acpi was working? That is .. I have the actual kernel. Can I drop that into /boot, make a change to grub's conf file and use the old kernel?

sjb

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

#19 lore raw

From: "sjb" <[email protected]>

Quoted 10 lines
Quoted 3 lines · Ducrot Bruno

Then, for example in your home directory:

tar xjvfp linux-2.4.20.tar.bz2

Ok .. lovely. Thanks for the help.

Is there anything I need to make sure to select when I run xconfig? I presume I choose ACPI to be compiled statically?

Difficult to tell, which is why I suggested starting with the config file from your working kernel.

Quoted 3 lines

Another dumb question: can I simply use the previous kernel where acpi was working? That is .. I have the actual kernel. Can I drop that into /boot, make a change to grub's conf file and use the old kernel?

Well, that _is_ what I suggested in the first place ;-)

(btw, please don't reply to me _and_ the list. I'm obviously reading the list already...)

derek

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

#23 lore raw
In reply to a message not in the archive
Quoted 4 lines · sjb

My gcc version is

linux:/usr/src/linux # gcc -v
gcc version 3.3 20030226 (prerelease) (SuSE Linux)

This is your real problem. Try compiling with 2.95 if you can. Otherwise you could just leave out that driver -- I'm sure you don't have an ambassador ATM card.

Signature · 10 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
author
#21 lore raw
In reply to a message not in the archive

Thanks to everyone who helped out with my question from yestrday.

Following the suggestions, I'm trying to build a new kernel based on Alan Cox's patches to 2.4.21-rc2

Everything goes fine until I try to make the modules, when I get the attached error.

I know this isn't striclty an ACPI question, but I guess many of you have been down this route before so I thought I'd ask here in case somebody had seen this before.

My gcc version is

linux:/usr/src/linux # gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)

Any help gratefully received since I'm now almost there ;-)

sjb

make -C atm modules
make[2]: Entering directory `/usr/src/linux-2.4.21-rc2-ac2/drivers/atm'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-rc2-ac2/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.21-rc2-ac2/include/linux/modversions.h -g -nostdinc -iwithprefix include -DKBUILD_BASENAME=ambassador -c -o ambassador.o ambassador.c
cc1: warning: -malign-loops is obsolete, use -falign-loops
cc1: warning: -malign-jumps is obsolete, use -falign-jumps
cc1: warning: -malign-functions is obsolete, use -falign-functions
In file included from /usr/src/linux-2.4.21-rc2-ac2/include/linux/atmdev.h:212,
from ambassador.c:31:
/usr/src/linux-2.4.21-rc2-ac2/include/linux/skbuff.h: In function `__pskb_pull':
/usr/src/linux-2.4.21-rc2-ac2/include/linux/skbuff.h:855: warning: comparison between signed and unsigned
/usr/src/linux-2.4.21-rc2-ac2/include/linux/skbuff.h: In function `pskb_may_pull':
/usr/src/linux-2.4.21-rc2-ac2/include/linux/skbuff.h:871: warning: comparison between signed and unsigned
In file included from ambassador.c:31:
/usr/src/linux-2.4.21-rc2-ac2/include/linux/atmdev.h: In function `atm_may_send':
/usr/src/linux-2.4.21-rc2-ac2/include/linux/atmdev.h:450: warning: comparison between signed and unsigned
ambassador.c:301:21: pasting "." and "start" does not give a valid preprocessing token
ambassador.c:305:23: pasting "." and "regions" does not give a valid preprocessing token
ambassador.c:310:20: pasting "." and "data" does not give a valid preprocessing token
ambassador.c: At top level:
/usr/src/linux-2.4.21-rc2-ac2/include/linux/module.h:299: warning: `__module_kernel_version' defined but not used
/usr/src/linux-2.4.21-rc2-ac2/include/linux/module.h:302: warning: `__module_using_checksums' defined but not used
ambassador.c:2588: warning: `__module_license' defined but not used
make[2]: *** [ambassador.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.21-rc2-ac2/drivers/atm'
make[1]: *** [_modsubdir_atm] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.21-rc2-ac2/drivers'
make: *** [_mod_drivers] Error 2

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge

author
#25 lore raw
In reply to a message not in the archive
Quoted 4 lines · Matthew Wilcox
Quoted 2 lines · sjb

My gcc version is

Quoted 8 lines
Quoted 2 lines

linux:/usr/src/linux # gcc -v
gcc version 3.3 20030226 (prerelease) (SuSE Linux)

This is your real problem. Try compiling with 2.95 if you can. Otherwise you could just leave out that driver -- I'm sure you don't have an ambassador ATM card.

I just created a new config without ATM - after a quick google search i realised it was of no use to me anyway ;-)

Cheers,

sjb

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge