openSUSE / SUSEPrime

Provide nvidia-prime like package for openSUSE
64 stars 11 forks source link

Bbswitch module not found. NVIDIA card will not be powered off #72

Closed sith-on-mars closed 2 years ago

sith-on-mars commented 2 years ago

I'm on the latest freshly installed Tumbleweed KDE 20211016. My bbswitch version is 0.8-11.35 and my suse-prime version is 0.8.2-3.1. It seems the bbswitch module can't be recognised although it's already installed. Here is the output:

/usr/sbin/prime-select get-current
Driver configured: intel
bbswitch module not found. NVIDIA card will not be powered off
sndirsch commented 2 years ago

Looks like the module cannot be found. Please make sure that also bbswitch-kmp-default package is installed. Then check what 'modinfo bbswitch' tells you.

sith-on-mars commented 2 years ago

Thank you very much! Bbswitch-kmp-default package is installed already. Here is the output:

filename:       /lib/modules/5.14.11-1-default/updates/bbswitch.ko
version:        0.8
author:         Peter Wu <lekensteyn@gmail.com>
description:    Toggle the discrete graphics card
license:        GPL
suserelease:    openSUSE Tumbleweed
srcversion:     F8460415C0EB4A28A7209CF
depends:        
retpoline:      Y
name:           bbswitch
vermagic:       5.14.11-1-default SMP mod_unload modversions 
sig_id:         PKCS#7
signer:         openSUSE Secure Boot CA
sig_key:        FA:BE:D8:BF:40:9A:5E:64
sig_hashalgo:   sha256
signature:      31:06:03:78:0B:90:21:9C:C8:30:A6:01:6F:5C:3D:9B:90:97:27:BE:
                AD:F3:3E:4F:61:30:AB:72:F5:48:51:57:91:63:9E:70:A4:4E:7A:9D:
                4A:3D:37:21:3F:1D:31:93:AB:E2:B2:1C:A3:4F:74:AF:4B:0B:02:BF:
                A8:D0:6F:B0:52:FA:36:DF:FF:72:79:11:06:3F:3F:22:C4:B4:77:E1:
                D3:C3:DD:52:75:D5:1D:AD:4C:AF:02:B2:3D:B1:4E:D8:6A:4A:A1:96:
                FF:6C:80:3D:07:32:0E:51:F9:DC:D7:CF:42:4A:82:B1:23:95:5C:17:
                88:17:FC:63:44:02:A4:E4:83:CA:24:BC:1E:8C:64:B3:A2:83:CB:8F:
                A1:15:80:B8:B1:C4:76:9E:7B:0D:40:BA:51:88:FE:02:BC:AB:DB:97:
                D4:36:3D:CF:A6:AF:75:C7:2B:EA:25:C7:C3:3C:1D:71:25:D5:83:C0:
                C9:E3:35:A8:60:36:39:4F:E7:33:D5:B4:8B:AB:E7:87:39:63:BA:49:
                73:7F:05:90:0E:7B:E7:35:72:36:0E:1E:61:99:B9:8E:6E:53:66:4B:
                6D:F1:D6:6E:68:4D:0A:56:DB:E6:65:1F:53:1B:9B:49:C7:B9:06:71:
                F0:B2:DC:D4:22:43:FA:71:F0:EA:3B:B7:98:06:77:9E
parm:           load_state:Initial card state (0 = off, 1 = on, -1 = unchanged) (int)
parm:           unload_state:Card state on unload (0 = off, 1 = on, -1 = unchanged) (int)
parm:           skip_optimus_dsm:Skip probe of Optimus discrete DSM (default = false) (bool)
sndirsch commented 2 years ago

Weird. That should never happen.

prime-select.sh [...] function bbcheck {

searching module is better than rpm package because there are other bbswitch providers like dkms-bbswitch

if ! [ $(modinfo bbswitch 2> /dev/null | wc -c) = 0 ]; then
[...]
else
    #should never happen with suse-prime-bbswitch package as bbswitch is a dependency
    echo "bbswitch module not found. NVIDIA card will not be powered off"
fi

[...]

sith-on-mars commented 2 years ago

If I put /usr/sbin/prime-select get-current without sudo, it says bbswitch module not found. But if I put it with sudo, or simply just sudo prime-select get-current, the output will be [bbswitch] NVIDIA card is OFF.

In the older suse-prime version, putting /usr/sbin/prime-select get-current without sudo would always get the output [bbswitch] NVIDIA card is OFF.

sndirsch commented 2 years ago

Thanks. This helps a lot. What we need is a

export PATH=/sbin:/usr/sbin:$PATH

line at the beginning of the prime-select script

sndirsch commented 2 years ago

I made a new release 0.8.4 with that change. Also already submitted for Tumbleweed.