Bug 1221209 - Intel UHD P630/NVIDIA Quadro P3200: suse-prime won't switch to Intel mode + bbswitch no longer available and not working either
Summary: Intel UHD P630/NVIDIA Quadro P3200: suse-prime won't switch to Intel mode + b...
Status: RESOLVED WONTFIX
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: X11 3rd Party Driver (show other bugs)
Version: Leap 15.6
Hardware: x86-64 Other
: P3 - Medium : Normal (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: Stefan Dirsch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-10 09:31 UTC by Andreas
Modified: 2024-03-20 20:40 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
error (695.78 KB, image/jpeg)
2024-03-10 09:31 UTC, Andreas
Details
dmesg (107.38 KB, text/plain)
2024-03-12 13:30 UTC, Andreas
Details
offload mode error (571.31 KB, image/jpeg)
2024-03-12 13:56 UTC, Andreas
Details
dmesg bbswitch (106.78 KB, text/plain)
2024-03-12 20:54 UTC, Andreas
Details
journald switching from offload to intel (49.71 KB, text/plain)
2024-03-17 15:28 UTC, Andreas
Details
kernel log switching from offload to intel (63.82 KB, text/plain)
2024-03-17 15:28 UTC, Andreas
Details
journald switching from offload to nvidia (85.04 KB, text/plain)
2024-03-17 15:32 UTC, Andreas
Details
kernel log switching from offload to nvidia (73.11 KB, text/plain)
2024-03-17 15:33 UTC, Andreas
Details
nvidia 470, Leap 15.5 (293.07 KB, text/plain)
2024-03-20 20:35 UTC, Andreas
Details
nvidia 550, Leap 15.5 (296.09 KB, text/plain)
2024-03-20 20:36 UTC, Andreas
Details
nvidia 550, Leap 15.6 (271.95 KB, text/plain)
2024-03-20 20:37 UTC, Andreas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2024-03-10 09:31:10 UTC
Created attachment 873379 [details]
error

GPU: Intel UHD P630 and NVIDIA Quadro P3200
NVIDIA driver tested: 470.239.06, 550.54.14

When I try to switch from offload and nvidia modes to intel mode, I get into the terminal, Plasma does not start.

After prime-select intel and logging out, I end up on the login screen in tty F1, switch to F2, log in, run startx, Plasma loads in Intel mode. I try to switch back to offload or nvidia mode, after logging out I end up back in tty and see the following error:
waiting for X server to shut down (II) Server terminated successfully (0), Closing log file,: No such file or directoryError: Can not contact kdeinit5!org.kde.startup: () exited with code 255startkde: Starting up...start

I can then again launch Plasma in Intel mode via startx, but to return to offload, I need to reboot the system.

Instead of startx I try startplasma-x11 and get the following error:
$DISPLAY is not set or cannot connect to the X server.

sudo startplasma-x11
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
$DISPLAY is not set or cannot connect to the X server.

startplasma-wayland starts Plasma in Intel Mode. But when I want to return to offload mode, start-wayland gives the following error:
Error: could not determine $DISPLAY.
Error: Can not contact kdeinit5!
org.kde.startup: "kdeinit5_shutdown" () exited with code 255
startplasma-wayland: Shutting down...
startplasmacompositor: Shutting down...
startplasmacompositor: Done.

or on the second attempt starts a session in Intel mode.
Comment 1 Stefan Dirsch 2024-03-10 12:25:04 UTC
Thanks I will try to reproduce this on a recent Optimus laptop.

Lenovo Thinkpad P16 Gen 1 with 

  NVIDIA RTX A1000 

I will check which Intel GPU.
Comment 2 Andreas 2024-03-11 01:58:02 UTC
I tried supergfxctl and switching between intel and hybrid mode works perfect.
https://gitlab.com/asus-linux/supergfxctl
https://build.opensuse.org/package/show/home:RN:supergfxctl/supergfxctl
https://build.opensuse.org/package/show/home:RN:supergfxctl/supergfxctl-plasmoid

Moreover, it disables my nvidia card, unlike bbswitch
cat /sys/devices/pci0000\:00/0000\:00\:01.0/power_state
D3cold

Unfortunately, it’s not in the openSUSE repositories, and Leap 15.6 doesn’t even have bbswitch.

Maybe it's possible to integrate supergfxctl with suse-prime? supergfxctl cannot switch to nvidia mode and to install it, you need to remove suse-prime.
Comment 3 Stefan Dirsch 2024-03-11 14:17:14 UTC
(In reply to Andreas from comment #2)
> I tried supergfxctl and switching between intel and hybrid mode works
> perfect.
> https://gitlab.com/asus-linux/supergfxctl
> https://build.opensuse.org/package/show/home:RN:supergfxctl/supergfxctl
> https://build.opensuse.org/package/show/home:RN:supergfxctl/supergfxctl-
> plasmoid

Never heard about this tool ...

> Moreover, it disables my nvidia card, unlike bbswitch
> cat /sys/devices/pci0000\:00/0000\:00\:01.0/power_state
> D3cold

This reminds me to 

  https://github.com/openSUSE/SUSEPrime/issues/74

I'm afraid bbswitch is still needed.

> Unfortunately, it’s not in the openSUSE repositories, and Leap 15.6 doesn’t
> even have bbswitch.

I would call this a bug. It's still being used by suse-prime if installed.




> 
> Maybe it's possible to integrate supergfxctl with suse-prime? supergfxctl
> cannot switch to nvidia mode and to install it, you need to remove
> suse-prime.
Comment 4 Stefan Dirsch 2024-03-11 15:38:22 UTC
Ok. First results. Installed nvidia packages

# rpm -qa | grep nvidia
nvidia-gl-G06-32bit-550.54.14-lp156.20.1.x86_64
nvidia-compute-utils-G06-550.54.14-lp156.20.1.x86_64
kernel-firmware-nvidia-gspx-G06-550.54.14-150600.1.1.x86_64
nvidia-video-G06-32bit-550.54.14-lp156.20.1.x86_64
nvidia-compute-G06-32bit-550.54.14-lp156.20.1.x86_64
nvidia-drivers-G06-550.54.14-lp156.20.1.x86_64
nvidia-utils-G06-550.54.14-lp156.20.1.x86_64
nvidia-video-G06-550.54.14-lp156.20.1.x86_64
kernel-firmware-nvidia-20240201-150600.1.1.noarch
nvidia-open-driver-G06-signed-kmp-default-550.54.14_k6.4.0_150600.9-150600.2.1.x86_64
nvidia-gl-G06-550.54.14-lp156.20.1.x86_64
nvidia-drivers-minimal-G06-550.54.14-lp156.20.1.x86_64
nvidia-compute-G06-550.54.14-lp156.20.1.x86_64

--> glxinfo -B |  grep "OpenGL renderer" --> Mesa ...

Then ran

  prime-select nvidia

log out, log in

--> glxinfo -B |  grep "OpenGL renderer" --> nvidia ...

Then ran 

  rime-select intel (bbswitch not installed; indeed it's not available on/for Leap 15.6)

log out, log in 

--> glxinfo -B |  grep "OpenGL renderer" --> Mesa ...

More to follow tomorrow (like "offload" mode).
Comment 5 Andreas 2024-03-11 22:24:12 UTC
(In reply to Stefan Dirsch from comment #3)
> 
> This reminds me to 
> 
>   https://github.com/openSUSE/SUSEPrime/issues/74
> 
> I'm afraid bbswitch is still needed.
> 
> > Unfortunately, it’s not in the openSUSE repositories, and Leap 15.6 doesn’t
> > even have bbswitch.

I can’t check because bbswitch is not in the repository.

> 
> I would call this a bug. It's still being used by suse-prime if installed.

I also think it's needed.

> I would call this a bug. It's still being used by suse-prime if installed.

I found this discussion
https://code.opensuse.org/leap/features/issue/142

>  rime-select intel (bbswitch not installed; indeed it's not available on/for > Leap 15.6)
>
> log out, log in 

So Intel mode works for you.
Comment 6 Stefan Dirsch 2024-03-12 12:05:10 UTC
(In reply to Andreas from comment #5)
> (In reply to Stefan Dirsch from comment #3)
> > 
> > This reminds me to 
> > 
> >   https://github.com/openSUSE/SUSEPrime/issues/74
> > 
> > I'm afraid bbswitch is still needed.
> > 
> > > Unfortunately, it’s not in the openSUSE repositories, and Leap 15.6 doesn’t
> > > even have bbswitch.
> 
> I can’t check because bbswitch is not in the repository.
> > 
> > I would call this a bug. It's still being used by suse-prime if installed.
> 
> I also think it's needed.
> 
> > I would call this a bug. It's still being used by suse-prime if installed.
> 
> I found this discussion
> https://code.opensuse.org/leap/features/issue/142

Thanks. Now I remember. We no longer have found anyone interested in supporting it. I just enabled build against Leap 15.6. Could you 
give it a try by adding the X11:Bumblebee repository

  zypper ar https://download.opensuse.org/repositories/X11:/Bumblebee/15.6/  X11:Bumblebee

Then install 'bbswitch'  (and 'bbswitch-kmp-<kernel-flavor>') with that repository in place.

> >  rime-select intel (bbswitch not installed; indeed it's not available on/for > Leap 15.6)
> >
> > log out, log in 
> 
> So Intel mode works for you.

Yes. But I have different hardware as you have.
Comment 7 Stefan Dirsch 2024-03-12 12:25:11 UTC
(In reply to Stefan Dirsch from comment #6)
> > I found this discussion
> > https://code.opensuse.org/leap/features/issue/142
> 
> Thanks. Now I remember. We no longer have found anyone interested in
> supporting it. I just enabled build against Leap 15.6. Could you 
> give it a try by adding the X11:Bumblebee repository
> 
>   zypper ar https://download.opensuse.org/repositories/X11:/Bumblebee/15.6/ 
> X11:Bumblebee
> 
> Then install 'bbswitch'  (and 'bbswitch-kmp-<kernel-flavor>') with that
> repository in place.

In case you have enabled secureboot, things are more complicated. If you do and don't get it done please let me know. Then I will try to figure out how to downoad the key from buildservice, so you can add it to your Mokmanager.
Comment 8 Andreas 2024-03-12 12:55:34 UTC
(In reply to Stefan Dirsch from comment #7)
> (In reply to Stefan Dirsch from comment #6)
> > > I found this discussion
> > > https://code.opensuse.org/leap/features/issue/142
> > 
> > Thanks. Now I remember. We no longer have found anyone interested in
> > supporting it. I just enabled build against Leap 15.6. Could you 
> > give it a try by adding the X11:Bumblebee repository
> > 
> >   zypper ar https://download.opensuse.org/repositories/X11:/Bumblebee/15.6/ 
> > X11:Bumblebee
> > 
> > Then install 'bbswitch'  (and 'bbswitch-kmp-<kernel-flavor>') with that
> > repository in place.
> 
> In case you have enabled secureboot, things are more complicated. If you do
> and don't get it done please let me know. Then I will try to figure out how
> to downoad the key from buildservice, so you can add it to your Mokmanager.

Yes, I'm using secure boot, I disabled it to try bbswitch.
Plasma still does not start automatically; you need to launch it via startx. 
But bbswitch doesn't work either.

sudo prime-select get-current
Driver configured: intel
bbswitch not loaded
Comment 9 Stefan Dirsch 2024-03-12 12:58:19 UTC
Hmm. Is the bbswitch module loaded at all?
Comment 10 Stefan Dirsch 2024-03-12 12:59:14 UTC
(In reply to Stefan Dirsch from comment #9)
> Hmm. Is the bbswitch module loaded at all?

lsmod | grep bbswtich

What does 'modprobe bbswitch' do? dmesg output?
Comment 11 Stefan Dirsch 2024-03-12 13:04:24 UTC
Hmm. I could install bbswitch that way - with disabled secureboot though. And things apparently are working in intel mode.

localhost:~ # prime-select get-current
Driver configured: intel
[bbswitch] NVIDIA card is OFF

localhost:~ # lsmod|grep bbsw
bbswitch               24576  0

# dmesg
[...]
[ 2663.555177] bbswitch: module verification failed: signature and/or required key missing - tainting kernel
[ 2663.556363] bbswitch: version 0.8
[ 2663.556369] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PC00.GFX0
[ 2663.556375] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PC00.PEG1.PEGP
[ 2663.556450] bbswitch: detected an Optimus _DSM function
[ 2663.556537] bbswitch: disabling discrete graphics
[ 2664.056230] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is off
Comment 12 Stefan Dirsch 2024-03-12 13:10:54 UTC
(In reply to Stefan Dirsch from comment #4)
> More to follow tomorrow (like "offload" mode).

I need to say this also works. And switching back to intel mode as well.
Comment 13 Stefan Dirsch 2024-03-12 13:11:37 UTC
(In reply to Stefan Dirsch from comment #10)
> (In reply to Stefan Dirsch from comment #9)
> > Hmm. Is the bbswitch module loaded at all?
> 
> lsmod | grep bbswtich
> 
> What does 'modprobe bbswitch' do? dmesg output?

--> NEEDINFO
Comment 14 Andreas 2024-03-12 13:30:34 UTC
Created attachment 873443 [details]
dmesg

(In reply to Stefan Dirsch from comment #13)
> (In reply to Stefan Dirsch from comment #10)
> > (In reply to Stefan Dirsch from comment #9)
> > > Hmm. Is the bbswitch module loaded at all?
> > 
> > lsmod | grep bbswtich
> > 
> > What does 'modprobe bbswitch' do? dmesg output?
> 
> --> NEEDINFO

lsmod and modprobe show nothing.
dmesg log attached.
Comment 15 Andreas 2024-03-12 13:34:28 UTC
I just noticed that I also cannot switch to offload mode. I installed suse-prime, rebooted the system, prime-select offload -> log out -> tty and Plasma does not start.
I did prime-select boot offload and rebooted the system. Then prime-select nvidia, log out, Plasma started. prime-select offload from nvidia mode, log out, again tty and Plasma does not start.
Comment 16 Stefan Dirsch 2024-03-12 13:37:48 UTC
Hmm. Looks pretty good.

[  239.029227] bbswitch: version 0.8
[  239.029234] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  239.029240] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[  239.029404] bbswitch: detected an Optimus _DSM function
[  239.029410] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF
[  239.029412] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

Of course card cannot be disabled as long as nvidia is loaded. But disablement should work once it's unloaded after logout.
Comment 17 Andreas 2024-03-12 13:40:38 UTC
bbswitch is now loaded

sudo prime-select get-current
Driver configured: offload
[bbswitch] NVIDIA card is ON

[  239.029227] bbswitch: version 0.8
[  239.029234] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  239.029240] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[  239.029404] bbswitch: detected an Optimus _DSM function
[  239.029410] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF
[  239.029412] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

But lsmod and modprobe still show nothing.
Comment 18 Stefan Dirsch 2024-03-12 13:44:50 UTC
> lsmod | grep bbswtich

typo. Should have been 'lsmod | grep bbswitch'. modprobe doesn't show anything when the module is already loaded.
Comment 19 Andreas 2024-03-12 13:56:16 UTC
Created attachment 873444 [details]
offload mode error

This is what happens if I want to return from intel mode launched via startx to offload mode.
Comment 20 Stefan Dirsch 2024-03-12 14:00:15 UTC
You can boot into runlevel 3 and then check manually by loading 'bbswitch' module if you can enable and disable the nvidia GPU.

modprobe bbswitch load_state=0 unload_state=1

tee /proc/acpi/bbswitch <<<OFF
tee /proc/acpi/bbswitch <<<ON

Then check with dmesg what happens.

But well. If things are not working for you with disabling NVIDIA GPU on-the-fly. Why aren't you just disabling it in BIOS/Firmware completely. Changing this setting is a hassle anyway (logging out and in again from a Xsession; losing half or more of the curren desktop).
Or you decide to always use the nvidia GPU and you're done, since offload mode doesn't work either.
Comment 21 Andreas 2024-03-12 14:18:17 UTC
(In reply to Stefan Dirsch from comment #20)
> You can boot into runlevel 3 and then check manually by loading 'bbswitch'
> module if you can enable and disable the nvidia GPU.
> 
> modprobe bbswitch load_state=0 unload_state=1
> 
> tee /proc/acpi/bbswitch <<<OFF
> tee /proc/acpi/bbswitch <<<ON
> 
> Then check with dmesg what happens.

runlevel 3
sudo tee /proc/acpi/bbswitch <<<OFF
tee: /proc/acpi/bbswitch: File or directory not found
OFF

sudo tee /proc/acpi/bbswitch <<<OFF
tee: /proc/acpi/bbswitch: File or directory not found
ON

> 
> But well. If things are not working for you with disabling NVIDIA GPU
> on-the-fly. Why aren't you just disabling it in BIOS/Firmware completely.
> Changing this setting is a hassle anyway (logging out and in again from a
> Xsession; losing half or more of the curren desktop).
> Or you decide to always use the nvidia GPU and you're done, since offload
> mode doesn't work either.
In BIOS I can only disable iGPU, NVIDIA cannot be disabled.
offload mode works if the system is booted into it, it does not work when you switch to it from another mode.
Comment 22 Andreas 2024-03-12 14:24:51 UTC
(In reply to Andreas from comment #21)
> sudo tee /proc/acpi/bbswitch <<<OFF
> tee: /proc/acpi/bbswitch: File or directory not found
> ON
mistake

sudo tee /proc/acpi/bbswitch <<<ON
tee: /proc/acpi/bbswitch: File or directory not found
ON

If suse-prime doesn't work for me. Is there any chance that supergfx might be added to the Leap repositories?
Comment 23 Stefan Dirsch 2024-03-12 14:25:30 UTC
(In reply to Andreas from comment #21)
> (In reply to Stefan Dirsch from comment #20)
> > You can boot into runlevel 3 and then check manually by loading 'bbswitch'
> > module if you can enable and disable the nvidia GPU.
> > 
> > modprobe bbswitch load_state=0 unload_state=1
> > 
> > tee /proc/acpi/bbswitch <<<OFF
> > tee /proc/acpi/bbswitch <<<ON
> > 
> > Then check with dmesg what happens.
> 
> runlevel 3
> sudo tee /proc/acpi/bbswitch <<<OFF
> tee: /proc/acpi/bbswitch: File or directory not found
> OFF
> 
> sudo tee /proc/acpi/bbswitch <<<OFF
> tee: /proc/acpi/bbswitch: File or directory not found
> ON

Sure you've loaded bbswitch module?

> > But well. If things are not working for you with disabling NVIDIA GPU
> > on-the-fly. Why aren't you just disabling it in BIOS/Firmware completely.
> > Changing this setting is a hassle anyway (logging out and in again from a
> > Xsession; losing half or more of the curren desktop).
> > Or you decide to always use the nvidia GPU and you're done, since offload
> > mode doesn't work either.
> In BIOS I can only disable iGPU, NVIDIA cannot be disabled.

Ok. Then I suggest to disable Intel GPU and work always with nvidia GPU.

> offload mode works if the system is booted into it, it does not work when
> you switch to it from another mode

Hmm. This I can't reproduce. I can also switch between 'nvidia' and 'offload' mode. Not just between 'intel' and 'offload' mode.

.
Comment 24 Stefan Dirsch 2024-03-12 14:26:44 UTC
(In reply to Andreas from comment #22)
> If suse-prime doesn't work for me. Is there any chance that supergfx might
> be added to the Leap repositories?

If you do the packaging or find someone from the community, who is interested and wants to maintain it, yes.
Comment 25 Andreas 2024-03-12 14:37:02 UTC
(In reply to Stefan Dirsch from comment #23)
> (In reply to Andreas from comment #21)
> > (In reply to Stefan Dirsch from comment #20)
> > > You can boot into runlevel 3 and then check manually by loading 'bbswitch'
> > > module if you can enable and disable the nvidia GPU.
> > > 
> > > modprobe bbswitch load_state=0 unload_state=1
> > > 
> > > tee /proc/acpi/bbswitch <<<OFF
> > > tee /proc/acpi/bbswitch <<<ON
> > > 
> > > Then check with dmesg what happens.
> > 
> > runlevel 3
> > sudo tee /proc/acpi/bbswitch <<<OFF
> > tee: /proc/acpi/bbswitch: File or directory not found
> > OFF
> > 
> > sudo tee /proc/acpi/bbswitch <<<OFF
> > tee: /proc/acpi/bbswitch: File or directory not found
> > ON
> 
> Sure you've loaded bbswitch module?

suse-prime shows yes

NVIDIA modules are loaded

but I don't see them in dmesg

> > > But well. If things are not working for you with disabling NVIDIA GPU
> > > on-the-fly. Why aren't you just disabling it in BIOS/Firmware completely.
> > > Changing this setting is a hassle anyway (logging out and in again from a
> > > Xsession; losing half or more of the curren desktop).
> > > Or you decide to always use the nvidia GPU and you're done, since offload
> > > mode doesn't work either.
> > In BIOS I can only disable iGPU, NVIDIA cannot be disabled.
> 
> Ok. Then I suggest to disable Intel GPU and work always with nvidia GPU.

This is a bad option because the fans will be loud all the time and the battery will drain much faster.
Comment 26 Stefan Dirsch 2024-03-12 16:31:39 UTC
(In reply to Andreas from comment #25)
> > Sure you've loaded bbswitch module?
> 
> suse-prime shows yes
> 
> NVIDIA modules are loaded
> 
> but I don't see them in dmesg

bbswitch module can't be loaded if nvidia modules are still loaded. So this makes no sense to me.

> > > > But well. If things are not working for you with disabling NVIDIA GPU
> > > > on-the-fly. Why aren't you just disabling it in BIOS/Firmware completely.
> > > > Changing this setting is a hassle anyway (logging out and in again from a
> > > > Xsession; losing half or more of the curren desktop).
> > > > Or you decide to always use the nvidia GPU and you're done, since offload
> > > > mode doesn't work either.
> > > In BIOS I can only disable iGPU, NVIDIA cannot be disabled.
> > 
> > Ok. Then I suggest to disable Intel GPU and work always with nvidia GPU.
> 
> This is a bad option because the fans will be loud all the time and the
> battery will drain much faster.

Ok. Then I would say if things are working for you perfectly just use 

supergfxctl

Add the openSUSE Repository, install the package from there and be happy. I don't force anybody to use suse-prime.
Comment 27 Andreas 2024-03-12 20:54:58 UTC
Created attachment 873457 [details]
dmesg bbswitch

(In reply to Stefan Dirsch from comment #26)
> (In reply to Andreas from comment #25)
> > > Sure you've loaded bbswitch module?
> > 
> > suse-prime shows yes
> > 
> > NVIDIA modules are loaded
> > 
> > but I don't see them in dmesg
> 
> bbswitch module can't be loaded if nvidia modules are still loaded. So this
> makes no sense to me.
I booted into intel mode, executed the command, relogged, and also restarted, the card remains on.
Comment 28 Andreas 2024-03-12 20:58:44 UTC
(In reply to Stefan Dirsch from comment #26)
> > > > > But well. If things are not working for you with disabling NVIDIA GPU
> > > > > on-the-fly. Why aren't you just disabling it in BIOS/Firmware completely.
> > > > > Changing this setting is a hassle anyway (logging out and in again from a
> > > > > Xsession; losing half or more of the curren desktop).
> > > > > Or you decide to always use the nvidia GPU and you're done, since offload
> > > > > mode doesn't work either.
> > > > In BIOS I can only disable iGPU, NVIDIA cannot be disabled.
> > > 
> > > Ok. Then I suggest to disable Intel GPU and work always with nvidia GPU.
> > 
> > This is a bad option because the fans will be loud all the time and the
> > battery will drain much faster.
> 
> Ok. Then I would say if things are working for you perfectly just use 
> 
> supergfxctl
> 
> Add the openSUSE Repository, install the package from there and be happy. I
> don't force anybody to use suse-prime.

I just wanted to solve the problem, suse-prime is a native solution for Leap, supergfxctl is in the home repository, which can be removed at any time.
Many thanks for the help.
Comment 29 Stefan Dirsch 2024-03-12 22:01:23 UTC
I would say bbswitch modules just doesn't work on your system.

[   52.837392] bbswitch: disabling discrete graphics
[   52.838074] ------------[ cut here ]------------
[   52.838075] pci 0000:01:00.0: disabling already-disabled device
[   52.838081] WARNING: CPU: 5 PID: 1774 at ../drivers/pci/pci.c:2289 pci_disable_device+0x99/0xc0
[   52.838086] Modules linked in: ccm af_packet nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_tables ebtable_nat ebtable_broute ip6table_nat ip6table_mangle ip6tableraw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptableraw iptable_security ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bpfilter qrtr(n) bbswitch(OEn) cmac algif_hash algif_skcipher af_alg bnep ext4 mbcache jbd2 dm_crypt essiv authenc snd_hda_codec_hdmi joydev snd_sof_pci_intel_cnl snd_sof_intel_hda_common iwlmvm soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence hid_multitouch snd_sof_intel_hda hid_generic snd_sof_pci snd_sof_xtensa_dsp mac80211 snd_sof snd_sof_utils soundwire_generic_allocation soundwire_bus snd_soc_skl(n) snd_soc_hdac_hda snd_hda_ext_core snd_soc_sst_ipc snd_soc_sst_dsp snd_ctl_led snd_soc_acpi_intel_match snd_soc_acpi dell_rbtn(n) libarc4 snd_hda_codec_realtek
[   52.838123]  snd_hda_codec_generic snd_soc_core snd_compress intel_tcc_cooling(n) snd_pcm_dmaengine uvcvideo btusb x86_pkg_temp_thermal nls_iso8859_1 videobuf2_vmalloc snd_hda_intel uvc intel_powerclamp nls_cp437 btrtl videobuf2_memops snd_intel_dspcfg vfat videobuf2_v4l2 btintel snd_intel_sdw_acpi dell_laptop snd_hda_codec btbcm i2c_designware_platform dell_wmi iTCO_wdt btmtk i2c_designware_core fat spi_nor intel_pmc_bxt videodev kvm_intel iwlwifi bluetooth ee1004(n) snd_hda_core dell_smbios processor_thermal_device_pci_legacy(n) mtd mei_pxp mei_hdcp(n) mei_wdt iTCO_vendor_support ccp intel_rapl_msr dm_mod dell_smm_hwmon(n) videobuf2_common kvm processor_thermal_device dell_wmi_sysman(n) dcdbas(X) snd_hwdep ecdh_generic cfg80211 mc irqbypass firmware_attributes_class(n) pcspkr crc16 ledtrig_audio snd_pcm dell_wmi_descriptor i2c_i801 processor_thermal_rfim spi_intel_pci(n) intel_wmi_thunderbolt(n) wmi_bmof e1000e rfkill spi_intel(n) i2c_smbus processor_thermal_mbox snd_timer mei_me processor_thermal_rapl
[   52.838160]  intel_lpss_pci snd intel_lpss mei intel_rapl_common soundcore idma64 intel_pch_thermal intel_soc_dts_iosf(n) thermal int3403_thermal int340x_thermal_zone dell_smo8800(n) int3400_thermal intel_hid(n) acpi_thermal_rel ac acpi_pad sparse_keymap intel_pmc_core tiny_power_button(n) fuse efi_pstoren configfs dmi_sysfs ip_tables x_tables uas usb_storage i915 crc32_pclmul polyval_clmulni(n) polyval_generic(n) gf128mul ghash_clmulni_intel sha512_ssse3 ahci sha256_ssse3 libahci sha1_ssse3 libata rtsx_pci_sdmmc nvme mmc_core nvme_core sd_mod i2c_algo_bit scsi_dh_emc scsi_dh_rdac drm_buddy xhci_pci scsi_dh_alua nvme_auth xhci_pci_renesas mxm_wmi(n) t10_pi ttm crc64_rocksoft_generic xhci_hcd drm_display_helper video aesni_intel rtsx_pci ucsi_acpi cec typec_ucsi sg crypto_simd crc64_rocksoft cryptd roles usbcore scsi_mod mfd_core crc64 i2c_hid_acpi rc_core typec battery i2c_hid wmi pinctrl_cannonlake button serio_raw btrfs blake2b_generic libcrc32c crc32c_intel xor raid6_pq coretemp msr efivarfs
[   52.838203] Unloaded tainted modules: intel_pmc_core_pltdrv(n):1
[   52.838205] Supported: No, Unsupported modules are loaded
[   52.838206] CPU: 5 PID: 1774 Comm: tee Tainted: G           OE  X   n 6.4.0-150600.9-default #1 SLE15-SP6 6b4f1850a99c4e4121f832c3fb6a8cf64ec22338
[   52.838208] Hardware name: Dell Inc. Precision 7530/0VX81J, BIOS 1.31.0 11/01/2023
[   52.838209] RIP: 0010:pci_disable_device+0x99/0xc0
[   52.838212] Code: c6 05 6b 6e 9a 01 01 48 85 ed 74 38 48 8d bb d0 00 00 00 e8 c9 17 1f 00 48 89 ea 48 89 c6 48 c7 c7 88 2c a7 93 e8 97 f4 9c ff <0f> 0b eb 80 48 89 df e8 cb fe ff ff 80 a3 51 08 00 00 df 5b 5d c3
[   52.838213] RSP: 0018:ffffb5e74186fd88 EFLAGS: 00010286
[   52.838214] RAX: 0000000000000000 RBX: ffff9d93419fd000 RCX: 0000000000000027
[   52.838215] RDX: 0000000000000000 RSI: 00000000ffff7fff RDI: ffff9db25c4a3548
[   52.838216] RBP: ffff9d9341a1da70 R08: 0000000000000000 R09: c0000000ffff7fff
[   52.838217] R10: 0000000000000000 R11: ffffb5e74186fc20 R12: ffff9d934b5dbf00
[   52.838218] R13: 00007ffd5886cbc0 R14: ffffb5e74186fea0 R15: 0000000000000000
[   52.838219] FS:  00007f818fd0c740(0000) GS:ffff9db25c480000(0000) knlGS:0000000000000000
[   52.838220] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   52.838221] CR2: 00007f818fb9e47e CR3: 0000000150706006 CR4: 00000000003706e0
[   52.838222] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   52.838222] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   52.838223] Call Trace:
[   52.838224]  <TASK>
[   52.838227]  ? __warn+0x7d/0x140
[   52.838230]  ? pci_disable_device+0x99/0xc0
[   52.838232]  ? report_bug+0xf8/0x1e0
[   52.838234]  ? handle_bug+0x44/0x80
[   52.838236]  ? exc_invalid_op+0x13/0x60
[   52.838238]  ? asm_exc_invalid_op+0x16/0x20
[   52.838241]  ? pci_disable_device+0x99/0xc0
[   52.838243]  ? pci_disable_device+0x99/0xc0
[   52.838246]  bbswitch_off+0xc5/0x230 [bbswitch 32444205bce144ab8b843e5c7f0384504f4dd2fe]
[   52.838249]  bbswitch_proc_write+0x9f/0xc0 [bbswitch 32444205bce144ab8b843e5c7f0384504f4dd2fe]
[   52.838251]  proc_reg_write+0x53/0x80
[   52.838253]  vfs_write+0xc2/0x380
[   52.838256]  ? vfs_write+0x1b6/0x380
[   52.838258]  ? vfs_write+0x1b6/0x380
[   52.838260]  ksys_write+0xa5/0xe0
[   52.838263]  do_syscall_64+0x58/0x80
[   52.838265]  ? ksys_write+0xa5/0xe0
[   52.838267]  ? syscall_exit_to_user_mode+0x1e/0x40
[   52.838269]  ? do_syscall_64+0x67/0x80
[   52.838271]  ? exc_page_fault+0x69/0x150
[   52.838272]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[   52.838273] RIP: 0033:0x7f818fb21750
[   52.838301] Code: 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 80 3d d9 c2 0e 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89
[   52.838302] RSP: 002b:00007ffd5886cab8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[   52.838303] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f818fb21750
[   52.838304] RDX: 0000000000000004 RSI: 00007ffd5886cbc0 RDI: 0000000000000003
[   52.838305] RBP: 00007ffd5886cbc0 R08: 0000000000000004 R09: 0000000000000001
[   52.838306] R10: 00007f818fa0bbc8 R11: 0000000000000202 R12: 0000000000000004
[   52.838306] R13: 000055d076b372c0 R14: 00007f818fbfdf60 R15: 00007ffd5886ed40
[   52.838309]  </TASK>
[   52.838309] ---[ end trace 0000000000000000 ]---

Unfortunately development on bbswitch has stopped years ago. As far as I know.
Comment 30 Stefan Dirsch 2024-03-12 22:05:32 UTC
(In reply to Andreas from comment #28)
> > Ok. Then I would say if things are working for you perfectly just use 
> > 
> > supergfxctl
> > 
> > Add the openSUSE Repository, install the package from there and be happy. I
> > don't force anybody to use suse-prime.
> 
> I just wanted to solve the problem, 

I see. Thanks for trying hard.

> suse-prime is a native solution for
> Leap, 

I don't know whether it is. I'm trying my best. But I think I never
read/received a success story about it.

> supergfxctl is in the home repository, which can be removed at any
> time.

That's true. Buy every openSUSE user can register for a buildservice account
and copy it before this happens. ;-)
Comment 31 Stefan Dirsch 2024-03-12 22:07:50 UTC
Finally closing as wontfix. I'm sorry I couldn't resolve the issues, so you need to use a different resolution.
Comment 32 Andreas 2024-03-13 11:28:04 UTC
(In reply to Stefan Dirsch from comment #30)
> (In reply to Andreas from comment #28)
> 
> > suse-prime is a native solution for
> > Leap, 
> 
> I don't know whether it is. I'm trying my best. But I think I never
> read/received a success story about it.

In any case, thank you very much for trying to help and spending your time.
Comment 33 Andreas 2024-03-17 15:28:01 UTC
Created attachment 873575 [details]
journald switching from offload to intel

I'll try one more time, maybe I'll be able to see something in the log. Here is the log of journald switching from offload to intel. The switching log starts from 19:51 until the end.
If the log doesn’t help, then let it be as it is
Comment 34 Andreas 2024-03-17 15:28:49 UTC
Created attachment 873576 [details]
kernel log switching from offload to intel
Comment 35 Andreas 2024-03-17 15:32:47 UTC
Created attachment 873577 [details]
journald switching from offload to nvidia

And for comparison, switching from offload to nvidia, which works. The switching process starts from 20:58 until the end.
Comment 36 Andreas 2024-03-17 15:33:30 UTC
Created attachment 873578 [details]
kernel log switching from offload to nvidia
Comment 37 Stefan Dirsch 2024-03-17 18:40:58 UTC
(In reply to Andreas from comment #33)
> Created attachment 873575 [details]
> journald switching from offload to intel
> 
> I'll try one more time, maybe I'll be able to see something in the log. Here
> is the log of journald switching from offload to intel. The switching log
> starts from 19:51 until the end.
> If the log doesn’t help, then let it be as it is

16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* LSPCON init failed on port D
16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* LSPCON init failed on port D

I can't say if this is the culprit. Could also be harmless. I'm not a KMS driver developer.
Comment 38 Stefan Dirsch 2024-03-17 18:42:46 UTC
(In reply to Andreas from comment #34)
> Created attachment 873576 [details]
> kernel log switching from offload to intel

More of these:

16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* LSPCON init failed on port D
16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* LSPCON init failed on port D
16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* LSPCON init failed on port D
16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 19:51	i915 0000	0:02.0: [drm] *ERROR* LSPCON init failed on port D
Comment 39 Stefan Dirsch 2024-03-17 18:44:43 UTC
(In reply to Andreas from comment #35)
> Created attachment 873577 [details]
> journald switching from offload to nvidia
> 
> And for comparison, switching from offload to nvidia, which works. The
> switching process starts from 20:58 until the end.

Even here we see

16.03.24 20:58	kernel	i915 0000:00:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 20:58	kernel	i915 0000:00:02.0: [drm] *ERROR* LSPCON init failed on port D
16.03.24 20:58	kernel	i915 0000:00:02.0: [drm] *ERROR* Failed to probe lspcon
16.03.24 20:58	kernel	i915 0000:00:02.0: [drm] *ERROR* LSPCON init failed on port D

So I think this is not the culprit for the issues for the other switches.
Comment 40 Stefan Dirsch 2024-03-17 18:45:34 UTC
(In reply to Andreas from comment #36)
> Created attachment 873578 [details]
> kernel log switching from offload to nvidia

The same as with comment#35
Comment 41 Andreas 2024-03-17 20:08:17 UTC
(In reply to Stefan Dirsch from comment #37)
> (In reply to Andreas from comment #33)
> > Created attachment 873575 [details]
> > journald switching from offload to intel
> > 
> > I'll try one more time, maybe I'll be able to see something in the log. Here
> > is the log of journald switching from offload to intel. The switching log
> > starts from 19:51 until the end.
> > If the log doesn’t help, then let it be as it is
> 
> 16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* Failed to probe lspcon
> 16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* LSPCON init failed on
> port D
> 16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* Failed to probe lspcon
> 16.03.24 19:51	kernel	i915 0000:00:02.0: [drm] *ERROR* LSPCON init failed on
> port D
> 
> I can't say if this is the culprit. Could also be harmless. I'm not a KMS
> driver developer.

This is this bug
https://gitlab.freedesktop.org/drm/intel/-/issues/4458
Comment 42 Andreas 2024-03-20 20:35:50 UTC
Created attachment 873671 [details]
nvidia 470, Leap 15.5

I tested suse-prime on Leap 15.5 with drivers 470 and 550, everything works. I'll leave the logs here just in case.
Comment 43 Andreas 2024-03-20 20:36:14 UTC
Created attachment 873672 [details]
nvidia 550, Leap 15.5
Comment 44 Andreas 2024-03-20 20:37:37 UTC
Created attachment 873673 [details]
nvidia 550, Leap 15.6

Then I updated Leap 15.5 to 15.6 and suse-prime stopped switching to Intel mode.
Comment 45 Andreas 2024-03-20 20:40:09 UTC
What else should be noted is that Leap 15.5 and 15.6 have almost the same version of Plasma 5.27.9/10, with which the test was done.