what the heck? the new kernel update killed the lenovo script? does anyone knows specific information?
what the heck? the new kernel update killed the lenovo script? does anyone knows specific information?
On an unrelated note but important nonetheless: Suspend issue is solved!
See these links for details:
http://ubuntuforums.org/showthread.p...165087&page=74
https://help.ubuntu.com/community/As...end%20to%20RAM
https://bugs.launchpad.net/ubuntu/+s...20/comments/94
I'm testing the new switchroo functionnality which permits to switch between VGA cards under X11. The switch needs logoff/login at this time !
My source is this blog page for asus M51 : http://asusm51ta-with-linux.blogspot.com/.
To summarize, the switch seems to work but there is still a problem with 4810TZG : on discrete mode, the integrated card does not seem to be switch off as it should if the PC is on battery mode So 20w, it's half the time far away power source...
Also it's hot and noisy... I think its a BIOS problem as it does this job automatically when un/plug the power cord.
Btw you can avoid the reboot now !
But running on intel card, consumption is around 10w (with optimization) under Fedora 13 / 2.6.33 (1w more than my better score under ubuntu 10.04 / 2.6.32 ).
Switchroo adds a management interface thru sysfs. It's only on debug mode at this time.
Thru the script switch_cards.sh + desktop link, it's possible to swith cards or check status.Code:$ cat /sys/kernel/debug/vgaswitcheroo/switch 0:+:Pwr:0000:00:02.0 < integrated card 1: :Off:0000:01:00.0 < discrete card
Info from patch :
From: Dave Airlie <airlied@linux.ie>
Date: Mon, 1 Feb 2010 15:38:10 +1000
Subject: [PATCH] vga_switcheroo: initial implementation (v13)
Many new laptops now come with 2 gpus, one to be used for low power
modes and one for gaming/on-ac applications. These GPUs are typically
wired to the laptop panel and VGA ports via a multiplexer unit which
is controlled via ACPI methods.
4 combinations of systems typically exist - with 2 ACPI methods.
Intel/ATI - Lenovo W500/T500 - use ATPX ACPI method
ATI/ATI - some ASUS - use ATPX ACPI Method
Intel/Nvidia - - use _DSM ACPI method
Nvidia/Nvidia - - use _DSM ACPI method.
TODO:
This patch adds support for the ATPX method and initial bits
for the _DSM methods that need to written by someone with
access to the hardware.
Add a proper non-debugfs interface - need to get some proper
testing first.
v2: add power up/down support for both devices
on W500 puts i915/radeon into D3 and cuts power to radeon.
v3: redo probing methods, no DMI list, drm devices call to
register with switcheroo, it tries to find an ATPX method on
any device and once there is two devices + ATPX it inits the
switcher.
v4: ATPX msg handling using buffers - should work on more machines
v5: rearchitect after more mjg59 discussion - move ATPX handling to
radeon driver.
v6: add file headers + initial nouveau bits (to be filled out).
v7: merge delayed switcher code.
v8: avoid suspend/resume of gpu that is off
v9: rearchitect - mjg59 is always right. - move all ATPX code to
radeon, should allow simpler DSM also proper ATRM handling
v10: add ATRM support for radeon BIOS, add mutex to lock vgasr_priv
v11: fix bug in resuming Intel for 2nd time.
v12: start fixing up nvidia code blindly.
v13: blindly guess at finishing nvidia code
mount debugfs
/sys/kernel/debug/vgaswitcheroo/switch - should exist if ATPX detected
+ 2 cards.
DIS - immediate change to discrete
IGD - immediate change to IGD
DDIS - delayed change to discrete
DIGD - delayed change to IGD
ON - turn on not in use
OFF - turn off not in use
Tested on W500 (Intel/ATI) and T500 (Intel/ATI)
Signed-off-by: Dave Airlie <airlied@redhat.com>
I'm trying to install the lenovo module on my Acer 3820TG (Intel/Ati) but keep getting;
This is with a newly installed Lucid...what gives?Code:$ sudo modprobe lenovo_acpi FATAL: Error inserting lenovo_acpi (/lib/modules/2.6.32-22-generic/updates/dkms/lenovo_acpi.ko): Kernel does not have module support
I had the same problem with my new Acer TimelineX 3820TG.
In dmesg there was an error messageIf you take a look at the source code, this means that neither the _SB_.PCI0.OVGA.ATPX nor the _SB_.PCI0.OVGA.XTPX ACPI-whatever were found, likely because of the different hardware.lenovo_acpi: cannot get ACPI handle: AE_NOT_FOUND
On this page (http://linux-hybrid-graphics.blogspo...e-methods.html), I found some other ACPI paths and tried them out.
Using _SB.PCI0.P0P2.PEGP._OFF finally worked. Now I only got a warning in dmesg that some Method call only took 0 instead of the 2 given arguments, so I changed that to in the source code from jacktow's post:
The changes I did are:
Replace line 26:
withCode:status = acpi_get_handle(root_handle, "\\_SB_.PCI0.OVGA.ATPX", &handle);
and replace line 45Code:status = acpi_get_handle(root_handle, "\\_SB.PCI0.P0P2.PEGP._OFF", &handle);
withCode:atpx_arg.count = 2;
It works for me, no error message, no more hot air coming out of the right ventilation slot and about 10 watts less power consumption according to powertop.Code:atpx_arg.count = 0;
Important:
Do not put the lenovo_acpi into /etc/modules!
When I did this, the screen just turned black while booting,.
Instead I putinto /etc/rc.local (just before the "exit 0") and it works now.Code:modprobe lenovo_acpi
Last edited by fperwth; June 19th, 2010 at 09:59 AM.
This is the list of calls to turn on/off the switchable graphics card in Linux so far:
status = acpi_get_handle(root_handle, "\\_SB.PCI0.P0P1.VGA._OFF", &handle);
status = acpi_get_handle(root_handle, "\\_SB_.PCI0.OVGA.ATPX", &handle);
status = acpi_get_handle(root_handle, "\\_SB_.PCI0.OVGA.XTPX", &handle);
status = acpi_get_handle(root_handle, "\\_SB.PCI0.P0P2.PEGP._OFF", &handle);
status = acpi_get_handle(root_handle, "\\_SB.PCI0.MXR0.MXM0._OFF", &handle);
status = acpi_get_handle(root_handle, "\\_SB.PCI0.PEG1.GFX0._OFF", &handle);
status = acpi_get_handle(root_handle, "\\_SB.PCI0.PEG1.GFX0.DOFF",
&handle);
If you haven't tried the switchable graphics feature in Linux yet, have a look at your DSDT.dsl file. With a bit of luck, you may be able to identify one of the methods above.
Well I tried you version of the module, but I still have the original problem. The module seems to build fine, I copy the module,
and I run depmod. Still I get this error,Code:sudo cp lenovo_acpi.ko /lib/modules/2.6.32-22-generic/kernel/
I must be missing something obvious?Code:$ sudo modprobe lenovo_acpi FATAL: Error inserting lenovo_acpi (/lib/modules/2.6.32-22-generic/updates/dkms/lenovo_acpi.ko): Kernel does not have module support
Try to run "dmesg" or "dmesg | grep lenovo", most likely there will be an error message with more information about what went wrong.
It seems that in this case "Kernel does not have module support" just means that the modules init function (kill_ati()) returned something other than 0, because it ran into an error.
I get this error;
I double checked the files for your edits, and they where there.Code:$ dmesg | grep lenovo [ 17.264513] lenovo_acpi: cannot get ACPI handle: AE_NOT_FOUND
I did a make clean && make and copied it over again, ran depmod and tried to modprobe it again with the same error...I just don't get it, we should have the same handlers since we have the same hardware?!
Thanks for the help so far, hate being forced to use win only to get enough battery time!
Which 3820TG do you have? The one with the i3 CPU or the i5 version? They come with different ATi chipsets, as far as I know.
Mine (i5) has a ATI Radeon HD 5650 1024MB DDR3:
If you have another card, maybe you could try some of the other functions mentioned in avilella's post above, hopefully one of them works.Code:02:00.0 VGA compatible controller: ATI Technologies Inc Redwood [Radeon HD 5600 Series] (rev ff)
To be sure I don't have missed something in my original post, here is my complete source code: (I have renamed the module to timelinex_acpi)
Code:/* * timelinex_acpi.c * * Linux kernel module that disables the discrete graphics board for Acer * Aspire TimelineX 3820TG (Core i5). Other TimelineX laptops could work, but I don't know. * * Based on the original lenovo_acpi.c by Sylvain Joyeux <sylvain.joyeux@m4x.org>, 2009 */ #include <acpi/acpi.h> MODULE_LICENSE("GPL"); static acpi_handle root_handle; static int __init kill_ati(void) { int i; acpi_status status; // The device handle acpi_handle handle; // The package elements union acpi_object package_elements[3]; // The arguments to ATPX union acpi_object atpx_arg_elements[2]; struct acpi_object_list atpx_arg; // For the return value of ATPX struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; status = acpi_get_handle(root_handle, "\\_SB.PCI0.P0P2.PEGP._OFF", &handle); // status = acpi_get_handle(root_handle, "\\_SB_.PCI0.OVGA.ATPX", &handle); if (ACPI_FAILURE(status)) { status = acpi_get_handle(root_handle, "\\_SB_.PCI0.OVGA.XTPX", &handle); if (ACPI_FAILURE(status)) { printk("timelinex_acpi: cannot get ACPI handle: %s\n", acpi_format_exception(status)); return -ENOSYS; } printk("timelinex_acpi: in discrete graphics mode\n"); return 0; } for (i = 0; i < 3; ++i) { package_elements[i].type = ACPI_TYPE_INTEGER; package_elements[i].integer.value = 0; } atpx_arg.count = 0; // atpx_arg.count = 2; atpx_arg.pointer = &atpx_arg_elements[0]; atpx_arg_elements[0].type = ACPI_TYPE_INTEGER; atpx_arg_elements[0].integer.value = 2; atpx_arg_elements[1].type = ACPI_TYPE_PACKAGE; atpx_arg_elements[1].package.count = 3; atpx_arg_elements[1].package.elements = &package_elements[0]; status = acpi_evaluate_object(handle, NULL, &atpx_arg, &buffer); if (ACPI_FAILURE(status)) { printk("timelinex_acpi: ATPX method call failed: %s\n", acpi_format_exception(status)); return -ENOSYS; } kfree(buffer.pointer); printk("timelinex_acpi: disabled the discrete graphics card\n"); return 0; } static void dummy(void) { } module_init(kill_ati); module_exit(dummy);
Bookmarks