Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Optimus problems
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
UnclePa
n00b
n00b


Joined: 05 Apr 2019
Posts: 19

PostPosted: Mon Sep 09, 2019 11:54 pm    Post subject: [SOLVED] Optimus problems Reply with quote

I'm trying to get the discrete Nvidia GPU working on a new Gentoo installation. Everything looks
good until I do "optirun glxgears" and I get
Code:
[10672.609158] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied


The main suggestion I've found is adding "-compat" to the nvidia-drivers USE flags. That doesn't
fix the problem for me.

Some anomalies that I've noticed is that there is only "dev/dri/card0". Other examples I've seen online
show that and "dev/dri/card1".
xrandr --listproviders only lists one provider, "Intel". Examples indicate there should also be "NVIDIA-0".

I've tried setting up X to run with only the Nvidia GPU according to the NVIDIA/nvidia-drivers page
but with no success. The config from nvidia-xconfig causes a "No screens found" error.

I've tried following the NVIDIA/Bumblebee page but it is rather confusing for it tells you to configure
the system for the NVIDIA/nvidia-drivers page which tells you to turn off kernel DRM. Later it tells
you also to configure the system according to the "Intel" page, which tells you to make sure kernel
DRM is on. I've tried both and neither work so not sure which to stick with.

I've tried the xrandr approach from the "NVIDIA/Optimus" page but that results in a black screen.
There are no EEs in the log file and the WWs look pretty harmless to me.

My guess is that the lack of dev/card1 and/or xrandr listing only one provider is significant but
haven't found any solution (and don't know if it even needs one).

I'm still a Gentoo newb and am probably missing something simple. Any help would be appreciated.
I would be content if I could just get it working the the Nvidia GPU only, but switching would be nice.[/code]


Last edited by UnclePa on Tue Sep 10, 2019 8:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1704
Location: United Kingdom

PostPosted: Tue Sep 10, 2019 8:16 am    Post subject: Reply with quote

My Clevo W230SS laptop has Optimus hardware. You probably have a different model of laptop, but, in case it's of any help to you, I explain in another thread (see link below) how I got my laptop working (including HDMI) with the NVIDIA closed-source driver and the Intel driver. I don't use Bumblebee, though; I switch between either driver by running a script then logging out of the Desktop Environment (KDE, in my case) and logging back in again.

https://forums.gentoo.org/viewtopic-p-8114450.html#8114450
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2414
Location: イタリアのロディで

PostPosted: Tue Sep 10, 2019 8:33 am    Post subject: Reply with quote

HDMI magically got working installing nouveau drivers.
Did not investigated more, I was only seeking HDMI functionality.
_________________
Il numero di post non fa di me un esperto! Anzi!
Back to top
View user's profile Send private message
UnclePa
n00b
n00b


Joined: 05 Apr 2019
Posts: 19

PostPosted: Tue Sep 10, 2019 12:50 pm    Post subject: Reply with quote

Thanks, Fitz. I removed Bumblebee and tried your suggestion. The Intel side works fine as it did before,
but the nvidia side just gives me a black screen. I am getting an EE on glamor and the dri portion around
28713.115 looks a bit odd that only card0 is added as a drm device. Not sure about the GLX part either.
Someone more knowledgeable may see something else here.

Edit: According to Nvidia page, glamor conflicts, so I'll try to make sure it doesn't try to load it.

I am a member of the video group and my BusId numbers are the same as yours so I don't think I needed
to make any changes other than the path to the xorg.conf files. Also, after every kernel rebuild I do
"emerge @module-rebuild" to keep nvidia drivers in sync.

My Xorg.0.log for the black screen: http://dpaste.com/0VMJ474


Last edited by UnclePa on Tue Sep 10, 2019 4:05 pm; edited 2 times in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7196
Location: Saint Amant, Acadiana

PostPosted: Tue Sep 10, 2019 2:21 pm    Post subject: Reply with quote

First, I don't have any first hand Optimus experience. I'd like to point out there are several variations of hybrid graphics. One of them is Optimus. If you search these forums then you will find NeddySeagoon has explained in several threads how muxless hybrid graphics works. You may want to read it, it always helps if you know what you are dealing with and how it works underneath.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1704
Location: United Kingdom

PostPosted: Tue Sep 10, 2019 5:55 pm    Post subject: Reply with quote

UnclePa,

In case you want to compare your kernel configuration and package USE flags with mine (let me know if you want more):

Code:
$ grep VIDEO /usr/src/linux/.config | grep -v "is not set"
CONFIG_ACPI_VIDEO=y
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_VIDEOBUF2_CORE=y
CONFIG_VIDEOBUF2_V4L2=y
CONFIG_VIDEOBUF2_MEMOPS=y
CONFIG_VIDEOBUF2_VMALLOC=y

Code:
$ grep DRM /usr/src/linux/.config | grep -v "is not set"
CONFIG_DRM=y
CONFIG_DRM_MIPI_DSI=y
CONFIG_DRM_DP_AUX_CHARDEV=y
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_FB_HELPER=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_I915=y
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
CONFIG_DRM_VGEM=y
CONFIG_DRM_PANEL=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y

Code:
$ grep VIDEO /etc/portage/make.conf
VIDEO_CARDS="intel i915 i965 modesetting nvidia"

Code:
$ eix -I nvidia-drivers | grep Installed
     Installed versions:  430.40(0/430)^t(23:23:49 20/08/19)(X acpi driver kms multilib tools wayland -compat -gtk3 -static-libs -uvm ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="32 64 -x32" KERNEL="linux -FreeBSD")

Code:
$ eix -I xorg | grep "Installed\|x11-"
[I] x11-base/xorg-drivers
     Installed versions:  1.20(21:51:42 03/08/19)(INPUT_DEVICES="evdev synaptics -elographics -joystick -keyboard -libinput -mouse -vmmouse -void -wacom" VIDEO_CARDS="i915 i965 intel nvidia -amdgpu -ast -dummy -fbdev -freedreno -geode -glint -mga -nouveau -nv -omap -qxl -r128 -radeon -radeonsi -siliconmotion -tegra -vc4 -vesa -via -virtualbox -vmware")
[I] x11-base/xorg-proto
     Installed versions:  2019.1(01:34:52 28/07/19)
[I] x11-base/xorg-server
     Installed versions:  1.20.5(0/1.20.5)(03:20:23 09/08/19)(elogind glamor ipv6 suid udev wayland xorg -debug -dmx -doc -kdrive -libressl -minimal -selinux -static-libs -systemd -unwind -xcsecurity -xephyr -xnest -xvfb)
[I] x11-misc/xorg-cf-files
     Installed versions:  1.0.6-r1(15:20:37 03/05/19)

Code:
$ eix -I xf86-video-intel | grep Installed
     Installed versions:  2.99.917_p20190301(01:56:25 28/07/19)(dri sna udev -debug -tools -uxa -xvmc KERNEL="linux")

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
UnclePa
n00b
n00b


Joined: 05 Apr 2019
Posts: 19

PostPosted: Tue Sep 10, 2019 8:44 pm    Post subject: Reply with quote

Thanks so much, Fitz! We got it! Unfortunately I did a machine gun approach and made
several changes at once so I'm not sure exactly which fixed it. I strongly suspect it was
putting "kms" back in the nvidia-drivers USE flags. The Bumblebee page has you remove
it. Also, I now have dev/dri/card0, card1, AND card2. Not sure what to make of that
but it seems to be working. xrandr -listproviders now also has NVIDIA-0 and glxgears
gives >11k fps. Thanks again!
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1704
Location: United Kingdom

PostPosted: Tue Sep 10, 2019 10:00 pm    Post subject: Reply with quote

\o/

You're welcome.
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
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