Comment 7 for bug 1318040

Revision history for this message
Guillaume Millet (guimillet) wrote :

$ sudo modprobe bbswitch load_state=-1
dmesg log:
[ 2780.584599] bbswitch: module verification failed: signature and/or required key missing - tainting kernel
[ 2780.584809] bbswitch: version 0.7
[ 2780.584818] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.VGA_
[ 2780.584830] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.P0P1.VGA_
[ 2780.584843] ACPI Warning: \_SB_.PCI0.P0P1.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
[ 2780.584892] ACPI Warning: \_SB_.PCI0.P0P1.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
[ 2780.584982] bbswitch: detected a nVidia _DSM function
[ 2780.584999] pci 0000:01:00.0: enabling device (0000 -> 0003)
[ 2780.585046] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[ 2790.596471] init: Failed to spawn nvidia-persistenced main process: unable to execute: No such file or directory

$ lspci -nnvvd10de:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218M [GeForce G210M] [10de:0a74] (rev a2) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device [1043:1bc2]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
        Region 1: Memory at e0000000 (64-bit, prefetchable) size=256M]
        Region 3: Memory at fa000000 (64-bit, prefetchable) [size=32M]
        Region 5: I/O ports at dc00 [size=128]
        Expansion ROM at fe980000 [disabled] [size=512K]
        Capabilities: <access denied>

01:00.1 Audio device [0403]: NVIDIA Corporation High Definition Audio Controller [10de:0be3] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device [1043:1bc2]
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at fe97c000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel

$ sudo tee /proc/acpi/bbswitch <<<OFF
OFF

dmesg log:
[ 3058.083676] bbswitch: disabling discrete graphics
[ 3058.096117] ACPI Warning: \_SB_.PCI0.P0P1.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
[ 3058.200492] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=none,decodes=io+mem:owns=none
[ 3058.312204] ------------[ cut here ]------------
[ 3058.312216] WARNING: CPU: 0 PID: 4 at /build/buildd/linux-3.13.0/fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
[ 3058.312219] sysfs group ffffffff81cabae0 not found for kobject 'acpi_video1'
[ 3058.312221] Modules linked in: bbswitch(OF) hid_generic cdc_acm usbhid hid snd_hrtimer ip6table_filter ip6_tables iptable_filter ip_tables x_tables cuse bnep rfcomm bluetooth binfmt_misc dm_crypt snd_hda_codec_hdmi arc4 uvcvideo ath9k ath9k_common ath9k_hw videobuf2_vmalloc videobuf2_memops snd_hda_codec_realtek videobuf2_core ath mac80211 snd_hda_intel videodev snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq cfg80211 snd_seq_device snd_timer kvm_intel kvm snd soundcore parport_pc mxm_wmi ppdev asus_laptop joydev coretemp serio_raw wmi sparse_keymap input_polldev lp parport mac_hid lpc_ich usb_storage psmouse ahci libahci atl1c i915 i2c_algo_bit drm_kms_helper drm video
[ 3058.312294] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: GF O 3.13.0-32-generic #57-Ubuntu
[ 3058.312297] Hardware name: ASUSTeK Computer Inc. UL80VT /UL80VT , BIOS 214 01/17/2011
[ 3058.312302] Workqueue: kacpi_hotplug acpi_hotplug_work_fn
[ 3058.312304] 0000000000000009 ffff880139b55ac8 ffffffff8171bcb4 ffff880139b55b10
[ 3058.312309] ffff880139b55b00 ffffffff810676cd 0000000000000000 ffffffff81cabae0
[ 3058.312312] ffff8800361b30a8 ffff8801395f7098 ffff8801395ac3c8 ffff880139b55b60
[ 3058.312316] Call Trace:
[ 3058.312323] [<ffffffff8171bcb4>] dump_stack+0x45/0x56
[ 3058.312328] [<ffffffff810676cd>] warn_slowpath_common+0x7d/0xa0
[ 3058.312331] [<ffffffff8106773c>] warn_slowpath_fmt+0x4c/0x50
[ 3058.312335] [<ffffffff8123446e>] ? sysfs_get_dirent_ns+0x4e/0x70
[ 3058.312338] [<ffffffff81235756>] sysfs_remove_group+0xc6/0xd0
[ 3058.312343] [<ffffffff814998c3>] dpm_sysfs_remove+0x43/0x50
[ 3058.312348] [<ffffffff8148f2c5>] device_del+0x45/0x1c0
[ 3058.312351] [<ffffffff8148f45e>] device_unregister+0x1e/0x60
[ 3058.312355] [<ffffffff813dd028>] backlight_device_unregister+0x98/0xa0
[ 3058.312365] [<ffffffffa0000bdd>] acpi_video_bus_remove+0xd8/0x1d9 [video]
[ 3058.312370] [<ffffffff813ed2f0>] acpi_device_remove+0x80/0x9f
[ 3058.312375] [<ffffffff81492fdf>] __device_release_driver+0x7f/0xf0
[ 3058.312378] [<ffffffff81493073>] device_release_driver+0x23/0x30
[ 3058.312382] [<ffffffff813edf67>] acpi_bus_device_detach+0x57/0x5b
[ 3058.312386] [<ffffffff813ee3da>] acpi_bus_trim+0x3f/0x74
[ 3058.312391] [<ffffffff813bd6ec>] acpiphp_bus_trim+0x2c/0x30
[ 3058.312395] [<ffffffff813bdb4a>] disable_slot+0xaa/0xd0
[ 3058.312398] [<ffffffff813bdc88>] acpiphp_check_bridge+0x118/0x120
[ 3058.312402] [<ffffffff813beab7>] hotplug_event+0x117/0x260
[ 3058.312406] [<ffffffff813bec2a>] hotplug_event_work+0x2a/0x70
[ 3058.312409] [<ffffffff813e9d3e>] acpi_hotplug_work_fn+0x1c/0x27
[ 3058.312415] [<ffffffff810838f2>] process_one_work+0x182/0x450
[ 3058.312418] [<ffffffff810846e1>] worker_thread+0x121/0x410
[ 3058.312422] [<ffffffff810845c0>] ? rescuer_thread+0x430/0x430
[ 3058.312426] [<ffffffff8108b3d2>] kthread+0xd2/0xf0
[ 3058.312429] [<ffffffff8108b300>] ? kthread_create_on_node+0x1d0/0x1d0
[ 3058.312434] [<ffffffff8172c5bc>] ret_from_fork+0x7c/0xb0
[ 3058.312438] [<ffffffff8108b300>] ? kthread_create_on_node+0x1d0/0x1d0
[ 3058.312440] ---[ end trace a09392417cf927a4 ]---

$ lspci -nnvvd10de:

$ sudo tee /proc/acpi/bbswitch <<<ON
ON

dmesg log:
[ 3324.089004] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 3324.089076] IP: [<ffffffff8139c754>] pci_bus_read_config_dword+0x64/0x90
[ 3324.089125] PGD 4673d067 PUD 4e1a4067 PMD 0
[ 3324.089157] Oops: 0000 [#1] SMP
[ 3324.089181] Modules linked in: bbswitch(OF) hid_generic cdc_acm usbhid hid snd_hrtimer ip6table_filter ip6_tables iptable_filter ip_tables x_tables cuse bnep rfcomm bluetooth binfmt_misc dm_crypt snd_hda_codec_hdmi arc4 uvcvideo ath9k ath9k_common ath9k_hw videobuf2_vmalloc videobuf2_memops snd_hda_codec_realtek videobuf2_core ath mac80211 snd_hda_intel videodev snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq cfg80211 snd_seq_device snd_timer kvm_intel kvm snd soundcore parport_pc mxm_wmi ppdev asus_laptop joydev coretemp serio_raw wmi sparse_keymap input_polldev lp parport mac_hid lpc_ich usb_storage psmouse ahci libahci atl1c i915 i2c_algo_bit drm_kms_helper drm video
[ 3324.089667] CPU: 1 PID: 4103 Comm: tee Tainted: GF W O 3.13.0-32-generic #57-Ubuntu
[ 3324.089719] Hardware name: ASUSTeK Computer Inc. UL80VT /UL80VT , BIOS 214 01/17/2011
[ 3324.089775] task: ffff880063b347d0 ti: ffff8800b02e2000 task.ti: ffff8800b02e2000
[ 3324.089815] RIP: 0010:[<ffffffff8139c754>] [<ffffffff8139c754>] pci_bus_read_config_dword+0x64/0x90
[ 3324.089872] RSP: 0018:ffff8800b02e3e48 EFLAGS: 00010046
[ 3324.089910] RAX: 0000000000000000 RBX: ffffea0001a9e180 RCX: 0000000000000004
[ 3324.089949] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffea0001a9e180
[ 3324.089988] RBP: ffff8800b02e3e70 R08: ffff8800b02e3e54 R09: ffff8800495454d4
[ 3324.090027] R10: 0000000000000001 R11: 0000000000000246 R12: ffff8800b02e3e84
[ 3324.090066] R13: 0000000000000246 R14: 0000000000000003 R15: 0000000000000008
[ 3324.090106] FS: 00007f9deaff4740(0000) GS:ffff88013fd00000(0000) knlGS:0000000000000000
[ 3324.090160] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 3324.090191] CR2: 0000000000000000 CR3: 00000000467cc000 CR4: 00000000000407e0
[ 3324.090231] Stack:
[ 3324.090247] 0000000000000000 0000000000000002 0000000000000003 ffff8800b02e3eb8
[ 3324.090301] ffff8800b02e3f50 ffff8800b02e3e88 ffffffffa061a086 ffff880139a7b000
[ 3324.090354] ffff8800b02e3ea8 ffffffffa061a3d1 ffff8800b02e3ef8 000000006f3b5897
[ 3324.090406] Call Trace:
[ 3324.090426] [<ffffffffa061a086>] is_card_disabled+0x26/0x40 [bbswitch]
[ 3324.090465] [<ffffffffa061a3d1>] bbswitch_on+0x21/0x140 [bbswitch]
[ 3324.090502] [<ffffffffa061a605>] bbswitch_proc_write+0xa5/0xac [bbswitch]
[ 3324.090551] [<ffffffff81222c4d>] proc_reg_write+0x3d/0x80
[ 3324.090592] [<ffffffff811bcb64>] vfs_write+0xb4/0x1f0
[ 3324.090630] [<ffffffff811bd599>] SyS_write+0x49/0xa0
[ 3324.090663] [<ffffffff8172c87f>] tracesys+0xe1/0xe6
[ 3324.090695] Code: 81 49 89 cc 89 55 d8 89 75 dc e8 68 75 38 00 49 89 c5 48 8b 83 b8 00 00 00 4c 8d 45 e4 8b 55 d8 8b 75 dc 48 89 df b9 04 00 00 00 <ff> 10 89 c3 8b 45 e4 4c 89 ee 48 c7 c7 40 d8 fb 81 41 89 04 24
[ 3324.090974] RIP [<ffffffff8139c754>] pci_bus_read_config_dword+0x64/0x90
[ 3324.091024] RSP <ffff8800b02e3e48>
[ 3324.091044] CR2: 0000000000000000
[ 3324.092403] ---[ end trace a09392417cf927a5 ]---

$ lspci -nnvvd10de:
(nothing)