← Back to team overview

hybrid-graphics-linux team mailing list archive

ASUS K52J

 

Hi list,

I have an ASUS K52J laptop. It has i3 350m CPU with integrated Intel HD
Graphics and a discrete NVIDIA 310m GPU.

$ sudo dmidecode -s system-product-name
K52Jc
$ sudo dmidecode -s system-version
1.0       
$ lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA
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:0a70] (rev a2)

Although I cannot use the NVIDIA in Ubuntu 10.10 right now, at least I
wanted to turn it off, so it drains less battery.

I've created a simple module ( http://github.com/mkottman/acpi_call )
that allows to call ACPI methods by writing to /proc/acpi/call, mainly
to test out the methods listed on
http://linux-hybrid-graphics.blogspot.com/

I can confirm that \_SB.PCI0.PEG1.GFX0.DOFF and \_SB.PCI0.PEG1.GFX0.DON
turn the NVIDIA card off and on respectively. A test run showing
acpi_call in action is attached as acpi_call_test.txt

However, when I try to do the same thing using vga_switcheroo, using:

echo 'OFF' > /sys/kernel/debug/vgaswitcheroo/switch

I get a kernel stack trace somewhere in nouveau_switcheroo_set_state
(see attached vga_switcheroo_off_stacktrace.txt).
~/acpi_call$ cat /sys/kernel/debug/vgaswitcheroo/switch 
0:+:Pwr:0000:00:02.0
1: :Pwr:0000:01:00.0

# check the battery drain rate before experimenting
~/acpi_call$ cat /proc/acpi/battery/BAT0/state | grep rate
present rate:            18315 mW

# load the acpi_call driver (http://github.com/mkottman/acpi_call)
~/acpi_call$ sudo insmod acpi_call.ko
~/acpi_call$ echo '\_SB.PCI0.PEG1.GFX0.DOFF' > /proc/acpi/call

# no change in vgaswitcheroo...
~/acpi_call$ cat /sys/kernel/debug/vgaswitcheroo/switch 
0:+:Pwr:0000:00:02.0
1: :Pwr:0000:01:00.0

# ...however, the battery drain rate tells me that the NVIDIA 310m is turned off
~/acpi_call$ cat /proc/acpi/battery/BAT0/state | grep rate
present rate:            13134 mW

# now let's turn it back on
~/acpi_call$ echo '\_SB.PCI0.PEG1.GFX0.DON' > /proc/acpi/call

# it drains battery as before turning it off
~/acpi_call$ cat /proc/acpi/battery/BAT0/state | grep rate
present rate:            18843 mW


kernel: [   66.308867] VGA switcheroo: switched nouveau off
kernel: [   66.308897] BUG: unable to handle kernel NULL pointer dereference at 0000000000000181
kernel: [   66.308901] IP: [<ffffffffa02f006a>] nouveau_pci_suspend+0x4a/0x3d0 [nouveau]
kernel: [   66.308919] PGD 123f6f067 PUD 123f6e067 PMD 0 
kernel: [   66.308923] Oops: 0000 [#1] SMP 
kernel: [   66.308926] last sysfs file: /sys/devices/virtual/net/pan0/statistics/collisions
kernel: [   66.308931] CPU 1 
kernel: [   66.308932] Modules linked in: cryptd aes_x86_64 aes_generic nls_iso8859_1 nls_cp437 vfat fat binfmt_misc rfcomm ppdev sco bridge stp bnep l2cap snd_hda_codec_intelhdmi vga16fb vgastate nouveau arc4 snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event ath9k ath9k_common mmc_block snd_seq uvcvideo ttm mac80211 videodev v4l1_compat snd_timer snd_seq_device jme i915 ath9k_hw ath snd asus_laptop btusb bluetooth v4l2_compat_ioctl32 jmb38x_ms drm_kms_helper psmouse serio_raw sdhci_pci sdhci drm soundcore i2c_algo_bit mii cfg80211 sparse_keymap snd_page_alloc led_class memstick video output intel_agp lp parport ahci
kernel: [   66.308986] 
kernel: [   66.308990] Pid: 1720, comm: bash Tainted: G        W  2.6.34 #1 K52Jc/K52Jc
kernel: [   66.308993] RIP: 0010:[<ffffffffa02f006a>]  [<ffffffffa02f006a>] nouveau_pci_suspend+0x4a/0x3d0 [nouveau]
kernel: [   66.309002] RSP: 0018:ffff880123f45db8  EFLAGS: 00010282
kernel: [   66.309004] RAX: 0000000000000000 RBX: ffff880132739800 RCX: 000000000000001e
kernel: [   66.309007] RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff88014190e090
kernel: [   66.309009] RBP: ffff880123f45e18 R08: 00000000ffffffff R09: 0000000000000000
kernel: [   66.309012] R10: 0000000000000000 R11: 0000000000000050 R12: ffff88014190e000
kernel: [   66.309014] R13: 0000000000000002 R14: 0000000000000000 R15: 00000000ffffffed
kernel: [   66.309017] FS:  00007f24a0fce700(0000) GS:ffff880001c40000(0000) knlGS:0000000000000000
kernel: [   66.309020] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: [   66.309022] CR2: 0000000000000181 CR3: 0000000123f6c000 CR4: 00000000000006e0
kernel: [   66.309025] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kernel: [   66.309028] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
kernel: [   66.309031] Process bash (pid: 1720, threadinfo ffff880123f44000, task ffff880123e1c500)
kernel: [   66.309033] Stack:
kernel: [   66.309034]  ffff880123f45e18 ffffffff815510a6 ffff880100000008 ffff880123f45e28
kernel: [   66.309039] <0> ffff880123f45de8 0000000000000282 ffff880142a8d000 ffff88014190e000
kernel: [   66.309043] <0> ffff880123f45e68 0000000002192c08 00007fff461dd6fc ffffffffffffffea
kernel: [   66.309048] Call Trace:
kernel: [   66.309059]  [<ffffffff815510a6>] ? printk+0x41/0x43
kernel: [   66.309068]  [<ffffffffa02f1ec1>] nouveau_switcheroo_set_state+0x31/0x60 [nouveau]
kernel: [   66.309076]  [<ffffffff81342439>] vga_switchoff+0x19/0x40
kernel: [   66.309080]  [<ffffffff8134295e>] vga_switcheroo_debugfs_write+0xfe/0x320
kernel: [   66.309088]  [<ffffffff8114b29d>] ? vfs_ioctl+0x3d/0xd0
kernel: [   66.309093]  [<ffffffff8113b8a8>] vfs_write+0xb8/0x1a0
kernel: [   66.309096]  [<ffffffff8113c121>] sys_write+0x51/0x80
kernel: [   66.309105]  [<ffffffff8100a072>] system_call_fastpath+0x16/0x1b
kernel: [   66.309107] Code: 00 00 41 bf ed ff ff ff 49 89 fc 41 89 f5 48 8d bf 90 00 00 00 e8 47 65 07 e1 48 89 c3 4c 8b b0 48 03 00 00 48 8b 80 78 03 00 00 <f6> 80 81 01 00 00 20 74 09 41 83 fd 08 75 1c 45 31 ff 44 89 f8 
kernel: [   66.309140] RIP  [<ffffffffa02f006a>] nouveau_pci_suspend+0x4a/0x3d0 [nouveau]
kernel: [   66.309149]  RSP <ffff880123f45db8>
kernel: [   66.309150] CR2: 0000000000000181
kernel: [   66.309153] ---[ end trace b3179b5ce626bada ]---

Follow ups