Intel Graphics i915 Kernel Driver

I am having trouble with the Intel HD Graphics 630, after an update that I made on Tumbleweed to kernel 5.14.1-3.
When I try to switch the graphic card form nvidia to intel with prime-select when I logout the pc got frozen and don’t show the login
I have to reboot the pc and every time that I try to boot the pc with the intel card select, it got freeze.
Today I made an kernel update to 5.14.6-3, intel graphics card drivers and nvidia drivers from community and when it finished everything start to work, I could switch to intel card and log out an login but when I restart the PC I got the same problem. When prime-select is set to nvidia I can boot and login to KDE and everything works, I can run nvidia-settings, but I have problem with xcode, skype and springmail (does say something about crashes on Display Manager).
Please, if anyone has passed for this and can help me to fix this or lead me to an answer.

When I run the command prime-select get-current I got this:
Driver configured: nvidia
bbswitch not loaded. NVIDIA modules are loaded

if I run this command:
sudo modprobe bbswitch load_state=0 unload_state=1
and then run the prime-select get-current again I got this:
Driver configured: nvidia
[bbswitch] NVIDIA card is ON

I try to put this: i915.enable_psr=0 on the boot parameters, that I saw on a web page, but it does not work.

When I boot in terminal and try to run: startx, the log file says something about permission (please correct me), this is the log file:
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
421.877] Build Operating System: openSUSE SUSE LINUX
421.877] Current Operating System: Linux alienware-jorge 5.14.6-1-default #1 SMP Mon Sep 20 07:02:13 UTC 2021 (6131a3c) x86_64
421.877] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.14.6-1-default 3 root=UUID=33b4ebdd-298d-47dc-99ea-c9a5983c2dca splash=silent quiet iommu=pt intel_iommu=on vfio-pci.ids=8086:591b,8086:a171 i915.enable_psr=0 mitigations=auto
421.877] Build Date: 30 July 2021 12:00:00AM
421.878] Current version of pixman: 0.40.0
421.878] Before reporting problems, check
to make sure that you have the latest version.
421.878] Markers: (–) probed, () from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
421.879] (==) Log file: “/home/jfespinal/.local/share/xorg/Xorg.0.log”, Time: Wed Sep 29 12:50:06 2021
421.881] (==) Using config directory: “/etc/X11/xorg.conf.d”
421.881] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
421.884] (==) ServerLayout “layout”
421.884] (
) |–>Screen “intel” (0)
421.884] () | |–>Monitor “<default monitor>”
421.885] (
) | |–>Device “intel”
421.885] (==) No monitor specified for screen “intel”.
Using a default monitor configuration.
421.885] (==) Automatically adding devices
421.885] (==) Automatically enabling devices
421.885] (==) Automatically adding GPU devices
421.885] (==) Max clients allowed: 256, resource mask: 0x1fffff
421.888] (WW) The directory “/usr/share/fonts/misc/sgi” does not exist.
421.888] Entry deleted from font path.
421.889] (==) FontPath set to:
421.889] (==) ModulePath set to “/usr/lib64/xorg/modules”
421.889] (WW) Ignoring unrecognized extension “XFree86-DGA”
421.889] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
421.889] (II) Loader magic: 0x560b7b3eea00
421.889] (II) Module ABI versions:
421.889] X.Org ANSI C Emulation: 0.4
421.889] X.Org Video Driver: 24.1
421.889] X.Org XInput driver : 24.1
421.889] X.Org Server Extension : 10.0
421.891] (++) using VT number 1

421.895] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
421.898] (II) xfree86: Adding drm device (/dev/dri/card0)
421.899] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
422.675] (–) PCI:*(0@0:2:0) 8086:591b:1028:0778 rev 4, Mem @ 0xdb000000/16777216, 0x70000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x???/131072
422.675] (–) PCI: (1@0:0:0) 10de:1ba0:1028:0778 rev 161, Mem @ 0xdc000000/16777216, 0xb0000000/268435456, 0xc0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x???/524288
422.675] (II) LoadModule: “glx”
422.676] (II) Loading /usr/lib64/xorg/modules/extensions/
422.677] (II) Module glx: vendor=“X.Org Foundation”
422.677] compiled for 1.20.13, module version = 1.0.0
422.677] ABI class: X.Org Server Extension, version 10.0
422.677] (II) LoadModule: “modesetting”
422.677] (II) Loading /usr/lib64/xorg/modules/drivers/
422.678] (II) Module modesetting: vendor=“X.Org Foundation”
422.678] compiled for 1.20.13, module version = 1.20.13
422.678] Module class: X.Org Video Driver
422.678] ABI class: X.Org Video Driver, version 24.1
422.678] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
422.678] (EE)
Fatal server error:
422.678] (EE) xf86OpenConsole: Cannot open virtual console 1 (Permission denied)
422.678] (EE)
422.678] (EE)
Please consult the The X.Org Foundation support
for help.
422.678] (EE) Please also check the log file at “/home/jfespinal/.local/share/xorg/Xorg.0.log” for additional information.
422.678] (EE)
422.678] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
422.678] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
422.744] (EE) Server terminated with error (1). Closing log file.

Hi and welcome to the Forum :slight_smile:
If the application uses electron, then it is broken… waiting for upstream fix…

So, as a Tumbleweed user, I suggest keeping an eye on the Factory mailing list, issues like this are discussed (and see potential fixes) etc :wink:

For example:

You also might want to check this thread;

Thanks for sharing!

Uninstall bbswitch and bbswitch-kmp-default solved the problem partially.

Now I can switch between intel and nvidia cards with prime-select login out and log in back. But there are some things that I cannot do:
Reboot the pc with intel card selected (it got freeze).
Run the apps: mailspring, skype, and visual studio code with nvidia card selected (only run with intel card selected).

Yes, electron and intel/nvidia have the issue, vscode works here on amd gpu, not nvidia (just a black screen with switcherooctl), slack desktop doesn’t work on either, so seems random.