instructions on compiling acpi_call.ko?

Using applications, configuring, problems
Message
Author
glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

instructions on compiling acpi_call.ko?

#1 Post by glassparrot »

I recently bought a new Asus Eeepc which comes with a hybrid system of graphics... using both an Nvidia daughterboard and integrated Intel 3150 graphics. Battery life can be doubled if you turn off the Nvidia card. There's a very quirky way this is done under Windows 7 and some brave souls are trying to copy the method for Linux.

http://linux-hybrid-graphics.blogspot.c ... onoff.html

I have noticed here and there on the Murga linux forums people mentioning that they have succesfully compiled acpi_call.ko but I certainly don't have the skills to do it from the sources provided:

https://github.com/mkottman/acpi_call

Does anyone know of a dot pet for this? Or can anyone give me insight into why make fails with this message:

Code: Select all

make -C /lib/modules/2.6.33.2/build M=/chriswork/mkottman-acpi_call-3a8b6f6 modules
make[1]: Entering directory `/lib/modules/2.6.33.2/build'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/lib/modules/2.6.33.2/build'
make: *** [default] Error 2

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#2 Post by pemasu »

You need devx sfs and kernel source sfs for your puppy build. Locate them, links should be found on this forum.Load them with bootmanager, reboot.
Then in that mkottman-acpi_call-d7ecf05 folder just in console #make
It builds the acpi_call.ko module. Place it /lib/modules/2.6.33.2/kernel/drivers/acpi/acpi_call.ko

Then run in console #depmod -a

You can make it to be loaded by using bootmanager > click here to add new module. Make it loadable from the list of modules.
You can also, after above load it straight #modprobe acpi_call

After that you use it as you planned to use. Place the test_off.sh file to the /root/Startup. You can launch it then in that folder #./test_off.sh so you can see if it disables your nvidia, you get works declaration on working row.

It helps if you tell your puppy version when asking kernel module building. You would get straight links to the needed sfs files.

glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

#3 Post by glassparrot »

Thanks for you help, Pemasu!
You need devx sfs and kernel source sfs for your puppy build.
I have both installed already.
that mkottman-acpi_call-d7ecf05 folder
That name shows that it isn't the same version as the one I downloaded. I'm using one that is labeled mkottman-acpi_call-3a8b6f6. This must be a newer version than the one you have. I still get the same error I showed you above. Perhaps you will want to look over the makefile and see if it is different than the one you installed with?
It helps if you tell your puppy version when asking kernel module building.
I'm doing this inside the latest version of Lucid Puppy - 5.2.5 - and the kernel version is 2.6.33.2

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#4 Post by pemasu »

I have module compiled in my old lucid build.
Test it. The pet just installs the module to the right place.
You need to continue from depmod -a stage from my previous post.

I think that you dont have the right kernel source loaded. There are several around. Working version is: http://www.smokey01.com/01micko/lupu_ke ... atched.sfs

If my module is not succesful, then you need to compile the newer version.
Attachments
acpi_call_module-001.pet
(1.98 KiB) Downloaded 340 times

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#5 Post by pemasu »

Here is also puppy build for newer laptops. It has that acpi_call module as pet also, version 008. There is link for that module as pet.
http://murga-linux.com/puppy/viewtopic. ... 245#513245

glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

#6 Post by glassparrot »

Thanks so much for that .pet, pemasu! It's a lifesaver. It definitely takes me halfway there. I can now turn off the Nvidia card from within Puppy and see my power consumption at idle drop from 21 watts to 13 watts. Sadly, I'm not yet able to use the function described here and here to set things up so that I boot properly next time around. Namely:

Code: Select all

echo "\OSGS 0x03" > /proc/acpi/call
When I type

Code: Select all

echo "\AMW0.DSTS 0x90013" > /proc/acpi/call
cat /proc/acpi/call
as suggested, I simply get the message that the function "failed."

But I can figure that out as I go along. Thanks for your help. Downloading the IcePup distro now.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#7 Post by pemasu »

If you use test_off.sh, why dont you just place that script to the Startup folden in /root. Edit the script by adding modprobe acpi_call after shebang so that the script executes all those shutting rows after module loading.

That way you dont have to do any your machine spesific hacking. That is the way I use it. I havent bothered to do any tweaking.

glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

#8 Post by glassparrot »

The thing is that I'm multibooting, and I'm trying to keep the Nvidia Ion card off as much as possible (If only Asus had just included a bios switch for this!). This is a challenge, because every time I reboot from XP, the Ion graphics get turned back on automatically. I've done a lot more research on this option today, as well as the Switcheroo option which is in the newer Linux kernels.

It's interesting... I've found that I could compile acpi_call.ko just fine under 2.6.30.5 (and that one worked with the "OSGS 0x03" command). However, I still couldn't compile it under 2.6.33.2. I got an error about a missing file that I saw had been in the kernel source earlier, but which was apparently later removed - "bounds.h"

I was able to strip down a version of Puppy today (taking out most of sysinit, and rebooting from rc.local) and use acpi_call.ko as a quick way to restore to Optimus mode... installing it on a partiton, and adding it to my multiboot setup.

However, I've now decided that my best bet is probably to just try to build a new kernel. Then I can turn each card on and off at will.

Just a sidenote: This project also gave me the excuse to give Ubuntu a test run today. I had never really given it a chance before. My first impressions in the past have been that it's like being in a prison... at first, I couldn't even easily find the terminal. However, wow... that is some smooth system! With Puppy, if I wanted to install something like Blender or Gimp, it would take me a day or two of research and trial and error with Make as I go off gathering dependencies from here and there across the internet. On Ubuntu, it takes seconds! However, I do miss the flexibility and fine control I have with my Puppy installations.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#9 Post by pemasu »

I have enabled the vgaswitcheroo in Ice Puppy kernels. But I dont know if all the other needed modules are found, because vgaswitcheroo relies on other kernel specs.
I would need feedback on that.
Okay, you want to shut nvidia at deeper level than in booting time in Puppy if I understood right. I didnt read your posted links, just figuring out.

There are several scripts for testing vgaswitcheroo in Ubuntu forums.

Acpi_call compiles just fine in 2.6.33.2 kernel. You just need right kernel sources, for sure do #make clean and #make prepare before starting.
If it does not work. Compile the kernel using the .config for that puppy version without installing the kernel compile modules so that stuff keeps in /usr/src/kernelversion. You will find the needed config file from woof build puppy in /etc/modules/
If you still cant compile the acpi_call, then I believe you.

Just compiled your acpi_call version in Ice Puppy-008. I post the module as compressed package here.
Attachments
acpi_call_icepuppy008.tar.gz
(2.59 KiB) Downloaded 311 times

glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

#10 Post by glassparrot »

In regards to vga_switcheroo: Well, I'm booted into your Icepup, now. I don't see the folder /sys/kernel/debug/vgaswitcheroo. Is there something I need to do, in order to enable this function?

According to some web documentation, I need to mount the debugfs using the command:

Code: Select all

mount -t debugfs none /sys/kernel/debug
However, I cannot create the debug mountpoint.

//////////////////////////////////////////////////////////


In regards to the asus_call.ko module:
pemasu wrote:or sure do #make clean and #make prepare before starting.
Pardon my naivety. I'm very new to compiling things on Linux. However, "make prepare" doesn't do anything. When I type that, it tells me "No rule to make target 'prepare'. Stop."

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#11 Post by pemasu »

Thank you of your observations. I havent bothered before to examine what working vgaswithceroo demands. In its own kernel row there wasnt mention of debugfs dependency, but I checked the aspect from net. Yes it relies on debugfs and that was not ticked in my kernel.
I am going to update anyway Ice Puppy to 009 version. I can compile kernel with that option. Do you have any other known dependencies which should be included. Otherwise I just enable debugfs in kernel.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#12 Post by pemasu »

Sorry, I wasnt spesific enough. In /usr/src/kernelversion execute those #make clean and #make prepare,not in that folder where you compile the acpi_call.ko.
That is the procedure to make sure that kernel sources are ready for kernel module driver compiling. I prepare my sources that way so that they instant ready for compiling.

glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

#13 Post by glassparrot »

pemasu wrote: Do you have any other known dependencies which should be included.
Well, one thing that is certainly needed for this 1015pn is the Elantech touch pad driver. It's included in the more recent kernels as MOUSE_PS2_ELANTECH, and in the kernel configuration it's here:

Code: Select all

 Location:                                                             │  
  │     -> Device Drivers                                                   │  
  │       -> Input device support                                           │  
  │         -> Generic input layer (needed for keyboard, mouse, ...) (INPUT │  
  │           -> Mice (INPUT_MOUSE [=y])                                    │  
  │             -> PS/2 mouse (MOUSE_PS2 [=y])  

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#14 Post by pemasu »

It was included already.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#15 Post by pemasu »

Ice Puppy-009 has been released. Hopefully vgaswitcheroo is now enabled.
Freememapplet is updated, some laptop scripts are also updated. send-to-backgrounds and rox-right-clicks has been checked and updated.
Vesafb has been included staticly, all the other frame buffer console video drivers has been removed. I have compiled them, so I can make pets if some graphics or situations needs them. I think that Barry does not include also none of them except vesafb.
Kernel is now lupe20.
Previous ndiswrapper, acpi_call, nvidia pets should work. Of course I need confirmation of that.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#16 Post by pemasu »

Sorry, still no go. Debugfs is ok now but vgaswitcheroo is not on the folder.
Now I found good explanation what should be included to the kernel:
http://en.gentoo-wiki.com/wiki/Vga_switcheroo

I will compile the new kernel, but before the new Ice Puppy will be build, it will take little longer. Been busy next week.

glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

#17 Post by glassparrot »

Yeah, I found the same thing when I compiled the kernel with the Switcheroo option enabled. I tried compiling both with the default kernel settings, and the standard Puppy kernel settings. Next step I'm going to try is to leave the Switcheroo off in the kernel settings, and instead patch it in with the original Switcheroo code.

Thanks for getting the touchpad working, btw... that's a wonderful boon. I'm sorry I didn't test it out before talking with you about it.
Last edited by glassparrot on Mon 09 May 2011, 02:42, edited 1 time in total.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#18 Post by pemasu »

I had some spare time today and I made new compile. Now there is vgaswithcheroo in /sys/kernel/debug. I tested that I was able to send commands.
My radeon does not like switching off without some boot time kernel parameters. Will search the info from net and start testing.
I will upload Ice Puppy-009rev2 tonight. Vga_switcheroo enabled kernel will be lupe21.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#19 Post by pemasu »

Download link: http://www.smokey01.com/pemasu/IcePuppy-009rev2/

Now I will take a break for next week, lol.

glassparrot
Posts: 286
Joined: Sun 01 Jun 2008, 16:07
Location: Durango, Colorado - USA
Contact:

#20 Post by glassparrot »

Well, switcheroo is still not showing up in the debug folder for me when I

Code: Select all

mount -t debugfs none /sys/kernel/debug
See you next week. I'm going to keep plugging away at this.

Post Reply