Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 17 Dec 2014, 15:59
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
instructions on compiling acpi_call.ko?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
glassparrot


Joined: 01 Jun 2008
Posts: 285
Location: Durango, Colorado - USA

PostPosted: Fri 06 May 2011, 03:41    Post_subject:  instructions on compiling acpi_call.ko?  

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.com/2010/07/using-acpicall-module-to-switch-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:

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
Back to top
View user's profile Send_private_message Visit_website YIM MSNM 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Fri 06 May 2011, 14:19    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
glassparrot


Joined: 01 Jun 2008
Posts: 285
Location: Durango, Colorado - USA

PostPosted: Fri 06 May 2011, 16:35    Post_subject:  

Thanks for you help, Pemasu!

Quote:
You need devx sfs and kernel source sfs for your puppy build.


I have both installed already.

Quote:
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?

Quote:
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
Back to top
View user's profile Send_private_message Visit_website YIM MSNM 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Fri 06 May 2011, 16:42    Post_subject:  

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_kernel/kernel_src_L4-2.6.33.2-patched.sfs

If my module is not succesful, then you need to compile the newer version.
acpi_call_module-001.pet
Description 
pet

 Download 
Filename  acpi_call_module-001.pet 
Filesize  1.98 KB 
Downloaded  229 Time(s) 
Back to top
View user's profile Send_private_message 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Fri 06 May 2011, 17:07    Post_subject:  

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.php?p=513245#513245
Back to top
View user's profile Send_private_message 
glassparrot


Joined: 01 Jun 2008
Posts: 285
Location: Durango, Colorado - USA

PostPosted: Fri 06 May 2011, 18:08    Post_subject:  

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:
echo "\OSGS 0x03" > /proc/acpi/call


When I type
Code:
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.
Back to top
View user's profile Send_private_message Visit_website YIM MSNM 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Sat 07 May 2011, 03:24    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
glassparrot


Joined: 01 Jun 2008
Posts: 285
Location: Durango, Colorado - USA

PostPosted: Sat 07 May 2011, 03:56    Post_subject:  

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.
Back to top
View user's profile Send_private_message Visit_website YIM MSNM 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Sat 07 May 2011, 08:17    Post_subject:  

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.
acpi_call_icepuppy008.tar.gz
Description 
gz

 Download 
Filename  acpi_call_icepuppy008.tar.gz 
Filesize  2.59 KB 
Downloaded  208 Time(s) 
Back to top
View user's profile Send_private_message 
glassparrot


Joined: 01 Jun 2008
Posts: 285
Location: Durango, Colorado - USA

PostPosted: Sat 07 May 2011, 16:22    Post_subject:  

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:
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."
Back to top
View user's profile Send_private_message Visit_website YIM MSNM 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Sat 07 May 2011, 16:44    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Sat 07 May 2011, 16:57    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
glassparrot


Joined: 01 Jun 2008
Posts: 285
Location: Durango, Colorado - USA

PostPosted: Sat 07 May 2011, 23:38    Post_subject:  

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:
 Location:                                                             │ 
  │     -> Device Drivers                                                   │ 
  │       -> Input device support                                           │ 
  │         -> Generic input layer (needed for keyboard, mouse, ...) (INPUT │ 
  │           -> Mice (INPUT_MOUSE [=y])                                    │ 
  │             -> PS/2 mouse (MOUSE_PS2 [=y]) 
Back to top
View user's profile Send_private_message Visit_website YIM MSNM 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Sun 08 May 2011, 01:44    Post_subject:  

It was included already.
Back to top
View user's profile Send_private_message 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Sun 08 May 2011, 13:23    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0935s ][ Queries: 12 (0.0039s) ][ GZIP on ]