ghostbsd / issues

Issue tracker for GhostBSD
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

Nvidia Optimus system can not be updated #13

Open manfredu opened 1 year ago

manfredu commented 1 year ago

Version

23.04.23

Explain the issue and what happens

I've got an Acer Aspire V3-771G with Nivida Optimus (2 graphics adapters): GeForce GT 650M and an integrated Intel HD Graphics 4000.

I have used this notebook with GhostBSD since beginnung of 2022, but since about may this year it is no longer possible for me to update it.

Initially there was an issue with the Nvidia driver update, so as recommended I switched to the Optimus setup:

sudo pkg install nvidia-hybrid-graphics-390
sudo pkg install nvidia-secondary-driver-390
sudo sysrc nvidia_xorg_enable=YES
sudo service nvidia_xorg start

Now I get Xorg.0.log and Xorg.8.log. The notebook is still working fine, but I'm not sure if it is using the Nvidia adapter:

pkg[3100]: nvidia-hybrid-graphics upgraded: 0.5_1 -> 0.6 
kernel: NVRM:  visit http://www.nvidia.com/object/unix.html for more
pkg[3314]: nvidia-hybrid-graphics-0.6 deinstalled
pkg[3314]: nvidia-secondary-driver-390-390.154 installed
pkg[3597]: nvidia-hybrid-graphics-390-0.6 installed
root[2111]: /etc/rc: WARNING: failed precmd routine for nvidia_xorg
kernel: KLD nvidia.ko: depends on kernel - not available or version mismatch
kernel: linker_load_file: /boot/modules/nvidia.ko - unsupported file type
root[2116]: /etc/rc: WARNING: failed precmd routine for nvidia_xorg
KLD nvidia.ko: depends on kernel - not available or version mismatch
kernel: linker_load_file: /boot/modules/nvidia.ko - unsupported file type

But this causes no issues as the integrated GPU is used by default.

Now when I update GhostBSD via Update Manager Xorg no longer works:

Xorg.0.log after the update:

(II) xfree86: Adding drm device (/dev/dri/card0)
(II) Platform probe for /dev/dri/card0
(!!) More than one possible primary device found
(--) PCI: (0@0:2:0) 8086:0166:1025:0686 rev 9, Mem @ 0xd3000000/4194304, 0xc0000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/65536
(--) PCI: (1@0:0:0) 10de:0fd1:1025:0686 rev 161, Mem @ 0xd2000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/65536
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
  compiled for 1.21.1.8, module version = 1.0.0
  ABI class: X.Org Server Extension, version 10.0
(==) Matched intel as autoconfigured driver 0
(==) Matched modesetting as autoconfigured driver 1
(==) Matched scfb as autoconfigured driver 2
(==) Matched vesa as autoconfigured driver 3
(==) Assigned the driver to the xf86ConfigLayout
(II) LoadModule: "intel"
(II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
  compiled for 1.21.1.8, module version = 2.99.917
  Module class: X.Org Video Driver
  ABI class: X.Org Video Driver, version 25.2
(II) LoadModule: "modesetting"
(II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
(II) Module modesetting: vendor="X.Org Foundation"
  compiled for 1.21.1.8, module version = 1.21.1
  Module class: X.Org Video Driver
  ABI class: X.Org Video Driver, version 25.2
(II) LoadModule: "scfb"
(II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
(II) Module scfb: vendor="X.Org Foundation"
  compiled for 1.21.1.8, module version = 0.0.5
  ABI class: X.Org Video Driver, version 25.2
(II) LoadModule: "vesa"
(II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
(II) Module vesa: vendor="X.Org Foundation"
  compiled for 1.21.1.8, module version = 2.5.0
  Module class: X.Org Video Driver
  ABI class: X.Org Video Driver, version 25.2
(II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
 i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
 915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
 Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
 GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
(II) intel: Driver for Intel(R) HD Graphics
(II) intel: Driver for Intel(R) Iris(TM) Graphics
(II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
(II) modesetting: Driver for Modesetting Kernel Drivers: kms
(II) scfb: driver for wsdisplay framebuffer: scfb
(II) VESA: driver for VESA chipsets: vesa
(--) Using syscons driver with X support (version 2.0)
(++) using VT number 9
(WW) Falling back to old probe method for modesetting
(II) modeset(0): using default device
(WW) Falling back to old probe method for scfb
scfb trace: probe start
(II) scfb(1): using default device
scfb trace: probe done
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(EE) Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs        
(EE) for all framebuffer devices
(EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

Explain how to reproduce the bug?

I guess one would need a system with this hardware, install on older GhostBSD release and use the update manager to install the latest ghostbsd version...

What is the Expected behavior (if applicable)

After the update GhostBSD should continue to work.

Additional context (if applicable)

No response

manfredu commented 1 year ago

After trying a lot of configurations without success I finally have been able to get the Mate GUI working again in the updated BE.

I did a pkg upgrade -f and created /usr/local/etc/X11/xorg.conf.d/driver.conf with the following content:

Section "Device"
    Identifier  "Device0"
    Driver      "modesetting"
    BusID       "PCI:0:2:0"
    Option      "PrimaryGPU" "yes"
EndSection

ghostbsd-version is now 23.08.23.

Log file from successful start of Xorg server:

Xorg.0.log

ericbsd commented 1 year ago

To use nvidia-hybrid-graphics-390, you will need the lines below the xorg config for Nvidia to work.

Section "ServerFlags"
    Option "IgnoreABI" "1"
EndSection