Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] troubles with nVidia Optimus
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
madjestic
n00b
n00b


Joined: 10 Oct 2013
Posts: 15

PostPosted: Tue Apr 30, 2019 8:38 pm    Post subject: [SOLVED] troubles with nVidia Optimus Reply with quote

Hey guys,

After a recent update, about a week ago, I can not run nvidia any more (primusrun, optirun, nvidia-xrun). Here's what I tried so far:
- recompiling the kernel and recompiling nvidia-driver
- getting latest linux-firmware, recompiling the kernel and the nvidia-drivers
- reinstalling xorg, following gentoo guide
- reinstallng bumblebee, following gentoo guide

Nothing seems to have worked. X11/startx seems to be ok, I can run my normal system on the integrated Intel graphics, but not the dedicated nvidia graphics:

Code:
$ optirun glxgears
[ 3651.492014] [ERROR]Cannot access secondary GPU - error: [XORG] (EE)

[ 3651.492067] [ERROR]Aborting because fallback start is disabled.


after I do:
Code:
 # bumblebeed start
[  255.190355] [INFO]bumblebeed 3.2.1-59-g7aa457f started

and then run again "$ optirun glxgears", I get the following error in the terminal where I ran "bumblebeed start":
Code:
[  255.190355] [INFO]bumblebeed 3.2.1-59-g7aa457f started
[  301.099949] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[  301.099973] [WARN][XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
[  301.099988] [ERROR][XORG] (EE)
[  301.099995] [ERROR][XORG] (EE) Backtrace:
[  301.100003] [ERROR][XORG] (EE) 0: Xorg (xorg_backtrace+0x4d) [0x55f09358850d]
[  301.100010] [ERROR][XORG] (EE) 1: Xorg (0x55f0933e1000+0x1ab1b9) [0x55f09358c1b9]
[  301.100018] [ERROR][XORG] (EE) 2: /lib64/libpthread.so.0 (0x7f56f2e6b000+0x147e0) [0x7f56f2e7f7e0]
[  301.100025] [ERROR][XORG] (EE) 3: /lib64/libc.so.6 (memcpy+0x1f) [0x7f56f2d4800f]
[  301.100032] [ERROR][XORG] (EE) 4: /usr/lib64/libnvidia-glcore.so.430.09 (0x7f56f02c1000+0x1188d69) [0x7f56f1449d69]
[  301.100042] [ERROR][XORG] (EE) 5: /usr/lib64/libnvidia-glcore.so.430.09 (0x7f56f02c1000+0x1188ecd) [0x7f56f1449ecd]
[  301.100049] [ERROR][XORG] (EE) 6: /usr/lib64/libnvidia-glcore.so.430.09 (0x7f56f02c1000+0xe72ed8) [0x7f56f1133ed8]
[  301.100058] [ERROR][XORG] (EE) 7: /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so (0x7f56ee61f000+0x8c2d42) [0x7f56eeee1d42]
[  301.100066] [ERROR][XORG] (EE)
[  301.100072] [ERROR][XORG] (EE) Segmentation fault at address 0x7f56eefdb000
[  301.100078] [ERROR][XORG] (EE)
[  301.100085] [ERROR][XORG] (EE) Caught signal 11 (Segmentation fault). Server aborting
[  301.100092] [ERROR][XORG] (EE)
[  301.100098] [ERROR][XORG] (EE)
[  301.100107] [ERROR][XORG] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
[  301.100114] [ERROR][XORG] (EE)
[  301.114979] [ERROR][XORG] (EE) Server terminated with error (1). Closing log file.
[  301.115002] [ERROR]X did not start properly


Xorg.8.log -> https://paste.ofcode.org/AwEUmg4kic6HhnvG7MVZ7D
Xorg.0.log -> https://paste.ofcode.org/4jLrEddzqcXSzeiaysLJVy

After I log into a new tty and do:
Code:
 $ nvidia-xrun glxgears
I get a Segmentaion Fault:
Code:
(EE) Backtrace:
(EE) 0: X (xorg_backtrace+0x4d) [0x55d69a59f50d]
(EE) 1: X (0x55d69a3f8000+0x1ab1b9) [0x55d69a5a31b9]
(EE) 2: /lib64/libpthread.so.0 (0x7f95e36be000+0x147e0) [0x7f95e36d27e0]
(EE) 3: /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so (0x7f95dfd58000+0x8c4f98) [0x7f95e061cf98]
(EE)
(EE) Segmentation fault at address 0x28
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
(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.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

Removing Nvidia bus from the kernel
tee: /sys/bus/pci/devices//remove: Permission denied
1
Enabling powersave for the PCIe controller
tee: /sys/bus/pci/devices//power/control: No such file or directory
auto

Xorg.1.log -> https://paste.ofcode.org/4jLrEddzqcXSzeiaysLJVy

Here's the relevant info:

Quote:
$ dmesg -> https://paste.ofcode.org/KmE9c4kwPEVQ9HNkGVGDNe

Quote:
$ emerge --info -> https://paste.ofcode.org/ncKEYKxmpXnSVX3nRG5Dsa

Quote:
$ cat /usr/src/linux/.config -> https://paste.ofcode.org/Pm8qAgUh5s7YKzVEhLXFAd


Code:
$ uname -av
Linux nu 4.19.27-gentoo-r1 #5 SMP PREEMPT Tue Apr 30 17:54:20 CEST 2019 x86_64 Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz GenuineIntel GNU/Linux


Code:
$ lspci
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 4 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
04:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)


Code:
$ lsmod
Module                  Size  Used by
fuse                  114688  2
usb_storage            61440  2
nvidia_drm             45056  0
nvidia_modeset       1060864  1 nvidia_drm
nvidia              17981440  1 nvidia_modeset
bbswitch               16384  0
uvcvideo              106496  0
videobuf2_vmalloc      16384  1 uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_common       45056  2 videobuf2_v4l2,uvcvideo
btusb                  49152  0
btrtl                  16384  1 btusb
btbcm                  16384  1 btusb
btintel                20480  1 btusb
iwldvm                143360  0
intel_rapl             24576  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
input_leds             16384  0
iwlwifi               172032  1 iwldvm
xhci_pci               16384  0
xhci_hcd              204800  1 xhci_pci
ehci_pci               16384  0
ehci_hcd               57344  1 ehci_pci
usbcore               221184  7 xhci_hcd,ehci_pci,usb_storage,uvcvideo,ehci_hcd,btusb,xhci_pci
usb_common             16384  1 usbcore
thinkpad_acpi          90112  0


Code:
 $ rc-status
Runlevel: default
 dbus                              [  started  ]
 NetworkManager                    [  started  ]
 syslog-ng                         [  started  ]
 acpid                             [  started  ]
 bluetooth                         [  started  ]
 bumblebee                         [  started  ]
 cupsd                             [  started  ]
 laptop_mode                       [  started  ]
 netmount                          [  started  ]
 ntpd                              [  started  ]
 thermald                          [  started  ]
 local                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
Dynamic Runlevel: manual


Code:
 $ cat /etc/X11/xorg.conf.d/20opengl.conf
Section "Files"
   ModulePath "/usr/lib32/xorg/modules"
   ModulePath "/usr/lib64/xorg/modules"
EndSection


Code:
 $ cat /etc/X11/xorg.conf
Section "Module"
   Disable      "dri"
EndSection

Section   "ServerFlags"
   Option       "AllowEmptyInput"   "no"
EndSection

Section   "Monitor"
   Identifier   "Monitor0"
   VendorName   "Unknown"
   ModelName   "Unknown"
   HorizSync   28.0 - 73.0
   VertRefresh   43.0 - 72.0
   Option      "DPMS"
EndSection

Section   "Device"
   Identifier   "Device1"
   Driver      "intel"
   VendorName   "onboard"
   BusID      "PCI:0:2:0"
   #Screen      1
EndSection

Section   "Screen"
   Identifier   "Screen0"
   Device      "Device1"
   Monitor      "Monitor0"
   DefaultDepth   24
   SubSection   "Display"
      Depth   24
   EndSubSection
EndSection

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        Option "VertEdgeScroll" "on"
        Option      "CircularScrolling"         "on"
        Option      "VertScrollDelta"          "-111"
        Option      "HorizScrollDelta"         "-111"
        Option      "TapButton1"                    "1"
EndSection


Code:
 $ eix -I nvidia
[I] dev-libs/nvidia-cuda-cudnn [2]
     Available versions:  (~)7.0^f
     Installed versions:  7.0^f(12:12:53 AM 12/05/2017)
     Homepage:            https://developer.nvidia.com/cuDNN
     Description:         NVIDIA cuDNN GPU Accelerated Deep Learning

[I] dev-util/nvidia-cuda-toolkit
     Available versions:  [M](~)6.5.14(0/6.5.14) [M](~)6.5.19-r1(0/6.5.19) [M](~)7.5.18-r2(0/7.5.18) [M](~)8.0.44(0/8.0.44) [M](~)8.0.61(0/8.0.61) (~)9.0.176(0/9.0.176) (~)9.1.85(0/9.1.85) (~)9.2.88(0/9.2.88) (~)10.0.130(0/10.0.130) (~)10.1.105-r1(0/10.1.105) {debugger doc eclipse profiler}
     Installed versions:  10.1.105-r1(0/10.1.105)(09:51:26 PM 04/29/2019)(profiler -debugger -doc -eclipse)
     Homepage:            https://developer.nvidia.com/cuda-zone
     Description:         NVIDIA CUDA Toolkit (compiler and friends)

[I] x11-drivers/nvidia-drivers
     Available versions:  340.107-r1(0/340)^md 390.116-r2(0/390)^md 410.104-r2(0/410)^md 415.27-r2(0/415)^md 418.56(0/418)^md (~)430.09(0/430)^md {+X acpi compat +driver gtk3 +kms multilib static-libs +tools uvm wayland ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD linux"}
     Installed versions:  430.09(0/430)^md(05:59:38 PM 04/30/2019)(X acpi compat driver multilib tools -gtk3 -kms -static-libs -uvm -wayland ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" KERNEL="linux -FreeBSD")
     Homepage:            https://www.nvidia.com/
     Description:         NVIDIA Accelerated Graphics Driver

[I] x11-misc/nvidia-xrun-pm [1]
     Available versions:  (**)9999
     Installed versions:  9999(06:00:22 PM 04/30/2019)
     Homepage:            https://github.com/michelesr/nvidia-xrun-pm
     Description:         Script to run dedicated X server with discrete nvidia graphics


Code:
[profile=]$ eix -I intel
[I] dev-util/intel-ocl-sdk
     Available versions:  2.0.31360^m ~4.4.0.117-r1^m {android +system-boost system-clang +system-tbb tools}
     Installed versions:  2.0.31360^m(07:17:28 AM 05/12/2017)(-tools)
     Homepage:            http://software.intel.com/en-us/articles/opencl-sdk/
     Description:         Intel's implementation of the OpenCL standard

[I] x11-drivers/xf86-video-intel
     Available versions:  2.99.917_p20180214-r1 2.99.917_p20180214-r2 ~2.99.917_p20190301 **9999 {debug dri dri3 +sna tools +udev uxa xvmc KERNEL="linux"}
     Installed versions:  2.99.917_p20180214-r2(09:02:17 PM 04/29/2019)(dri sna udev -debug -dri3 -tools -uxa -xvmc KERNEL="linux")
     Homepage:            https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel
     Description:         X.Org driver for Intel cards


Code:
 $ eix -I xorg
[I] x11-base/xorg-drivers
     Available versions:  1.20 **9999 {INPUT_DEVICES="elographics evdev joystick keyboard libinput mouse synaptics vmmouse void wacom" VIDEO_CARDS="amdgpu ast dummy fbdev freedreno geode glint i915 i965 intel mga nouveau nv nvidia omap qxl r128 radeon radeonsi siliconmotion tegra vc4 vesa via virtualbox vmware"}
     Installed versions:  1.20(10:30:12 AM 04/30/2019)(INPUT_DEVICES="evdev joystick keyboard mouse synaptics wacom -elographics -libinput -vmmouse -void" VIDEO_CARDS="i915 intel nvidia -amdgpu -ast -dummy -fbdev -freedreno -geode -glint -i965 -mga -nouveau -nv -omap -qxl -r128 -radeon -radeonsi -siliconmotion -tegra -vc4 -vesa -via -virtualbox -vmware")
     Homepage:            https://www.gentoo.org/
     Description:         Meta package containing deps on all xorg drivers

[I] x11-base/xorg-proto
     Available versions:  2018.4 **9999
     Installed versions:  2018.4(08:31:26 PM 04/29/2019)
     Homepage:            https://gitlab.freedesktop.org/xorg/proto/xorgproto
     Description:         X.Org combined protocol headers

[I] x11-base/xorg-server
     Available versions:  1.20.3(0/1.20.3) 1.20.4(0/1.20.4) **9999(0/9999) {debug dmx doc elogind +glamor ipv6 kdrive libressl minimal selinux static-libs +suid systemd +udev unwind wayland xcsecurity xephyr xnest xorg xvfb}
     Installed versions:  1.20.4(0/1.20.4)(08:37:47 PM 04/29/2019)(glamor ipv6 kdrive suid udev xephyr xnest xorg -debug -dmx -doc -elogind -libressl -minimal -selinux -static-libs -systemd -unwind -wayland -xcsecurity -xvfb)
     Homepage:            https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/xserver/xorg-server
     Description:         X.Org X servers


Code:
 $ gcc --version
gcc (Gentoo 8.2.0-r6 p1.7) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Code:
 $ clang --version
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/8/bin


Code:
$ eix -I linux-firmware
[I] sys-kernel/linux-firmware
     Available versions:  20190313^bs 20190409^bs (~)20190424^bs **99999999^bs {savedconfig}
     Installed versions:  20190424^bs(04:42:34 PM 04/30/2019)(savedconfig)
     Homepage:            https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git
     Description:         Linux firmware files


Code:
$ eix -I bumblebee
[I] x11-misc/bumblebee
     Available versions:  3.2.1 ~3.2.1_p20170123 ~3.2.1_p20170130 (**)9999 (**)9999[1] {+bbswitch VIDEO_CARDS="nouveau nvidia"}
     Installed versions:  9999[1](06:00:41 PM 04/30/2019)(bbswitch VIDEO_CARDS="nvidia -nouveau")
     Homepage:            http://bumblebee-project.org https://github.com/Bumblebee-Project/Bumblebee
     Description:         Service providing elegant and stable means of managing Optimus graphics chipsets

[1] "bumblebee" /var/lib/layman/bumblebee


Code:
$ eix -I primus
[I] x11-misc/primus
     Available versions:  ~0.2 (**)9999[1] {ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  9999[1](06:01:03 PM 04/30/2019)(ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            https://github.com/amonakov/primus
     Description:         Faster OpenGL offloading for Bumblebee



What's the problem, what am I doing wrong, why can I not run nvidia?

Thanks,
Vlad


Last edited by madjestic on Thu May 02, 2019 7:56 am; edited 1 time in total
Back to top
View user's profile Send private message
runningnak3d
n00b
n00b


Joined: 05 Sep 2018
Posts: 61

PostPosted: Tue Apr 30, 2019 9:00 pm    Post subject: Reply with quote

It has been about a month since I have played any games so I hadn't noticed this.

I will be doing some digging later to try and find out what is wrong, but I can confirm that I get the same errors as you, and I use both bumblebee and nvidia-xrun.

I am leaving work, so I can't post my logs / info right now -- but I will ASAP just so we have something for comparison. Looking at what you have posted though, your setup seems very similar.

Bottom line -- you aren't doing anything wrong, something is broke that was working.

-- Brian
Back to top
View user's profile Send private message
hhfeuer
Apprentice
Apprentice


Joined: 28 Jul 2005
Posts: 184

PostPosted: Wed May 01, 2019 1:08 pm    Post subject: Reply with quote

Try emerging nvidia drivers with USE="-compat"
https://devtalk.nvidia.com/default/topic/1050786/linux/nvidia-drivers-430-09-causes-xorg-segfault-at-start-/
Back to top
View user's profile Send private message
runningnak3d
n00b
n00b


Joined: 05 Sep 2018
Posts: 61

PostPosted: Wed May 01, 2019 2:53 pm    Post subject: Reply with quote

hhfeuer wrote:
Try emerging nvidia drivers with USE="-compat"
https://devtalk.nvidia.com/default/topic/1050786/linux/nvidia-drivers-430-09-causes-xorg-segfault-at-start-/


Thank you very much -- great find. I will post the results as soon as my world emerge finishes.

EDIT:

OK -- tested the rebuild with -compat and that solved it.

I had primus installed, and that had to be removed because it requires compat, but optirun works fine -- and I mainly use nvidia-xrun.


-- Brian
Back to top
View user's profile Send private message
madjestic
n00b
n00b


Joined: 10 Oct 2013
Posts: 15

PostPosted: Wed May 01, 2019 9:26 pm    Post subject: Reply with quote

Hey guys,

After trying the suggested workaround, I am getting the following error:

Code:
 $ optirun glxgears
[   68.492514] [ERROR]Accel/display bridge primus is not installed.


- It looks like optirun still requires primus? How did you manage to run it without it?


With nvidia-xrun I am getting the following:
Code:

 $ nvidia-xrun glxgears
/usr/bin/nvidia-xrun: line 34: /etc/default/nvidia-xrun: No such file or directory
Couldn't get a file descriptor referring to the console
Turning the card on
Password:
tee: /sys/bus/pci/devices//power/control: No such file or directory
on


X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.19.27-gentoo-r1 x86_64 Gentoo
Current Operating System: Linux nu 4.19.27-gentoo-r1 #5 SMP PREEMPT Tue Apr 30 17:54:20 CEST 2019
Kernel command line: BOOT_IMAGE=/vmlinuz-4.19.27-gentoo-r1 root=/dev/sda4 ro
Build Date: 29 April 2019  08:32:14PM
 
Current version of pixman: 0.38.4
   Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.


Xorg.1.log ->https://paste.ofcode.org/jiaPUFhrP8FaiaZuDPtvDa

Cheers,
Vlad

P.S. runningnak3d, would you mind showing your xorg.conf file, please?
Back to top
View user's profile Send private message
madjestic
n00b
n00b


Joined: 10 Oct 2013
Posts: 15

PostPosted: Thu May 02, 2019 7:56 am    Post subject: Reply with quote

[SOLVED]

Setting bumblebee.conf to:
Code:
Bridge=virtualgl


- fixes the issue.


Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum