Bumblebee-Project / Bumblebee

Bumblebee daemon and client rewritten in C
http://www.bumblebee-project.org/
GNU General Public License v3.0
1.3k stars 142 forks source link

Refused to change power state, currently in D0 #664

Open AM2petterk opened 9 years ago

AM2petterk commented 9 years ago

Hi,

I just noticed an error I get in dmesg after using the nvidia card with bumblebee.

dmesg:

[ 1122.814145] bbswitch: enabling discrete graphics
[ 1123.308915] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:03:00.0 on minor 1
[ 1123.308920] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  352.09  Tue May 12 14:47:49 PDT 2015
[ 1123.324610] vgaarb: this pci device is not a vga device
[ 1123.326857] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.326902] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.326926] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.326948] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.326970] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.326992] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.327025] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.327047] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.342376] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1123.473708] vgaarb: this pci device is not a vga device
[ 1169.368426] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1169.375395] [drm] Module unloaded
[ 1169.390285] bbswitch: disabling discrete graphics
[ 1169.390294] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[ 1169.401377] pci 0000:03:00.0: Refused to change power state, currently in D0

Although /proc/acpi/bbswitch seems to be correct, showing ON/OFF as to wether Im using the card.

excieve commented 9 years ago

Similar log entries here:

[49092.155551] [drm] Module unloaded
[49092.166726] bbswitch: disabling discrete graphics
[49092.166748] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
[49092.177394] pci 0000:01:00.0: Refused to change power state, currently in D0

bbswitch reports power OFF state though so I'm not sure if it's affecting anything. But why the message then? Fedora 22, kernel 4.0.6.

frol commented 8 years ago

Have anyone found the cause of the message? It feels like the card gets disabled (at least the temperature drops from 70C to 55C and sometimes down to 50C), but the message bothers me.

$ dmesg | grep -C 5 bbswitch
[    4.156239] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.156243] [drm] Initialized i915 1.6.0 20150522 for 0000:00:02.0 on minor 0
[    4.163758] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card1/input8
[    4.163953] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input12
[    4.163996] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input13
[    4.194827] bbswitch: version 0.8
[    4.194833] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[    4.194838] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[    4.194848] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150619/nsarguments-95)
[    4.194913] bbswitch: detected an Optimus _DSM function
[    4.194924] pci 0000:01:00.0: enabling device (0006 -> 0007)
[    4.194948] ACPI Error: [AR02] Namespace lookup failure, AE_NOT_FOUND (20150619/psargs-359)
[    4.194952] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG0._PRT] (Node ffff88044e8d29d8), AE_NOT_FOUND (20150619/psparse-536)
[    4.195029] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[    4.196497] bbswitch: disabling discrete graphics
[    4.196507] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150619/nsarguments-95)
[    4.199753] ACPI Error: [AR02] Namespace lookup failure, AE_NOT_FOUND (20150619/psargs-359)
[    4.199758] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG0._PRT] (Node ffff88044e8d29d8), AE_NOT_FOUND (20150619/psparse-536)
[    4.212225] usb 1-1.3: new low-speed USB device number 4 using xhci_hcd
[    4.212358] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2
--
[   28.062838] tun: Universal TUN/TAP device driver, 1.6
[   28.062841] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   65.205381] nvidia_uvm: Unregistered the UVM driver
[   66.328186] NVLINK: Unregistered the Nvlink Core, major device number 248
[   66.328314] [drm] Module unloaded
[   80.033383] bbswitch: disabling discrete graphics
[   80.033399] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150619/nsarguments-95)
[   80.033712] ACPI Error: [AR02] Namespace lookup failure, AE_NOT_FOUND (20150619/psargs-359)
[   80.033718] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG0._PRT] (Node ffff88044e8d29d8), AE_NOT_FOUND (20150619/psparse-536)
[   80.044398] pci 0000:01:00.0: Refused to change power state, currently in D0
AM2petterk commented 8 years ago

I too believe its actually turned off even though the mesage appears in dmesg. The idle battery-usage is doubled when the card is active.

ArchangeGabriel commented 8 years ago

This is harmless and known from the beginning. From what I remember, this is due to trying to power OFF the card too fast or something like that. I’ll keep this issue opened (but cleaned a bit your messages to keep only related content) so that we think about either fixing this or properly document it.

robermorales commented 7 years ago

Same problem here, with archlinux and with manjaro, linux 4.9rc7, nvidia drivers and bumblebee on a gtx 980M.

✔ 19:53 ~ $ dmesg |grep Refused
[   15.399349] pci 0000:01:00.0: Refused to change power state, currently in D0
[   72.426264] pci 0000:01:00.0: Refused to change power state, currently in D0
[  103.099735] pci 0000:01:00.0: Refused to change power state, currently in D0
[  173.040124] pci 0000:01:00.0: Refused to change power state, currently in D0
[  514.924999] pci 0000:01:00.0: Refused to change power state, currently in D0
✔ 19:53 ~ $ optirun echo hola
hola
✔ 19:53 ~ $ dmesg |grep Refused
[   15.399349] pci 0000:01:00.0: Refused to change power state, currently in D0
[   72.426264] pci 0000:01:00.0: Refused to change power state, currently in D0
[  103.099735] pci 0000:01:00.0: Refused to change power state, currently in D0
[  173.040124] pci 0000:01:00.0: Refused to change power state, currently in D0
[  514.924999] pci 0000:01:00.0: Refused to change power state, currently in D0
[  530.228908] pci 0000:01:00.0: Refused to change power state, currently in D0

I think that the card is not disabled, since the fan is at full speed.

Any news?

Lekensteyn commented 7 years ago

@robermorales Your issue might be different from the other reporters. Consider opening a new report with a tarball created following the instructions in https://bugs.launchpad.net/lpbugreporter/+bug/752542

ph03 commented 7 years ago

On ubuntu 1610 with nvidia-367 I'm getting this APCI warnings with a kernel stack trace

[  382.767682] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none
[  382.767749] nvidia-nvlink: Nvlink Core is being initialized, major device number 244
[  382.767759] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  367.57  Mon Oct  3 20:37:01 PDT 2016
[  382.808051] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  367.57  Mon Oct  3 20:32:57 PDT 2016
[  382.854688] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  382.854773] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  382.854826] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  382.854879] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  382.855095] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  382.855254] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  382.855306] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  383.010212] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  383.228721] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 241
[  383.449090] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  383.451692] nvidia-modeset: Unloading
[  383.474673] nvidia-uvm: Unloaded the UVM driver in 8 mode
[  383.506541] nvidia-nvlink: Unregistered the Nvlink Core, major device number 244
[  383.547057] bbswitch: disabling discrete graphics
[  383.547065] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  383.547296] ------------[ cut here ]------------
[  383.547301] WARNING: CPU: 0 PID: 2020 at /build/linux-JD982z/linux-4.8.0/drivers/pci/pci.c:1616 pci_disable_device+0xa8/0xd0
[  383.547301] pci 0000:01:00.0: disabling already-disabled device
[  383.547302] Modules linked in:
[  383.547303]  ip6table_filter ip6_tables pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) ccm ipt_MASQUERADE nf_nat_masquerade_ipv4 xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack br_netfilter bridge stp llc aufs bnep bbswitch(OE) arc4 iwlmvm mac80211 intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel uvcvideo aes_x86_64 videobuf2_vmalloc lrw glue_helper videobuf2_memops ablk_helper videobuf2_v4l2 cryptd videobuf2_core videodev intel_cstate btusb media btrtl intel_rapl_perf snd_hda_codec_realtek snd_hda_codec_hdmi btbcm snd_hda_codec_generic btintel joydev bluetooth input_leds iwlwifi serio_raw snd_hda_intel snd_hda_codec
[  383.547328]  snd_hda_core cfg80211 snd_hwdep thinkpad_acpi snd_pcm nvram snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device wmi snd_timer snd mei_me ie31200_edac soundcore shpchp mei edac_core lpc_ich mac_hid nfsd auth_rpcgss nfs_acl lockd grace sunrpc parport_pc ppdev lp parport ip_tables x_tables autofs4 i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops e1000e sdhci_pci ahci ptp drm psmouse libahci sdhci pps_core fjes video [last unloaded: nvidia]
[  383.547349] CPU: 0 PID: 2020 Comm: bumblebeed Tainted: P           OE   4.8.0-30-generic #32-Ubuntu
[  383.547349] Hardware name: LENOVO 20EGS06302/20EGS06302, BIOS GNET75WW (2.23 ) 09/01/2015
[  383.547351]  0000000000000286 000000008fd88ef8 ffff8cd1d79f3d70 ffffffff9722fae2
[  383.547352]  ffff8cd1d79f3dc0 0000000000000000 ffff8cd1d79f3db0 ffffffff96e830fb
[  383.547353]  00000650c7d9bad0 ffff8cd1d9d65000 ffff8cd1d9cf1c80 000055d4c7d9bad0
[  383.547354] Call Trace:
[  383.547357]  [<ffffffff9722fae2>] dump_stack+0x63/0x81
[  383.547359]  [<ffffffff96e830fb>] __warn+0xcb/0xf0
[  383.547360]  [<ffffffff96e8317f>] warn_slowpath_fmt+0x5f/0x80
[  383.547362]  [<ffffffff9727ff9b>] ? __pci_set_master+0x3b/0xf0
[  383.547363]  [<ffffffff97282dc8>] pci_disable_device+0xa8/0xd0
[  383.547365]  [<ffffffffc11ed48d>] bbswitch_off+0xad/0x240 [bbswitch]
[  383.547366]  [<ffffffffc11ed870>] bbswitch_proc_write+0xb0/0xc7 [bbswitch]
[  383.547369]  [<ffffffff970a6472>] proc_reg_write+0x42/0x70
[  383.547371]  [<ffffffff970326c8>] __vfs_write+0x18/0x40
[  383.547372]  [<ffffffff97032e05>] vfs_write+0xb5/0x1a0
[  383.547373]  [<ffffffff97034255>] SyS_write+0x55/0xc0
[  383.547375]  [<ffffffff9769a076>] entry_SYSCALL_64_fastpath+0x1e/0xa8
[  383.547376] ---[ end trace db36889bf439c3f7 ]---
[  383.566417] pci 0000:01:00.0: Refused to change power state, currently in D0

and still

cat /proc/acpi/bbswitch
0000:01:00.0 ON

even after optirun finishes running. I assume the card should be turned OFF, right? Is there any way I can provide more information on this issue?

Lekensteyn commented 7 years ago

@ph03 Do you have runtime PM enabled for the pcie port and/or Nvidia PCI device? You can check with powertop. Try disabling runtime PM for these devices for now, otherwise bbswitch might trip

phocean commented 5 years ago

@Lekensteyn Thanks. I had this issue, and it was solved by disabling power management for the nvidia card in Powertop.