openSUSE / SUSEPrime

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

Unable to switch to Nvidia or Intel appropriately on MicroOS #94

Closed sith-on-mars closed 1 year ago

sith-on-mars commented 1 year ago

I'm using Micro OS Gnome here. I installed the Nvidia G06 driver with suse-prime and bbswitch. I had trouble with switching graphic cards.

According to `prime-select.log', it couldn't detect Intel when I tried to switch to it. Then it would attempt to switch to Nvidia instead and caused black screen with login, because it also couldn't detect Nvidia. Here is the part of the log:

[ 18:36:16 ] service restored by user
[ 18:38:35 ] user_logout_waiter: started
[ 18:38:35 ] user_logout_waiter: X restart detected, preparing switch to intel
[ 18:38:35 ] Forcing nvidia due to Intel card not found
[ 18:38:35 ] Unloading bbswitch and switching nvidia ON...
[ 18:38:38 ] PCI BusID of NVIDIA card could not be detected!
[ 18:38:38 ] Configuration failed
[ 18:39:42 ] Boot: setting-up  card
[ 18:39:42 ] HotSwitch: completed!

Interestingly, when I switched to Nvidia, suse-prime complained about not able to detect Nvidia and wanted to switch to Intel. This time the Intel just mysteriously worked along with bbswitch.

[ 20:47:07 ] user_logout_waiter: started
[ 20:47:07 ] user_logout_waiter: X restart detected, preparing switch to nvidia
[ 20:47:07 ] Forcing intel due to NVIDIA card not found
[ 20:47:07 ] NVIDIA card will be switched off, NVIDIA offloading will not be available
[ 20:47:07 ] trying switch OFF nvidia: [bbswitch] NVIDIA card is OFF
[ 20:47:07 ] Intel card correctly set
[ 20:47:07 ] HotSwitch: starting Display Manager
[ 20:47:08 ] HotSwitch: completed!

I think these are MicroOS exclusive issues, as I never encountered them on Tumbleweed. It's similar to one of the old issues here reported two years ago. Switching to Nvidia G05 driver doesn’t help either. Please close the issue if this is an upstream MicroOS issue and can't be solved here.

sndirsch commented 1 year ago

This looks indeed weird. Honestly I never tried MicroOS - let alone together with suse-prime. Anyway, please check the output of inxi -aG and nvidia-xconfig --query-gpu-info and add it here. Thanks!

sith-on-mars commented 1 year ago

The output of inxi -aG:

Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Lenovo
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:3e9b
    class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] vendor: Lenovo
    driver: N/A alternate: nouveau, nvidia_drm, nvidia non-free: 520.xx+
    status: current (as of 2022-10) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.0 chip-ID: 10de:1c8c class-ID: 0300
  Device-3: SunplusIT Integrated IR Camera type: USB driver: uvcvideo
    bus-ID: 1-12:5 chip-ID: 04f2:b615 class-ID: 0e02
  Device-4: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-8:2 chip-ID: 04f2:b614 class-ID: 0e02
  Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 22.1.8
    compositor: gnome-shell v: 43.2 driver: X: loaded: modesetting
    unloaded: fbdev alternate: intel,nouveau,nv,nvidia,vesa dri: iris
    gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: AU Optronics 0x32eb built: 2017 res: 3840x2160
    dpi: 284 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: 3840x2160
  API: EGL/GBM Message: No known Wayland EGL/GBM data sources.

The output of nvidia-xconfig --query-gpu-info: bash: nvidia-xconfig: command not found

Should I install any other packages? I'm sure my Nvidia, suse-prime, and bbswitch are all installed. Here is the output of zypper se --installed-only nvidia.

Loading repository data...
Reading installed packages...

S  | Name                          | Summary                                                               | Type
---+-------------------------------+-----------------------------------------------------------------------+--------
i  | kernel-firmware-nvidia        | Kernel firmware files for Nvidia Tegra and graphics drivers           | package
i+ | libnvidia-egl-wayland1        | The EGLStream-based Wayland external platform                         | package
i+ | nvidia-compute-G06            | NVIDIA driver for computing with GPGPU                                | package
i  | nvidia-driver-G06-kmp-default | NVIDIA graphics driver kernel module for GeForce 700 series and newer | package
i+ | nvidia-gl-G06                 | NVIDIA OpenGL libraries for OpenGL acceleration                       | package
i+ | nvidia-video-G06              | NVIDIA graphics driver for GeForce 700 series and newer               | package
sndirsch commented 1 year ago

Thanks. That seems to be the culprit. Please install package nvidia-utils-G06, which includes nvidia-xconfig in the current repository. Meanwhile I've fixed this, but the repositories haven't been updated yet. :-(

From the changelog:

r24 | sndirsch | 2023-01-24 18:26:40 | 9f5e46dbb6ffbe10d756aabe82245b3b | 525.85.05 | 

- moved nvidia-xconfig from nvidia-compute-utils-G06 to
  nvidia-gl-G06

r22 | sndirsch | 2023-01-24 12:33:02 | 06ce482d2b74165715f3a581e23b772a | 525.85.05 | 

- moved nvidia-xconfig to nvidia-compute-utils-G06, since this is
  needed by suse-prime/prime-select to detect nvidia's PCI busid.
sith-on-mars commented 1 year ago

Thanks so much for the help! I installed nvidia-utils-G06 and it solved the problem. I was able to switch my graphic cards again yay!!! Interestingly, on Tumbleweed my suse-prime worked flawlessly without nvidia-utils-G06, which is not the case here.

sith-on-mars commented 1 year ago

An off-topic question if you don't mind me asking.

I found in my Tumbleweed installation, I was able to use the Nvidia card on Wayland. In MicroOS, I could only use Xorg when I switched to Nvidia. Do you have any idea why things work differently here? I think Nvidia G06 should be able to work on Gnome.

sndirsch commented 1 year ago

Ok. Thanks for the update. I think on Tumbleweed you used the driver packages before and the update installed nvidia-utils-G06 in addition. It's defined that way for an update.

sndirsch commented 1 year ago

I don't know how things are supposed to work with Wayland with an Intel/nVidia combination. suse-prime only covers an Xorg setup. I haven't tried yet, let alone had it working ... congratulation if it works for you in TW!

sndirsch commented 1 year ago

Anyway ... closing.

sith-on-mars commented 1 year ago

On Tumbleweed the update used to recommend nvidia-utils-G06 until recently. Now nvidia-utils-G06 is no longer recommended when you install Nvida package.

sndirsch commented 1 year ago

On Tumbleweed the update used to recommend nvidia-utils-G06 until recently. Now nvidia-utils-G06 is no longer recommended when you install Nvida package.

I don't think this changed.