Bumblebee-Project / bbswitch

Disable discrete graphics (currently nvidia only)
GNU General Public License v2.0
489 stars 78 forks source link

Refused to change power state, /proc/acpi/bbswitch denies permission #108

Closed SuperFluffy closed 8 years ago

SuperFluffy commented 9 years ago

I have a rather new K620m on my Arch Linux system, kernel 3.19, and it appears like bbswitch is neither able to disable the discrete graphics, nor can I turn it off manually.

These issues seem related; while I have found both issues mentioned on here, I have not found them mentioned together.

% echo "OFF" > /proc/acpi/bbswitch
zsh: permission denied: /proc/acpi/bbswitch

The relevant output from dmesg after (succesfully) running optirun glxspheres64:

[   31.580217] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:08:00.0 on minor 1
[   31.580222] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  346.47  Thu Feb 19 18:56:03 PST 2015
[   31.598180] vgaarb: this pci device is not a vga device
[   31.600203] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.600290] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.600355] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.600419] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.600482] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.600698] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.600884] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.601047] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.626459] ACPI Error: Field [TBF3] at 290816 exceeds Buffer [NULL] size 262144 (bits) (20141107/dsopcode-236)
[   31.626462] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG_.VID_.GETB] (Node ffff8802454aee88), AE_AML_BUFFER_LIMIT (20141107/psparse-536)
[   31.626467] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG_.VID_._ROM] (Node ffff8802454aee60), AE_AML_BUFFER_LIMIT (20141107/psparse-536)
[   31.628924] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   31.746135] vgaarb: this pci device is not a vga device
[   36.022118] [drm] Module unloaded
[   36.038922] bbswitch: disabling discrete graphics
[   36.038932] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[   36.051329] pci 0000:08:00.0: Refused to change power state, currently in D0

Just in case this is interesting:

% optirun glxgears -info
GL_RENDERER   = Quadro K620M/PCIe/SSE2
GL_VERSION    = 4.5.0 NVIDIA 346.47
GL_VENDOR     = NVIDIA Corporation
GL_EXTENSIONS = [...] lots of extensions [...]

And the latest Xorg.8.log:

[   806.200] 
X.Org X Server 1.17.1
Release Date: 2015-02-10
[   806.200] X Protocol Version 11, Revision 0
[   806.200] Build Operating System: Linux 3.18.6-1-ARCH x86_64 
[   806.200] Current Operating System: Linux rechenschieber 3.19.0-1-ARCH #1 SMP PREEMPT Mon Feb 9 07:08:20 CET 2015 x86_64
[   806.200] Kernel command line: BOOT_IMAGE=../vmlinuz-linux root=/dev/sda2 rw quiet rcutree.rcu_idle_gp_delay=1 initrd=../intel-ucode.img,../initramfs-linux.img
[   806.200] Build Date: 22 February 2015  12:50:32PM
[   806.200]  
[   806.200] Current version of pixman: 0.32.6
[   806.200]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   806.200] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   806.200] (==) Log file: "/var/log/Xorg.8.log", Time: Fri Mar  6 17:50:09 2015
[   806.200] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
[   806.200] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
[   806.200] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   806.201] (==) ServerLayout "Layout0"
[   806.201] (==) No screen section available. Using defaults.
[   806.201] (**) |-->Screen "Default Screen Section" (0)
[   806.201] (**) |   |-->Monitor "<default monitor>"
[   806.201] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[   806.201] (**) |   |-->Device "DiscreteNvidia"
[   806.201] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   806.201] (**) Option "AutoAddDevices" "false"
[   806.201] (**) Option "AutoAddGPU" "false"
[   806.201] (**) Not automatically adding devices
[   806.201] (==) Automatically enabling devices
[   806.201] (**) Not automatically adding GPU devices
[   806.201] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/OTF/".
[   806.201]    Entry deleted from font path.
[   806.201]    (Run 'mkfontdir' on "/usr/share/fonts/OTF/").
[   806.201] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[   806.201]    Entry deleted from font path.
[   806.201]    (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[   806.201] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[   806.201]    Entry deleted from font path.
[   806.201]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[   806.201] (==) FontPath set to:
    /usr/share/fonts/misc/,
    /usr/share/fonts/TTF/,
    /usr/share/fonts/Type1/
[   806.201] (++) ModulePath set to "/usr/lib/nvidia/xorg/,/usr/lib/xorg/modules"
[   806.201] (==) |-->Input Device "<default pointer>"
[   806.201] (==) |-->Input Device "<default keyboard>"
[   806.201] (==) The core pointer device wasn't specified explicitly in the layout.
    Using the default mouse configuration.
[   806.201] (==) The core keyboard device wasn't specified explicitly in the layout.
    Using the default keyboard configuration.
[   806.201] (II) Loader magic: 0x815d80
[   806.201] (II) Module ABI versions:
[   806.201]    X.Org ANSI C Emulation: 0.4
[   806.201]    X.Org Video Driver: 19.0
[   806.201]    X.Org XInput driver : 21.0
[   806.201]    X.Org Server Extension : 9.0
[   806.202] (EE) systemd-logind: failed to get session: PID 2323 does not belong to any known session
[   806.202] (II) xfree86: Adding drm device (/dev/dri/card0)
[   806.202] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[   806.202] (II) xfree86: Adding drm device (/dev/dri/card1)
[   806.204] (--) PCI:*(0:8:0:0) 10de:137a:17aa:2225 rev 162, Mem @ 0xf1000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00003000/128
[   806.204] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   806.204] (II) LoadModule: "glx"
[   806.204] (II) Loading /usr/lib/nvidia/xorg/modules/extensions/libglx.so
[   806.211] (II) Module glx: vendor="NVIDIA Corporation"
[   806.211]    compiled for 4.0.2, module version = 1.0.0
[   806.211]    Module class: X.Org Server Extension
[   806.211] (II) NVIDIA GLX Module  346.47  Thu Feb 19 18:09:07 PST 2015
[   806.211] (II) LoadModule: "nvidia"
[   806.212] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[   806.212] (II) Module nvidia: vendor="NVIDIA Corporation"
[   806.212]    compiled for 4.0.2, module version = 1.0.0
[   806.212]    Module class: X.Org Video Driver
[   806.212] (II) LoadModule: "mouse"
[   806.212] (WW) Warning, couldn't open module mouse
[   806.212] (II) UnloadModule: "mouse"
[   806.212] (II) Unloading mouse
[   806.212] (EE) Failed to load module "mouse" (module does not exist, 0)
[   806.212] (II) LoadModule: "kbd"
[   806.212] (WW) Warning, couldn't open module kbd
[   806.212] (II) UnloadModule: "kbd"
[   806.212] (II) Unloading kbd
[   806.212] (EE) Failed to load module "kbd" (module does not exist, 0)
[   806.212] (II) NVIDIA dlloader X Driver  346.47  Thu Feb 19 17:47:18 PST 2015
[   806.212] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   806.212] (--) using VT number 1

[   806.212] (II) Loading sub module "fb"
[   806.212] (II) LoadModule: "fb"
[   806.212] (II) Loading /usr/lib/xorg/modules/libfb.so
[   806.212] (II) Module fb: vendor="X.Org Foundation"
[   806.212]    compiled for 1.17.1, module version = 1.0.0
[   806.212]    ABI class: X.Org ANSI C Emulation, version 0.4
[   806.212] (II) Loading sub module "wfb"
[   806.212] (II) LoadModule: "wfb"
[   806.212] (II) Loading /usr/lib/xorg/modules/libwfb.so
[   806.213] (II) Module wfb: vendor="X.Org Foundation"
[   806.213]    compiled for 1.17.1, module version = 1.0.0
[   806.213]    ABI class: X.Org ANSI C Emulation, version 0.4
[   806.213] (II) Loading sub module "ramdac"
[   806.213] (II) LoadModule: "ramdac"
[   806.213] (II) Module "ramdac" already built-in
[   806.213] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[   806.213] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[   806.213] (==) NVIDIA(0): RGB weight 888
[   806.213] (==) NVIDIA(0): Default visual is TrueColor
[   806.213] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[   806.213] (**) NVIDIA(0): Option "NoLogo" "true"
[   806.213] (**) NVIDIA(0): Option "ProbeAllGpus" "false"
[   806.213] (**) NVIDIA(0): Option "UseEDID" "false"
[   806.213] (**) NVIDIA(0): Option "UseDisplayDevice" "none"
[   806.213] (**) NVIDIA(0): Enabling 2D acceleration
[   806.213] (**) NVIDIA(0): Ignoring EDIDs
[   806.213] (**) NVIDIA(0): Option "UseDisplayDevice" set to "none"; enabling NoScanout
[   806.213] (**) NVIDIA(0):     mode
[   806.360] (II) NVIDIA(GPU-0): Found DRM driver nvidia-drm (20150116)
[   806.361] (II) NVIDIA(0): NVIDIA GPU Quadro K620M (GM108GL-A) at PCI:8:0:0 (GPU-0)
[   806.361] (--) NVIDIA(0): Memory: 2097152 kBytes
[   806.361] (--) NVIDIA(0): VideoBIOS: 82.08.1f.00.03
[   806.361] (II) NVIDIA(0): Detected PCI Express Link width: 4X
[   806.361] (--) NVIDIA(0): Valid display device(s) on Quadro K620M at PCI:8:0:0
[   806.361] (--) NVIDIA(0):     none
[   806.361] (II) NVIDIA(0): Validated MetaModes:
[   806.361] (II) NVIDIA(0):     "NULL"
[   806.361] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[   806.361] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[   806.361] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[   806.361] (--) Depth 24 pixmap format is 32 bpp
[   806.361] (II) NVIDIA: Using 3072.00 MB of virtual memory for indirect memory
[   806.361] (II) NVIDIA:     access.
[   806.365] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[   806.365] (II) NVIDIA(0):     may not be running or the "AcpidSocketPath" X
[   806.365] (II) NVIDIA(0):     configuration option may not be set correctly.  When the
[   806.365] (II) NVIDIA(0):     ACPI event daemon is available, the NVIDIA X driver will
[   806.365] (II) NVIDIA(0):     try to use it to receive ACPI event notifications.  For
[   806.365] (II) NVIDIA(0):     details, please see the "ConnectToAcpid" and
[   806.365] (II) NVIDIA(0):     "AcpidSocketPath" X configuration options in Appendix B: X
[   806.365] (II) NVIDIA(0):     Config Options in the README.
[   806.365] (II) NVIDIA(0): Setting mode "NULL"
[   806.384] (==) NVIDIA(0): Disabling shared memory pixmaps
[   806.384] (==) NVIDIA(0): Backing store enabled
[   806.384] (==) NVIDIA(0): Silken mouse enabled
[   806.384] (==) NVIDIA(0): DPMS enabled
[   806.384] (II) Loading sub module "dri2"
[   806.384] (II) LoadModule: "dri2"
[   806.384] (II) Module "dri2" already built-in
[   806.384] (II) NVIDIA(0): [DRI2] Setup complete
[   806.384] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[   806.384] (--) RandR disabled
[   806.387] (II) Initializing extension GLX
[   806.387] (II) Indirect GLX disabled.(II) LoadModule: "mouse"
[   806.414] (WW) Warning, couldn't open module mouse
[   806.414] (II) UnloadModule: "mouse"
[   806.414] (II) Unloading mouse
[   806.414] (EE) Failed to load module "mouse" (module does not exist, 0)
[   806.414] (EE) No input driver matching `mouse'
[   806.414] (II) LoadModule: "kbd"
[   806.414] (WW) Warning, couldn't open module kbd
[   806.414] (II) UnloadModule: "kbd"
[   806.414] (II) Unloading kbd
[   806.414] (EE) Failed to load module "kbd" (module does not exist, 0)
[   806.414] (EE) No input driver matching `kbd'
[   806.415] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[   806.415] (II) AutoAddDevices is off - not adding device.
[   806.415] (II) config/udev: Adding input device Video Bus (/dev/input/event3)
[   806.415] (II) AutoAddDevices is off - not adding device.
[   806.415] (II) config/udev: Adding input device Video Bus (/dev/input/event4)
[   806.415] (II) AutoAddDevices is off - not adding device.
[   806.415] (II) config/udev: Adding input device Lid Switch (/dev/input/event0)
[   806.415] (II) AutoAddDevices is off - not adding device.
[   806.415] (II) config/udev: Adding input device Sleep Button (/dev/input/event1)
[   806.415] (II) AutoAddDevices is off - not adding device.
[   806.415] (II) config/udev: Adding drm device (/dev/dri/card0)
[   806.415] (II) xfree86: Adding drm device (/dev/dri/card0)
[   806.415] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[   806.415] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=7 (/dev/input/event8)
[   806.415] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=8 (/dev/input/event9)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=3 (/dev/input/event7)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device La-VIEW Technology Mionix NAOS 7000       (/dev/input/event13)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device La-VIEW Technology Mionix NAOS 7000       (/dev/input/mouse0)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device La-VIEW Technology Mionix NAOS 7000       (/dev/input/event14)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device Integrated Camera (/dev/input/event15)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event10)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.416] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event11)
[   806.416] (II) AutoAddDevices is off - not adding device.
[   806.417] (II) config/udev: Adding input device HDA Intel PCH Headphone (/dev/input/event12)
[   806.417] (II) AutoAddDevices is off - not adding device.
[   806.417] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event5)
[   806.417] (II) AutoAddDevices is off - not adding device.
[   806.417] (II) config/udev: Adding input device ThinkPad Extra Buttons (/dev/input/event6)
[   806.417] (II) AutoAddDevices is off - not adding device.
[   807.965] (II) NVIDIA(GPU-0): Deleting GPU-0
[   807.966] (II) Server terminated successfully (0). Closing log file.
Lekensteyn commented 9 years ago

You need to be root to write to /proc/acpi/bbswitch. The refusal should not be a problem if the card gets disabled later. What is the contents of /proc/acpi/bbswitch after this?

SuperFluffy commented 9 years ago

Hm, I thought having your user be part of the bumblebee group was sufficient? Either way, root access grants the permission, but it doesn't change the (reported) state:

% sudo sh -c 'echo "OFF" > /proc/acpi/bbswitch'
% cat /proc/acpi/bbswitch
0000:08:00.0 ON

The output of dmesg right after looks interesting:

[22507.839352] bbswitch: disabling discrete graphics
[22507.839365] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[22507.852372] ------------[ cut here ]------------
[22507.852379] WARNING: CPU: 1 PID: 17339 at drivers/pci/pci.c:1539 pci_disable_device+0x99/0xb0()
[22507.852380] pci 0000:08:00.0: disabling already-disabled device
[22507.852381] Modules linked in:
[22507.852382]  fuse ctr ccm bnep bluetooth uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common hid_generic videodev usbhid media hid snd_hda_codec_realtek mousedev snd_hda_codec_generic snd_hda_codec_hdmi msr arc4 coretemp intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp iTCO_wdt iTCO_vendor_support iwlmvm kvm mac80211 crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper iwlwifi ablk_helper cryptd serio_raw psmouse cfg80211 snd_hda_intel rtsx_pci_ms snd_hda_controller memstick snd_hda_codec thermal tpm_tis wmi ac battery e1000e tpm i2c_i801 snd_hwdep evdev snd_pcm mac_hid mei_me snd_timer mei ptp lpc_ich shpchp pps_core processor sch_fq_codel thinkpad_acpi nvram snd soundcore led_class rfkill hwmon nfs lockd grace
[22507.852426]  sunrpc fscache acpi_call(O) ext4 crc16 mbcache jbd2 sd_mod rtsx_pci_sdmmc mmc_core atkbd libps2 xhci_pci ahci libahci libata ehci_pci ehci_hcd xhci_hcd scsi_mod usbcore rtsx_pci usb_common i8042 serio bbswitch(O) i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm i2c_core
[22507.852445] CPU: 1 PID: 17339 Comm: zsh Tainted: G           O   3.19.0-1-ARCH #1
[22507.852446] Hardware name: LENOVO 20E1S00N00/20E1S00N00, BIOS N11ET29W (1.05 ) 12/26/2014
[22507.852447]  0000000000000000 000000004c97d89e ffff8801b887bd88 ffffffff8155c81f
[22507.852450]  0000000000000000 ffff8801b887bde0 ffff8801b887bdc8 ffffffff81073aaa
[22507.852452]  ffff8801b887bda8 ffff8802441d9000 ffff88024418d5b0 00000000006b7300
[22507.852454] Call Trace:
[22507.852458]  [<ffffffff8155c81f>] dump_stack+0x4c/0x6e
[22507.852464]  [<ffffffff81073aaa>] warn_slowpath_common+0x8a/0xc0
[22507.852466]  [<ffffffff81073b35>] warn_slowpath_fmt+0x55/0x70
[22507.852469]  [<ffffffff812f528b>] ? __pci_set_master+0x3b/0x100
[22507.852471]  [<ffffffff812f81a9>] pci_disable_device+0x99/0xb0
[22507.852477]  [<ffffffffa000e235>] bbswitch_off+0xb5/0x260 [bbswitch]
[22507.852482]  [<ffffffffa000e635>] bbswitch_proc_write+0xa5/0xbc [bbswitch]
[22507.852485]  [<ffffffff81238b18>] proc_reg_write+0x48/0x70
[22507.852488]  [<ffffffff811d18a7>] vfs_write+0xb7/0x200
[22507.852490]  [<ffffffff811d2569>] SyS_write+0x59/0xd0
[22507.852493]  [<ffffffff815620a9>] system_call_fastpath+0x12/0x17
[22507.852494] ---[ end trace 02e925ea45f0a369 ]---

So is the card turned off but the report simply wrong? The other lines seem to be reminiscent of other bug reports found around here.

Lekensteyn commented 9 years ago

The reported state reflects the actual state. Are you sure that nvidia (and nvidia-uvm if any) are unloaded?

AM2petterk commented 9 years ago

Same problem here.

/proc/acpi/bbswitch shows correct info, "ON" when using for example nvidia-settings, and "OFF" when not. I can verify that the modules are indeed loaded and unloaded as they should. However, dmesg shows:

[ 616.529891] bbswitch: disabling discrete graphics [ 616.529918] ACPI Warning: SB.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires Package [ 616.542061] pci 0000:03:00.0: Refused to change power state, currently in D0

This is on Arch Linux with bbswitch 0.8, bumblebee 3.2.1 and nvidia-352.09 on a Asus UX32LN with Geforce 840M, Intel Core I7 4510U.

qezt commented 9 years ago

same here, dmesg shows:

[ 2316.938180] bbswitch: disabling discrete graphics
[ 2316.938202] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
mirtec001 commented 9 years ago

I'm having the same issue.

[ 576.847212] bbswitch: disabling discrete graphics [ 576.847249] ACPI Warning: SB.PCI0.PEG0.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires Package

Running Ubuntu Mate 15.04

Here's the output of lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [NVS 4200M](rev ff)

palkakrzysiek commented 9 years ago

try sudo chmod 666 /proc/acpi/bbswitch

leoluk commented 9 years ago

The Argument #4 type mismatch message is normal and not indicative of an error.

sharms commented 9 years ago

Using Fedora 22 on a W541:

[root@soar ~]$ cat /proc/acpi/bbswitch 0000:01:00.0 ON [root@soar ~]$ tee /proc/acpi/bbswitch <<<OFF OFF [root@soar ~]$ cat /proc/acpi/bbswitch 0000:01:00.0 ON

Same error message: [ 734.452018] ACPI Warning: SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires Package

jdevelop commented 8 years ago

Confirmed here on 4.2.2-1-ARCH #1 SMP PREEMPT Tue Sep 29 22:21:33 CEST 2015 x86_64 GNU/Linux on Lenovo T540P

robinhad commented 8 years ago

Confirmed here on 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

sysrq-reisub commented 8 years ago

always had this f****\ problem, partially resolved by adding to the kernel the command 'acpi_osi=' and installing some acpi related packages (acpi, acpi_call), before formatting the pc I've also managed to get it fully working, but now the only thing I do is to rmmod manually the nvidia module everytime. PS: I've got no problems before going standby, they came when I resume it. But I think that are acpi problems

jdevelop commented 8 years ago

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=\"!Windows 2013\" acpi_osi=Linux"

This one in /etc/default/grub solves the problem for me. Looks ugly.

robinhad commented 8 years ago

optirun worked perfectly for my Nvidia Geforce 820M and Intel Ivy Bridge on Ubuntu 14.04.1

bmagyar commented 8 years ago

Confirmed here too. Elementary OS Freya (based on Ubuntu 14.04) on Lenovo T440p with Geforce 730M

3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

None of the solutions above works for me.

lsmod | grep nvidia is empty

sudo tee /proc/acpi/bbswitch <<<OFF results in cat /proc/acpi/bbswitch 0000:02:00.0 ON

and what shows up in dmesg after this is [ 558.744432] bbswitch: disabling discrete graphics
[ 558.744457] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)

AM2petterk commented 8 years ago

Can you please try cat /proc/acpi/bbswitch after bbswitch states that the card is off?

Also if you could lsmod | grep nvidia that would help too.

EDIT: Sorry, saw that you already stated that the nvidia module was not loaded.

bmagyar commented 8 years ago

Yeah, but actually I also realized that I forgot to do the sudo update-grub after modifying grub.conf to add acpi_osi=Linux.

Now I belong to the ever growing group of issue #78

Can't these issues be related? Did anyone who has Lenovo T440p with Geforce 730M managed to fix this issue only by adding the acpi line?

klebed commented 8 years ago

Same issue here with T440s. I guess it come after upgrading bios through lenovo crapware utility.

So bbswitch always say, that nvidia card is ON. If I try to sent OFF another time, I get this (bbswitch still reports ON):

[136839.918072] bbswitch: disabling discrete graphics
[136839.918083] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)

If I run glxgears, I see this:

[136903.547105] vgaarb: device changed decodes: PCI:0000:04:00.0,olddecodes=none,decodes=none:owns=none
[136903.547953] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:04:00.0 on minor 1
[136903.547959] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  340.96  Sun Nov  8 22:33:28 PST 2015
[136903.565979] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.566061] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.566119] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.566175] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.566232] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.566436] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.566617] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.566675] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.604973] ACPI Error: Field [TBF3] at 524288 exceeds Buffer [NULL] size 262144 (bits) (20141107/dsopcode-236)
[136903.604978] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG_.VID_.GETB] (Node ffff8803318b4be0), AE_AML_BUFFER_LIMIT (20141107/psparse-536)
[136903.604982] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG_.VID_._ROM] (Node ffff8803318b4bb8), AE_AML_BUFFER_LIMIT (20141107/psparse-536)
[136903.605681] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136903.777764] thinkpad_acpi: asked for hotkey mask 0x0070ffbf, but firmware forced it to 0x0070ffbb
[136910.257821] [drm] Module unloaded
[136910.304604] bbswitch: disabling discrete graphics
[136910.304612] ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[136910.319494] pci 0000:04:00.0: Refused to change power state, currently in D0
ArchangeGabriel commented 8 years ago

People, please be more accurate when reporting things. ;)

So, what we have here:

Now, the real issues:

I’m closing this cluttered thread, if you don’t know what you should do you may still ask here so that I can tell you what to do given your situation.

klebed commented 8 years ago

ArchangeGabriel,

I'm sure that nothing is using discrete card, I've checked that and didn't noted it, assuming it's obvious. lsmod shows, that nvidia driver is unloaded. It's just bbswitch issue, I guess. And it is very annoying. This issue causes card to drain my batteries so quickly! I want to get rid of it, but, right now, have no clue how. If you can guide me where to dig, and how to debug this, it will be helpful.

ArchangeGabriel commented 8 years ago

@klebed Did you take a look at #112? You might be concerned. If not, please open a new issue with following information:

Title: [T440s] bbswitch can’t turn card OFF

Post your BIOS version (especially date if available), a dmesg log right after booting and one after running optirun (bash, glxinfo or whatever).

AM2petterk commented 8 years ago

In Linux 4.3.3.3 (Arch x64):

[15943.514684] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  358.16  Mon Nov 16 18:58:09 PST 2015
[15979.104775] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150818/nsarguments-95)
[15979.112829] nvidia-modeset: Unloading
[15979.118159] nvidia-nvlink: Unregistered the Nvlink Core, major device number 246
[15979.118456] [drm] Module unloaded
[15979.125702] bbswitch: disabling discrete graphics
[15979.125711] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150818/nsarguments-95)
[15979.137791] pci 0000:03:00.0: Refused to change power state, currently in D0
[petterk@petterk-linux ~]$ cat /proc/acpi/bbswitch 
0000:03:00.0 OFF
AM2petterk commented 8 years ago

Update:

lspci shows change to:

03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M](rev ff)

and modules in unloading as they should. Is the "currently in D0" benign?

ArchangeGabriel commented 8 years ago

@petter3k Sorry for the delay, and yes, this message is benign. ;)