Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot turn Nvidia GPU off #195

Open
felikskiszkurno opened this issue Mar 30, 2020 · 2 comments
Open

Cannot turn Nvidia GPU off #195

felikskiszkurno opened this issue Mar 30, 2020 · 2 comments

Comments

@felikskiszkurno
Copy link

felikskiszkurno commented Mar 30, 2020

Hi,
I am trying to use configure package suse-prime, that uses bbswitch to power on and off my nvidia gpu. However for some reason powering nvidia off is impossible, even with unloaded kernel modules.
I have disscussed this issue on suse-prime github, but so far it seems (if I understand it correctly), that the issue is, that bbswitch is having problem with disabling nvidia on my system.

Link to suse-prime issue:
openSUSE/SUSEPrime#50

Machine description:
ThinkPad W541
GPU: Intel + Nvidia Quadro K1100M
OS: openSUSE Tumbleweed
Kernel: 5.5.11

Output of dmesg | grep -C 10 bbswitch:

[ 3.255905] systemd[1]: Listening on udev Kernel Socket.
[ 3.255912] systemd[1]: Reached target Sockets.
[ 3.256347] systemd[1]: Started Entropy Daemon based on the HAVEGE algorithm.
[ 3.256878] systemd[1]: Starting Create list of static device nodes for the current kernel...
[ 3.257806] systemd[1]: Starting Journal Service...
[ 3.258451] systemd[1]: Starting Load Kernel Modules...
[ 3.259256] systemd[1]: Starting Setup Virtual Console...
[ 3.259741] systemd[1]: Started Create list of static device nodes for the current kernel.
[ 3.260331] systemd[1]: Starting Create Static Device Nodes in /dev...
[ 3.264463] systemd[1]: Started Create Static Device Nodes in /dev.
[ 3.265038] bbswitch: loading out-of-tree module taints kernel.
[ 3.265190] bbswitch: version 0.8
[ 3.265195] bbswitch: Found integrated VGA device 0000:00:02.0: _SB_.PCI0.VID_
[ 3.265201] bbswitch: Found discrete VGA device 0000:01:00.0: _SB_.PCI0.PEG_.VID_
[ 3.265211] ACPI Warning: _SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20191018/nsarguments-59)
[ 3.265556] bbswitch: detected an Optimus _DSM function
[ 3.265565] pci 0000:01:00.0: enabling device (0000 -> 0003)
[ 3.265597] bbswitch: disabling discrete graphics
[ 3.282766] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[ 3.284368] alua: device handler registered
[ 3.285193] emc: device handler registered
[ 3.286159] rdac: device handler registered
[ 3.296124] device-mapper: uevent: version 1.0.3
[ 3.296193] device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: dm-devel@redhat.com
[ 3.301294] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 3.301316] sd 5:0:0:0: Attached scsi generic sg1 type 0
[ 3.302147] systemd[1]: Started Load Kernel Modules.
[ 3.302796] systemd[1]: Starting Apply Kernel Variables...
[ 3.306963] systemd[1]: Started Apply Kernel Variables.

[ 71.467700] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 71.467702] Bluetooth: BNEP filters: protocol multicast
[ 71.467705] Bluetooth: BNEP socket layer initialized
[ 74.886620] wlp3s0: authenticate with 46:d9:e7:fb:5e:9d
[ 74.889676] wlp3s0: send auth to 46:d9:e7:fb:5e:9d (try 1/3)
[ 74.893889] wlp3s0: authenticated
[ 74.894702] wlp3s0: associate with 46:d9:e7:fb:5e:9d (try 1/3)
[ 74.900250] wlp3s0: RX AssocResp from 46:d9:e7:fb:5e:9d (capab=0x411 status=0 aid=2)
[ 74.901777] wlp3s0: associated
[ 74.931428] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
[ 96.392264] bbswitch: disabling discrete graphics
[ 96.393791] ------------[ cut here ]------------
[ 96.393796] pci 0000:01:00.0: disabling already-disabled device
[ 96.393831] WARNING: CPU: 0 PID: 3205 at drivers/pci/pci.c:1971 pci_disable_device+0x8c/0xb0
[ 96.393833] Modules linked in: ccm bnep fuse af_packet scsi_transport_iscsi xt_tcpudp ip6t_REJECT nf_reject_ipv6 ip6t_rpfilter ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ebtable_broute ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nfnetlink ebtable_filter ebtables uvcvideo rmi_smbus rmi_core videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc vboxnetadp(O) vboxnetflt(O) ip6table_filter ip6_tables btusb iptable_filter btrtl ip_tables btbcm btintel intel_rapl_msr x_tables intel_rapl_common bpfilter bluetooth ecdh_generic x86_pkg_temp_thermal ecc intel_powerclamp coretemp kvm_intel vboxdrv(O) dmi_sysfs iwlmvm kvm tun irqbypass mac80211 msr libarc4 iTCO_wdt crct10dif_pclmul iTCO_vendor_support crc32_pclmul iwlwifi snd_hda_codec_realtek ghash_clmulni_intel snd_hda_codec_generic snd_hda_codec_hdmi mei_me aesni_intel snd_hda_intel
[ 96.393897] crypto_simd cfg80211 cryptd e1000e joydev snd_intel_dspcfg pcspkr mei glue_helper snd_hda_codec wmi_bmof i2c_i801 lpc_ich snd_hda_core snd_hwdep thinkpad_acpi snd_pcm ledtrig_audio rfkill thermal snd_timer snd ac soundcore ie31200_edac xfs binfmt_misc uas usb_storage hid_generic usbhid btrfs blake2b_generic libcrc32c xor i915 raid6_pq i2c_algo_bit drm_kms_helper xhci_pci syscopyarea xhci_hcd sysfillrect sysimgblt fb_sys_fops drm ehci_pci ehci_hcd crc32c_intel sdhci_pci cqhci usbcore sdhci mmc_core serio_raw wmi battery video button sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua bbswitch(O)
[ 96.393953] CPU: 0 PID: 3205 Comm: bash Tainted: G O 5.5.11-1-default #1 openSUSE Tumbleweed (unreleased)
[ 96.393955] Hardware name: LENOVO 20EGS15J0N/20EGS15J0N, BIOS GNET90WW (2.38 ) 03/25/2019
[ 96.393962] RIP: 0010:pci_disable_device+0x8c/0xb0
[ 96.393967] Code: 4d 85 e4 75 07 4c 8b a3 b0 00 00 00 48 8d bb b0 00 00 00 e8 46 b6 15 00 4c 89 e2 48 c7 c7 d8 a3 d6 bd 48 89 c6 e8 c6 f0 b3 ff <0f> 0b eb 8e 48 89 df e8 e8 fe ff ff 80 a3 e9 07 00 00 df 5b 41 5c
[ 96.393969] RSP: 0018:ffffb21ec19c7e58 EFLAGS: 00010282
[ 96.393973] RAX: 0000000000000000 RBX: ffff8a7b1d1c8000 RCX: 0000000000000000
[ 96.393975] RDX: 0000000000000033 RSI: ffffffffbe7a9bb3 RDI: 0000000000000246
[ 96.393977] RBP: 00005578584f0a30 R08: 0000001671849a53 R09: 0000000000000033
[ 96.393979] R10: ffffffffbe7a9f60 R11: 00000000be7a9b83 R12: ffff8a7b1d184e30
[ 96.393981] R13: ffffb21ec19c7f08 R14: 00005578584f0a30 R15: 0000000000000000
[ 96.393985] FS: 00007fbda411cb80(0000) GS:ffff8a7b20400000(0000) knlGS:0000000000000000
[ 96.393987] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 96.393989] CR2: 00005578584f0a31 CR3: 000000085bf80006 CR4: 00000000001606f0
[ 96.393991] Call Trace:
[ 96.394008] bbswitch_off.cold+0xc1/0x1d1 [bbswitch]
[ 96.394014] bbswitch_proc_write+0x90/0xa0 [bbswitch]
[ 96.394022] proc_reg_write+0x3c/0x60
[ 96.394028] vfs_write+0xb6/0x1a0
[ 96.394032] ksys_write+0x5f/0xe0
[ 96.394042] do_syscall_64+0x64/0x240
[ 96.394050] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 96.394054] RIP: 0033:0x7fbda4299563
[ 96.394058] Code: 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
[ 96.394060] RSP: 002b:00007fff28cc19f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 96.394063] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fbda4299563
[ 96.394065] RDX: 0000000000000004 RSI: 00005578584f0a30 RDI: 0000000000000001
[ 96.394067] RBP: 00005578584f0a30 R08: 000000000000000a R09: 0000000000000003
[ 96.394068] R10: 0000557856b4f60c R11: 0000000000000246 R12: 0000000000000004
[ 96.394070] R13: 00007fbda4369500 R14: 0000000000000004 R15: 00007fbda4369700
[ 96.394076] ---[ end trace e7766d169f3419cf ]---
[ 690.607238] BTRFS info (device sda2): qgroup scan completed (inconsistency flag cleared)
[ 3260.617206] bbswitch: disabling discrete graphics

Output from uname -a:
5.5.11-1-default #1 SMP Sat Mar 21 11:11:19 UTC 2020 (794b2e9) x86_64 x86_64 x86_64 GNU/Linux

Xorg version 1.20.7 (I am not sure if this is correct).

I am using driver G04 from openSUSE community repo, it contains driver 390.116.

@felikskiszkurno
Copy link
Author

Executing tee /proc/acpi/bbswitch <<<OFF and dmesg |tail -1 results in:

[ 9896.545262] bbswitch: disabling discrete graphics
However cat /proc/acpi/bbswitch results in:
0000:01:00.0 ON
so bbswitch has failed to turn nvidia off.

@felikskiszkurno
Copy link
Author

I am sorry but I cannot supply the output of get-acpi-info.sh script.
There are some dependencies, that I cannot install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant