For more information, join the team subscribe to the mailing list 
at the bottom of the Launchpad page

    http://launchpad.net/~hybrid-graphics-linux 

Please join this team if you are new by clicking on the "Join 
Team" link at the right of the Launchpad page. It's important to 
have as many users in the community as possible to request for 
appropriate support.

Thursday 30 December 2010

Dell XPS L401x L501x L701x series with Nvidia Optimus

The Dell XPS L401x L501x L701x series is a refresh of the XPS line and comes with an Nvidia Optimus configuration.

A DSDT.dsl table from a Dell XPS L501x model was submitted here:

http://bugs.launchpad.net/bugs/312756

See the link below for a review:

Dell XPS L501x: An Excellent Mainstream Notebook - AnandTech :: Your Source for Hardware Analysis and News

Wednesday 22 December 2010

More NVIDIA Optimus models

Support for NVIDIA Optimus models in Linux is still far from perfect, although more and more laptop models come with this configuration.

There are now more than 300 Linux users who joined the hybrid-graphics-linux Launchpad Team, and new developments are being incorporated

to the mainline Linux kernel to improve support of this graphics configurations.

Here are two new models that have been recently announced:

Digital Storm's xm15

Equipped with a 2.4GHz Core i5-520M, 4GB of DDR3 RAM, a 320GB HDD and NVIDIA's GT 425M (1GB).

Acer Aspire 5742G with NVIDIA GeForce GT 540M

Acer Aspire 5742G laptop with NVIDIA GeForce GT 540M graphics reviewed, proven wunderbar

 

Tuesday 7 December 2010

drm-nvidia-switch developments by David Airlie @ www.phoronix.com

[Phoronix] Intel, NVIDIA Hybrid GPU Switching On Linux Nears

A month after making some small progress towards "hybrid graphics switching" on Linux to allow notebooks with dual GPUs (usually a low-power integrated graphics processor and a performance-oriented but high-powered discrete GPU), Red Hat's David Airlie is beginning to get things working for Intel and NVIDIA GPU combos on notebooks such as the Lenovo ThinkPad T410. Hybrid graphics on Linux still sucks, but at least it's getting better.

In a branch dubbed "drm-nvidia-switch" of David Airlie's Linux kernel DRM testing tree he has the kernel portion working for switching between the Intel IGP and the NVIDIA GPU with the open-source i915 and Nouveau DRM/KMS drivers, respectively. However, some bits are still missing and this will not work in all notebooks, but testing is just being done on the ThinkPad.

More details on this Linux GPU switching achievement can be found on David Airlie's blog.

Friday 26 November 2010

More ultrathin hybrid graphics laptops: Asus U31JG

Asus U31 13.3-inch ultrathin comes soon

The Asus U31 features some quite impressive specs for an ultrathin and we are looking at a 13.3-inch 1366x768 LED backlit screen, Intel's Core i3-370M/380M or Core i5-460M CPU, up to 4GB of DDR3 memory, up to 500GB of HDD space, 802.11bgn WiFi, and a 6-cell battery,

The Asus U31 will be available in two versions, the U31F and U31JG. The difference is the graphics card as the U31F features Intel's GMA 4500M while the U31JG will come with Nvidia's DirectX 11 ready, Geforce GT 415M with 1GB of memory. The U31JG will of course feautre Nvidia's Optimus technology for automatic GPU switching, something that we talked about for a couple of times.

As noted, the new U31 should appear in Europe by the end of December with a retail/e-tail price starting at €799.

You can find more here.

asus_u31_1

Tuesday 2 November 2010

Hybrid graphics nvidia drivers for Asus U43JC

One of the ASUS U/UL series Linux users has found a way to enable the nvidia drivers by blacklisting the intel chip:

[ubuntu] ASUS N61Jv / N71Jv / N82Jv / UL50Vf anyone? - Page 3 - Ubuntu Forums

 


There's a workaround for some people. I have the u43jc and you can use the 320m by installing the nvidia drivers, blacklisting the intel chip and rebooting. If you don't disable the intel chip, you'll get stuck on the Checking battery state...

Only problem is that the 310 is the only one running and the battery gets slurped up pretty quick.

If it doesn't work, you can boot in safe graphics and reset everything.

I guess we'll just have to watch closely for updated nv drivers

 

Friday 29 October 2010

Asus EEEPC 1215N hybrid graphics -- modified acpi_call with returning acpi_object results

Reposting a report by peberlein in the launchpad hybrid-graphics-linux mailing list about the Asus EEEPC 1215N hybrid graphics. Instructions:

git clone http://github.com/peberlein/acpi_call.git
cd acpi_call
make
sudo insmod acpi_call.ko
./asus1215n.sh

[Hybrid-graphics-linux] Asus 1215N success

I successfully powered down the Nvidia device in my Asus 1215N.  I modified the apci_call module and created a script to power it off and on.  Here is the github fork:

http://github.com/peberlein/acpi_call

I owe a huge thanks to Mkottman for acpi_call and George Shearer for m11xr2hack.  Those sources were excellent for learning about acpi and buffers.

I modified the acpi_call module to allow byte buffers to be passed as parameters, and also to return the acpi_object result in /proc/acpi/call.  Being able to see the result helped me figure out some of the state in the acpi methods.

The 1215N is similar to the m11x r2 in that it requires a special method (_DSM) being called with buffer arguments before the _PS3 method will turn the power off.   I also found that the _PS0 method turns the power back on.  After turning off the power, the power state appears to be set in the _PSC object: 0x0 when on, and 0x3 when off.  Except this isn't accurate after the system has been put in standby - the power is on (according to the battery rate) but the_PSC is still 0x3.  I have to use the script to turn the power off again after coming out of standby.

Tuesday 26 October 2010

Linux hybrid graphics working on Sony vaio VPCZ13 models

One of the sony-vaio-z-series launchpad team members has reported the way to successfully switch on/off the nvidia card in VPCZ13 models:

Re: [Sony-vaio-z-series] Ubuntu on VPCZ13*

 

- Installed sony-laptop-zseries-0.9np7
- Grub load options: "i8042.reset i8042.nomux i8042.nopnp i8042.noloop acpi_osi=\"!Windows 2006\" acpi_backlight=vendor"

 

Saturday 23 October 2010

Asus EEEPC 1015PN laptop hybrid graphics linux

One of the hybrid-graphics-linux team member has posted an email to the mailing list with details about the Asus EEPC 1015PN laptop in Linux:

[Hybrid-graphics-linux] EEEPC 1015PN Optimus with ION

The nVidia ION (GT238) is always activated on gnu/linux, and works with nouveau or the nvidia drivers. The Asus EEEPC 1015PN has an atom N550 CPU which includes a with a GMA 3150. One can use the nvidia ION on windows, or switch the netbook into the optimus mode, which enables the GMA 3150 to work in parallel with the ION (used only when necessary in this mode). It requires a reboot.

The Intel GMA is not activated at all under linux, and the only way to switch it on, is to reboot on Windows, and switch the optimus ON.
One can then find the PCI adresses for both GPU devices:
  • ION -- PCI 0000:04:00:0
  • Intel GMA -- PCI 0000:00:02:0
By tweaking the xorg.conf file, one can start X on the Intel GMA, but the ION is still activated.

The modified acpi_call method for the Asus EEEPC 1215PN, doesn't work on this model to switch off the nvidia ION card.

Tuesday 12 October 2010

VGA switcheroo and acpi_call -- status so far

Some months ago, David Airlie wrote VGA switcheroo as a system to enable hybrid graphics hot switching via logout/login from a X session.

David initially implemented this on an ATI hybrid laptop, but immediately after the first implementation, with Matthew Garrett's help, he also committed some code to enable it on nvidia hybrid configurations. This wasn't thoroughly tested at the time due to the lack of hardware, but different users in the hybrid-graphics-linux launchpad team have reported their success stories with VGA switcheroo.

Compared to VGA switcheroo, acpi_call is a module to test what ACPI method is available to switch on/off the discrete graphics card. Many nvidia laptop configurations have different ACPI methods, so in order to switch on/off the nvidia card, one needs to call the right method for the laptop.

It is in theory possible to put together the work done on acpi_call and VGA switcheroo, so that most of the laptop configurations would have the hot switching feature via logout/login in Linux. There is a bit of work to be done in code integration, hopefully someone will pick this up and work on it, since there are now more than 200 users who would benefit from it.

For more information:

http://asusm51ta-with-linux.blogspot.com/

http://airlied.livejournal.com/71434.html

 

 

Monday 11 October 2010

Nouveau testing for the memory timing management code @ www.phoronix.com

[Phoronix] Nouveau Needs Help With Timing Management

For those owners of NVIDIA graphics hardware that are already using -- or interested in using -- the open-source Nouveau driver that is developed by the community as an alternative to NVIDIA's proprietary driver, the developers could use some help. Martin Peres has issued a testing request for people to try out new code for the Nouveau driver that deals with memory timing management.

Martin and two other developers have been working on adding memory timings support to Nouveau so that they can be tightened and loosened accordingly when manipulating the memory clock. It was just recently that the Nouveau driver began to reach a state of having working power management. The Nouveau developers have written up some code, but the video BIOS table that stores these vRAM timings contains a lot of "magic" (or still some uncertainty from their clean-room reverse-engineering), so they would like some help in the form of BIOS and register dumps across more NVIDIA GPUs.

For those interested in helping out this open-source project working towards a fully open-source NVIDIA 2D/3D driver, see this mailing list message and there is a GitHub Wiki page. An NV40 class GPU or newer is needed and the Wiki page covers how to produce a NVIDIA BIOS dump and peeking the graphics card's strap and selected timings.

Howto Linux hybrid graphics on Asus Eee 1215N

One of the hybrid-graphics Launchpad team members has reported about the use of a modified version of acpi_call to swich on/off the nvidia optimus card on the Asus Eee 1215N models:

[Hybrid-graphics-linux] Asus 1215N success

I successfully powered down the Nvidia device in my Asus 1215N.  I modified the apci_call module and created a script to power it off and on.  Here is the github fork:

http://github.com/peberlein/acpi_call


I owe a huge thanks to Mkottman for acpi_call and George Shearer for m11xr2hack.  Those sources were excellent for learning about acpi and buffers.

I modified the acpi_call module to allow byte buffers to be passed as parameters, and also to return the acpi_object result in /proc/acpi/call.  Being able to see the result helped me figure out some of the state in the acpi methods.


The 1215N is similar to the m11x r2 in that it requires a special method (_DSM) being called with buffer arguments before the _PS3 method will turn the power off.   I also found that the _PS0 method turns the power back on.  After turning off the power, the power state appears to be set in the _PSC object: 0x0 when on, and 0x3 when off.  Except this isn't accurate after the system has been put in standby - the power is on (according to the battery rate) but the_PSC is still 0x3.  I have to use the script to turn the power off again after coming out of standby.

Tuesday 5 October 2010

HOWTO Allienware M11x r2 nvidia optimus hybrid graphics Linux

[This is an old post, check the launchpad website for acpi_call and bumblebee]
https://launchpad.net/~hybrid-graphics-linux

One of the hybrid-graphics team members has posted the detailed instructions on how to switch on/off the discrete nvidia graphics card on the optimus (r2) models for the Alienware M11x laptop:

http://forums.fedoraforum.org/showpost.php?p=1402584&postcount=45

This works with a modified module that calls ACPI methods with the right parameters to switch on/off the graphics card. The code is here:
m11xr2hack-dot-c.txt
http://forums.fedoraforum.org/attachment.php?attachmentid=20129&d=1285685272
Makefile.txt
http://forums.fedoraforum.org/attachment.php?attachmentid=20130&d=1285685283

Monday 27 September 2010

More on CUDA and OpenCL comparisons

[1005.2581] A Performance Comparison of CUDA and OpenCL
CUDA and OpenCL offer two different interfaces for programming GPUs. OpenCL is an open standard that can be used to program CPUs, GPUs, and other devices from different vendors, while CUDA is specific to NVIDIA GPUs. Although OpenCL promises a portable language for GPU programming, its generality may entail a performance penalty. In this paper, we compare the performance of CUDA and OpenCL using complex, near-identical kernels. We show that when using NVIDIA compiler tools, converting a CUDA kernel to an OpenCL kernel involves minimal modifications. Making such a kernel compile with ATI's build tools involves more modifications. Our performance tests measure and compare data transfer times to and from the GPU, kernel execution times, and end-to-end application execution times for both CUDA and OpenCL.

Friday 24 September 2010

More on CUDA

CUDA support in OpenCV announced at GTC - The H Open Source: News and Features





At the GPU Technology Conference in San Jose, NVIDIA announced that the Open Source Computer Vision
(OpenCV) library, which includes image processing algorithms, will,
from the start of next year, be able to utilise the computing power of
NVIDIA GPUs by making use of CUDA GPU acceleration.

The OpenCV source code repository already contains some initial GPGPU
functionality, but a full initial release of the CUDA support is
scheduled to arrive in Spring 2011. According to Gary Bradski, senior
researcher at Willow Garage, which is involved in maintaining the
library, many OpenCV algorithms run five to ten times faster with GPU
assistance. OpenCV contains more than 500 algorithms for functions such
as image processing, face and body recognition and real time recording
and is available, free-of-charge, under the BSD licence.

Thursday 23 September 2010

More on hybrid-graphics for Asus U43JC

Ran kernel 2.6.28 with dsdt from initramfs support:
Modified the _SP3 method I attached above, and removed the first condition (line 15029), and its corresponding closing bracket.

If (LEqual (P3MO, 0x01)) {
}

After removing the lines, ran

echo '\_SB.PCI0.RP00.VGA._PS3' > /proc/acpi/call

and miraculously power consumption went down from 20W to 12W.

Up to eight hours of battery life.

Questions for anyone with even a remote knowledge of ACPI.

First of all, assumed that LEqual stands for "Less than or equal to". Under this assumption, how P3MO would ever be greater than 0x01 because it isn't changed to anything but zero or one?

This is every line I found P3MO on...

14781: Name (P3MO, 0x00)
14885: Store (One, \_SB.PCI0.RP00.VGA.P3MO)
14889: Store (Zero, \_SB.PCI0.RP00.VGA.P3MO)
15157: Store (0x00, P3MO)

Tuesday 21 September 2010

Intel Intelligent Power Sharing Driver (IPS)

[PATCH 0/6] Include support for the Intel Intelligent Power Sharing Driver (IPS) - Kernel team discussions - ArchiveOrange
Intel Core i3/5 platforms with integrated graphics support both CPU and
GPU turbo mode. CPU turbo mode is opportunistic: the CPU will use any
available power to increase core frequencies if thermal headroom is
available. The GPU side is more manual however; the graphics driver
must monitor GPU power and temperature and coordinate with a core
thermal driver to take advantage of available thermal and power headroom
in the package.

The intelligent power sharing (IPS) driver is intended to coordinate
this activity by monitoring MCP (multi-chip package) temperature and
power, allowing the CPU and/or GPU to increase their power consumption,
and thus performance, when possible. The goal is to maximize
performance within a given platform's TDP (thermal design point).

Tuesday 7 September 2010

Sony Vaio VPCZ12 DSDT hybrid graphics info

The Sony Vaio VPCZ12 model comes with a ACPI DSDT table that has two methods to allow for switching on/off the discrete graphics card:
_SB.PCI0.P0P2.DGPU._ON
_SB.PCI0.P0P2.DGPU._OFF


                                If (LEqual (_T_0, 0x03))
                                {
                                    Store (0xA003, P80H)
                                    Increment (CNTD)
                                    If (LEqual (And (Arg3, 0x03), Zero))
                                    {
                                        Return (^^P0P2.DGPU._STA ())
                                    }

                                    If (LEqual (And (Arg3, 0x03), One))
                                    {
                                        ^^P0P2.DGPU._ON ()
                                        Return (One)
                                    }

                                    If (LEqual (And (Arg3, 0x03), 0x02))
                                    {
                                        ^^P0P2.DGPU._OFF ()
                                        Return (Zero)
                                    }
                                }

Asus.N61Jv ACPI DSDT hybrid graphics

Here is a snippet of the hybrid graphics switching ACPI DSDT table for the Asus N61Jv laptop:



    Scope (\_SB.PCI0.PEGR.GFX0)
    {
        OperationRegion (HDAY, SystemMemory, 0xF8100000, 0x0FF0)
        Field (HDAY, ByteAcc, NoLock, Preserve)
        {
                    Offset (0x48B),
                ,   1,
            HDAE,   1
        }

        Name (DGPS, Zero)
        Name (_PSC, Zero)
        Method (_PS0, 0, NotSerialized)
        {
            Store (0xD0, DBG8)
            Store (Zero, _PSC)
            If (LNotEqual (DGPS, Zero))
            {
                Store ("PS0: Need to power on dGPU", Debug)
                \_SB.PCI0.PEGR.GFX0._ON ()
                Store (Zero, DGPS)
                Sleep (0x01F4)
                Store (Zero, HDAE)
                \_SB.PCI0.LPCB.EC0.WRAM (0x0458, 0x43)
                \_SB.PCI0.LPCB.EC0.TSES ()
            }
        }

        Method (DON, 0, NotSerialized)
        {
            _ON ()
        }

[..]

       Method (_PS3, 0, NotSerialized)
        {
            Store (0xD3, DBG8)
            If (LEqual (\OMPR, 0x03))
            {
                Store ("PS3: Driver wants to power off dGPU", Debug)
                If (LEqual (DGPS, Zero))
                {
                    \_SB.PCI0.LPCB.EC0.TSDS ()
                    \_SB.PCI0.PEGR.GFX0._OFF ()
                    Store (One, DGPS)
                    \_SB.PCI0.LPCB.EC0.WRAM (0x0458, 0x4B)
                }

                Store (0x02, \OMPR)
                Store ("PS3: OMPR=2 now", Debug)
            }

            Store (0x03, _PSC)
        }

        Method (CLKS, 1, Serialized)
        {
            Store (\_SB.PCI0.SBUS.RBLK (0xD2, 0x00, 0x0C), CLKD)
            If (Arg0)
            {
                Or (CB08, 0x03, CB08)
            }
            Else
            {
                And (CB08, 0xFC, CB08)
            }

            \_SB.PCI0.SBUS.WBLK (0xD2, 0x00, 0x0C, CLKD)
        }

        Method (DOFF, 0, NotSerialized)
        {
            _OFF ()
        }

Saturday 21 August 2010

Howto Linux hybrid graphics Asus N71Jv

Linux Hybrid Graphics: Using acpi_call module to switch on/off discrete graphics card in Linux
Asus N71JV - TY079V



./test_off.sh

Trying \_SB.PCI0.P0P1.VGA._OFF: failed

Trying \_SB_.PCI0.OVGA.ATPX: failed

Trying \_SB_.PCI0.OVGA.XTPX: failed

Trying \_SB.PCI0.P0P2.PEGP._OFF: failed

Trying \_SB.PCI0.MXR0.MXM0._OFF: failed

Trying \_SB.PCI0.PEG1.GFX0._OFF: works!



Asus N71Jv 1.0



00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 12)

01:00.0 VGA compatible controller [0300]: nVidia Corporation Device [10de:0a35] (rev a2)

Friday 20 August 2010

Howto Linux hybrid graphics HP Pavilion dm4-1063cl

Linux Hybrid Graphics: Using acpi_call module to switch on/off discrete graphics card in Linux
HP Pavilion dm4-1063cl
with Intel (integrated) and ATI (Discrete)
Compiling acpi_call and here's the result:

Trying \_SB.PCI0.P0P1.VGA._OFF: failed
Trying \_SB_.PCI0.OVGA.ATPX: failed
Trying \_SB_.PCI0.OVGA.XTPX: failed
Trying \_SB.PCI0.P0P2.PEGP._OFF: works!

Here is an init script with this to disable the discrete card for now, because the battery drains quicly with the two cards on.

#!/bin/bash
insmod /home/mansor/acpi_call/acpi_call.ko
echo '\_SB.PCI0.P0P2.PEGP._OFF' > /proc/acpi/call

Tuesday 17 August 2010

Asus N82JV hybrid graphics Linux

On a Asus N82JV

Trying \_SB.PCI0.PEG1.GFX0._OFF: works!

A "grep rate /proc/acpi/battery/BAT0/state" command showed a difference of about 7.5W in battery usage.

Acer Aspire 4745G hybrid graphics Linux

Acer Aspire 4745G, Ubuntu 10.04 64bit.

here's the output after installing the acpi_call.ko module and running the test_off script:

Trying \_SB.PCI0.P0P1.VGA._OFF: failed
Trying \_SB_.PCI0.OVGA.ATPX: failed
Trying \_SB_.PCI0.OVGA.XTPX: failed
Trying \_SB.PCI0.P0P2.PEGP._OFF: works!

it disabled the discrete ati hd 5470 graphics leaving only the intel integrated graphics.

Monday 26 July 2010

More interesting news from the vga_switcheroo/acpi_call front

Here a website with useful ACPI information for Linux laptops:
http://linux.aldeby.org/bios-dst.html

And here some developments for the Asus Optimus laptops and vga_switcheroo:
https://lists.launchpad.net/hybrid-graphics-linux/msg00143.html

Friday 23 July 2010

How to test nouveau nvidia hybrid graphics switch on/off

One of the hybrid-graphics-linux launchpad team member kindly provided an Ubuntu
package for the patched kernel that reports "_DSM" vga_switcheroo switches for nvidia hybrid graphics laptops

(sub-arch is Core-Duo/Xeon, all other config options are based of
a stock Ubuntu kernel)
. You can download it at:
http://rapidshare.com/files/408536337/linux-image-2.6.35-rc5_CustomDebugNV.01_amd64.deb

or

http://hotfile.com/dl/56924631/1202d13/linux-image-2.6.35-rc5_CustomDebugNV.01_amd64.deb.html

Please run this command post installing or
this kernel will fail to boot:

# mkinitramfs -k 2.6.35-rc5 -o /boot/initrd.img-2.6.35-rc5

So if you have a nvidia hybrid graphics laptop and want to test its nouveau drivers compatibility, now it's easier than ever...

Tuesday 20 July 2010

nvidia-pre-optimus: David Airlie's 0001-nouveau-mux-switching-test-patch-1.patch

[Hybrid-graphics-linux] finishing intel/nvidia support (with open drivers)
This is a patch to apply on top of current Linux tree, with a dmesg from a pre-optimus nvidia hybrid machine should bring up some info on the current state of the switchable toggle.
Testers welcomed, please report back at mailing list https://launchpad.net/~hybrid-graphics-linux, this email is repeated there:
http://people.freedesktop.org/~airlied/scratch/0001-nouveau-mux-switching-test-patch-1.patch
Also, if you have time to package the patched kernel for your favourite distro, please post it somewhere so that other people can install it and try it.

From d2049202567dcb83ef9b8bbf34a3bccc10d90477 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Tue, 20 Jul 2010 09:06:09 +1000
Subject: [PATCH] nouveau: mux-switching test patch 1

---
drivers/gpu/drm/nouveau/nouveau_acpi.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index d4bcca8..dfb3b5b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -31,6 +31,8 @@
#define NOUVEAU_DSM_POWER_SPEED 0x01
#define NOUVEAU_DSM_POWER_STAMINA 0x02

+#define NOUVEAU_DSM_TOGGLE 0x05
+
static struct nouveau_dsm_priv {
bool dsm_detected;
acpi_handle dhandle;
@@ -90,7 +92,12 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg, int *result)

static int nouveau_dsm_switch_mux(acpi_handle handle, int mux_id)
{
- return nouveau_dsm(handle, NOUVEAU_DSM_LED, mux_id, NULL);
+ int result, ret;
+ ret = nouveau_dsm(handle, NOUVEAU_DSM_LED, mux_id, NULL);
+
+ ret = nouveau_dsm(handle, NOUVEAU_DSM_TOGGLE, (mux_id | (1<<31)), &result);
+ printk("mux switch toggle returned %d\n", result);
+ return ret;
}

static int nouveau_dsm_set_discrete_state(acpi_handle handle, enum vga_switcheroo_state state)
@@ -181,10 +188,21 @@ static bool nouveau_dsm_detect(void)
}

if (vga_count == 2 && has_dsm) {
+ u32 result;
+ int ret;
acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME, &buffer);
printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n",
acpi_method_name);
nouveau_dsm_priv.dsm_detected = true;
+ /* get current power state */
+ ret = nouveau_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STATE, &result);
+ if (ret == 0) {
+ printk("VGA switchreoo: current power state is %d\n", result);
+ }
+ ret = nouveau_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_TOGGLE, 0, &result);
+ if (ret == 0) {
+ printk("VGA switchreoo: current toggle state is %d\n", result);
+ }
return true;
}
return false;
--
1.7.1

Saturday 17 July 2010

David Airlie on Intel/Nvidia open-source hybrid graphics support

[Hybrid-graphics-linux] finishing intel/nvidia support (with open drivers)
a) figure out what values to pass the DSM method to trigger the MUX,
It looks like method 0x5 is the one to trigger the mux switch but I've
no idea yet what values to pass it to trigger the mux switch.

b) figure out how to get the LVDS DDC lines and make nouveau find the
panel, at the moment it fails to find the panel when booted and intel
is in control.

looking at (a) I expect we could pass a bunch of values to the ACPI
method possibly using acpi_call to switch the mux and switch it back,

It looks like passing 0 will return the current toggle status, then
its a matter of working out which of the top bits are doing what,

>From reading one DSDT I can see,

if bit 31 set, then bit 30 is some sort of notify, then bits 25,26,27
are used to work out some values stored in a TOGF

otherwise bit 24 is used for something, then bits 12,13,14, and 3,2,1,
and it stores some values for CRT/LCD/TVout, which may again be
toggles.

If someone with the hardware and can use acpi_call it would be nice to
try and map out some of these things, at least initially a value that
will turn the Intel LCD off and back on.

The DSDT I'm using at the moment is attached to bug 16403.

Friday 16 July 2010

ASUS UL80V Nvidia GPU working

This link whows the Asus UL80 laptop solution that works for using the Nvidia GPU.

This does not work on the ASUS N series, it may work on others.



http://ubuntu-ky.ubuntuforums.org/showthread.php?t=1361466&page=2

Friday 2 July 2010

Using acpi_call module to switch on/off discrete graphics card in Linux


sudo apt-get install git
# type password

git clone http://github.com/mkottman/acpi_call.git
cd acpi_call
make
sudo insmod acpi_call.ko

# To check that the status of your VGA devices, run this command:

lspci -vnnn | grep VGA

# Unplug laptop, click on the battery indicator and take note of
# estimated remaining time.
# Now run this script:

./test_off.sh

# If you see a "works!" message, it's found a method.
To check that the status of your VGA devices has changed,
run this command again and check for the differences:

lspci -vnnn | grep VGA

Click on the battery indicator after running the test.sh script,
it should show a difference of about an extra 1-3 hours battery life.

Please join the hybrid graphics team if you are new by clicking on the
"Join Team" link at the right in this URL:

http://launchpad.net/~hybrid-graphics-linux

If you have any comments/questions, the best way to get an answer is to
subscribe to the mailing list at the bottom of that page and send an email there.

Thursday 1 July 2010

Monday 28 June 2010

And one more

Please keep providing DSDT.dsl information in this bug report:
https://bugs.launchpad.net/bugs/312756
This is the list of calls to turn off the switchable graphics card in Linux so far:
\_SB.PCI0.P0P1.VGA._OFF
\_SB_.PCI0.OVGA.ATPX   
\_SB_.PCI0.OVGA.XTPX   
\_SB.PCI0.P0P2.PEGP._OFF
\_SB.PCI0.MXR0.MXM0._OFF
\_SB.PCI0.PEG1.GFX0._OFF
\_SB.PCI0.PEG1.GFX0.DOFF
\_SB.PCI0.XVR0.Z01I.DGOF
\_SB.PCI0.PEGR.GFX0._OFF

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.

acpi_call -- a simple way to call ACPI methods



One of the hybrid-graphics-linux Launchpad team members has created a Linux kernel module to call ACPI methods through /proc/acpi/call. The code is here:


http://github.com/mkottman/acpi_call

You can try it by installing the module and then calling it like this:

sudo insmod acpi_call.ko

echo '\_SB.PCI0.PEG1.GFX0.DOFF' > /proc/acpi/call







Yet another method

Please keep providing DSDT.dsl information in this bug report:
https://bugs.launchpad.net/bugs/312756
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);
status = acpi_get_handle(root_handle, "\\_SB.PCI0.XVR0.Z01I.DGOF", &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.

Sunday 27 June 2010

Yet another method

Please keep providing DSDT.dsl information in this bug report:
https://bugs.launchpad.net/bugs/312756
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);
status = acpi_get_handle(root_handle, "\\_SB.PCI0.XVR0.Z01I.DGOF",
&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.

Saturday 26 June 2010

ENZO -- an alternative to CUDA and OpenCL @ www.hpcwire.com

Reposting article from HPCwire:
HPCwire: PathScale Looks to One-Up CUDA, OpenCL with New GPU Compiler
Using the open source NVIDIA graphics driver -- Nouveau,
which is included in the Linux kernel -- PathScale created a fork off the
source code with high performance computing in mind. PathScale also
managed to recruit most of the talent from the driver project. PathScale's CTO, Bergström,
says the team was able to reverse engineer the NVIDIA ISA, register
details, and device exception handling. With that knowledge, they set
out to rewrite the code generator (compiler back-end), driver, and
runtime, focusing on improved memory management, error handling,
security and HPC-specific features, and performance.

Wednesday 23 June 2010

A CUDA Back-End For Intel's Open-Source Driver? @ www.phoronix.com

[Phoronix] A CUDA Back-End For Intel's Open-Source Driver?
Posting the link for a very interesting article about CUDA for Intel's Open-Source Drivers at phoronix.

Monday 21 June 2010

OpenCL support from open-source drivers -- what is to come

Zack Rusin recently blogged about advances in the Gallium infrastructure, with work him, Keith Whitwell and José Fonseca have just finished. With much happing lately in the open-source graphics drivers front, it is sometimes difficult to track what remains to be done in the GPGPU area for open-source Linux drivers.
One of the novelties in Gallium-land is the introduction of the concept of resources in the shader representation. Two new items of functionality have been added, the most interesting of them is Gather4, which comes from DirectX 11:
Gather4: Modern GPUs use dedicated hardware blocks known as texture units to fetch data rapidly into their processing cores. These texture units have historically been optimized for rendering graphics, where techniques such as bilinear filtering are typically used to improve image quality. Compute Shaders often make use of these same units to fetch data as well, but they generally have no use for their filtering capabilities, leaving them underutilized. GPUs with Shader Model 5.0 support have the ability to use the excess fetch capability with the Gather4 operation, which can fetch up to 4 values simultaneously and provide a 4xincrease in data bandwidth.

Sunday 20 June 2010

Acer TimelineX 4280TG DSDT

One of the Acer Timeline/TimelineX Launchpad team members has reported the DSDT table for this laptops model. It contains one method that looks like will allow for the switch of the D-iscrete GPU:
                                Store (Zero, \_SB.PCI0.LPCB.EC0.PSBB)
                                If (LEqual (Local2, One))
                                {
                                    Store (Zero, \_SB.PCI0.LPCB.EC0.DGPU)
                                    If (LEqual (\_SB.PCI0.LPCB.EC0.PSTA, One))
                                    {
                                        Store (Zero, \_SB.PCI0.LPCB.EC0.PSTA)
                                    }

                                    \_SB.PCI0.LPCB.EC0.CPOL (0x14)
                                    Store (One, \_SB.PCI0.LPCB.EC0.QEVN)
                                }
There seems to be another DSDT for a similar model, according to this blog post:
http://skroslak.wordpress.com/2008/01/11/custom-dsdt-loading-on-toshiba-p100p105-laptops-for-ubuntudebian/
Nobody confirmed if this is the right way to go for this laptop, so we need to wait for confirmation on this one.

Saturday 19 June 2010

OpenCL support from open-source drivers -- status today

Much has happened lately in the open-source graphics drivers front, and one of the questions people is asking is how far are we from having GPGPU support in the shape of open-source Linux drivers. While Nvidia and ATI both provide closed-source OpenCL drivers for Linux, the open-source front is not far from having the same level of functionality.

Work is underway at PathScale to make a kernel driver that supports GPGPU applications, at:

http://github.com/pathscale/pscnv

GPGPU program execution works fine with it already. It's currently missing error handling and has some race conditions, but that should be fixed soon.

OpenCL or even CUDA can be layered over it just fine, but PathScale cannot commit in doing that. This is were other open-source developers can step in.
Documentation for the relevant hardware bits is still sparse, but the irc channels #nouveau or #pathscale are great places to ask questions.

On the ATI open-source drivers front, the situation is also incomplete, but with good ways forward. The easiest method identified so far would be to add OpenCL support to Gallium. Zack Rusin started on an implementation although it's still incomplete, waiting for someone to step in:

http://cgit.freedesktop.org/mesa/clover/

Once the Gallium implementation is near completion, it should work on any gallium driver. Only hardware with DirectX capabilities will work for full functionality. The idea with Gallium is to abstract a basic the hardware driver behind a general interface and then write state tracker front ends that talk to the general interface. The state tracker implements an API like OpenGL, OpenVG, OpenCL, etc. That way, only one hardware driver is needed, and you support for multiple APIs comes for it.

Right now, the r300 Gallium driver is fairly complete, supporting r3xx-r5xx Radeons.  The r600 Gallium driver (for r6xx, r7xx Radeons) has only just started.

Documentation on AMD GPUs is available here:

http://wiki.x.org/wiki/DataSheets

Additionally, there are quite a few resources on the AMD developers website:

http://developer.amd.com/pages/default.aspx

Hopefully this short summary will atract interest from developers waiting for a sexy open-source project to work on.

Many thanks to Marcin Koscielnicki from PathScale and Alex Deucher from AMD for their reports.

Wednesday 16 June 2010

Kernel mode-setting talk

[Phoronix] Talking About Kernel Mode-Setting
Kernel Mode-Setting enabled some of the interesting graphics drivers features that we are enjoying in the Linux community nowadays. Find in the link a talk about KMS.

Saturday 12 June 2010

One more linux switchable methods that needs confirmation

One more that needs confirmation: Acer 5935g: http://launchpadlibrarian.net/50231929/DSDT.dsl


                                        If (LEqual (_T_2, One))
                                        {
                                            Store (0x1E, P80H)
                                            ^^PEGP.VGA._ON ()
                                            Store (0x1F, P80H)
                                            Return (GP18)
                                        }
                                        Else
                                        {
                                            If (LEqual (_T_2, 0x02))
                                            {
                                                Store (0x0E, P80H)
                                                ^^PEGP.VGA._OFF ()
                                                Store (0x0F, P80H)
                                                Return (GP18)
                                            }
                                        }

Please keep providing DSDT.dsl information in this bug report:
https://bugs.launchpad.net/bugs/312756
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.

Even more linux switchable methods

We received another method from a UL30JT laptop user, please keep providing DSDT.dsl information in this bug report:
https://bugs.launchpad.net/bugs/312756
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.

One more hybrid graphics Linux method: Asus K52Jc

The Asus K52Jc laptop DSDT contains a method called:

\_SB.PCI0.PEG1.GFX0.DOFF

You can quite possibly use the lenovo_acpi module and substitute the default method for the one in your DSDT:

http://github.com/doudou/lenovo_acpi

Acer Aspire TimelineX 3820TG Linux hybrid graphics

Acer Aspire TimelineX 3820TG Linux hybrid graphics



00:02.0 VGA compatible controller [0300]: Intel Corporation Core
Processor Integrated Graphics Controller [8086:0046] (rev 12)

02:00.0 VGA compatible controller [0300]: ATI Technologies Inc
Redwood [Radeon HD 5600 Series] [1002:68c1]


To switch off the ATI card use the _SB.PCI0.P0P2.PEGP._OFF method as in:
http://linux-hybrid-graphics.blogspot.com/2010/06/more-linux-switchable-methods.html



See also http://ubuntuforums.org/showthread.php?p=9446283#post9446283



** Attachment added: "from Acer Aspire TimelineX 3820TG"

  http://launchpadlibrarian.net/50146289/DSDT.dsl

Friday 11 June 2010

Linux Toshiba T135 (T100 Series) Headphone Jack howto

options snd-hda-intel model="olpc-xo-1_5"



to:



/etc/modprobe.d/alsa-base.conf

First steps with CUDA with Ubuntu 10.04 @ http://nsaunders.wordpress.com

Reposting from nsaunders blog:
First cautious steps with CUDA | What You’re Doing Is Rather Desperate









I recently obtained an account on our GPU cluster,
so I thought I should get my head around some of the technology that
drives GPU computing.

Put simply, GPUs can be used to perform calculations and since there are
many processors on a GPU, this can lead to quite substantial speed
increases as compared with CPUs. NVIDIA are
leading the way and they provide libraries and
software tools
for people interested in this field.

Development is typically performed using C, C++ or Fortran. I’m not a
compiled languages guy – I could just about manage a hello world
in C – so I’m relying on tools built by other people, such as R
gputools
.

Step 1 is to download and install the required libraries, toolkit and
possibly, drivers. I ran into a couple of minor problems on my machine,
so I thought I’d document them here.



Specifications

I run Ubuntu 10.04 on a 64-bit machine with a quad-core AMD Phenom II X4
955 Processor and a GeForce 9600 GT nVidia 512 MB card. The issues
documented here relate largely to Ubuntu 10.04.

Install the CUDA toolkit

This is reasonably straightforward. Note that the latest version of the
toolkit is for Ubuntu 9.04.


2chmod +x cudatoolkit_3.0_linux_64_ubuntu9.04.run
3sudo ./cudatoolkit_3.0_linux_64_ubuntu9.04.run

The installer asks where you would like to install the toolkit. I
chose /opt/cuda, over the default /usr/local/cuda. You then add
/opt/cuda/bin to your PATH and /opt/cuda/lib64 to LD_LIBRARY_PATH.
There are several ways to achieve this; I like to edit ~/.profile:


1# CUDA
2if [ -d "/opt/cuda/bin" ] ; then
3    PATH="/opt/cuda/bin:$PATH"
4    LD_LIBRARY_PATH="/opt/cuda/lib64:$LD_LIBRARY_PATH"
5fi

Download and unpack the SDK

This is also quite easy.


2chmod +x gpucomputingsdk_3.0_linux.run
3./gpucomputingsdk_3.0_linux.run

This simply unpacks the SDK to the default destination of
~/NVIDIA_GPU_Computing_SDK.


Fix up issues with compilation

In theory, the next step is to cd to
~/NVIDIA_GPU_Computing_SDK/C, type “make” and watch the sample
applications compile. There are a couple of problems with Ubuntu 10.04.

First, the version of GCC in the distribution is 4.4.3, whereas the SDK
requires, at most, 4.3.x. We need to install gcc-4.3:


1sudo apt-get install gcc-4.3

Next, we have to tell the SDK which GCC to use. Open up
~/NVIDIA_GPU_Computing_SDK/C/common/common.mk in a text editor and:


1# look for this line
2# NVCCFLAGS       :=
3# and change it to this
4NVCCFLAGS       :=
--compiler-bindir=/usr/bin/gcc-4.3

At this point, make still failed with errors related to
libraries. Ubuntu 10.04 has an up-to-date version of the NVIDIA video
driver, so there should be no need to update it. However, check whether
your system has libxi-dev, libxmu-dev and libglut3-dev
and install them if required.

My final make error was “unable to find -lcuda”. On my system,
it lives in /usr/lib/nvidia-current/libcuda.so. A temporary symbolic
link to /usr/lib did the trick:


1sudo ln -sf /usr/lib/nvidia-current/libcuda.so /usr/lib/

Finally, make works and creates 68 executables in the
directory ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release. If everything
went well, you can now enjoy a fast rendering of a smoke cloud, like
the one in the video at the top of this post, by running smokeParticles.


Next step – figuring out how to do something useful and
bioinformatics-related with this new toy.


I used several very helpful blog posts by other people to
troubleshoot these issues. Unfortunately, I don’t have the links with
me right now, so I’ll update this post later in the day.





Blog Archive