You are not logged in.

#1 2020-01-29 19:46:22

Cookie23
Member
Registered: 2018-10-24
Posts: 11

[SOLVED] NVIDIA driver not loaded (Optimus)

Hello,
I have two graphic cards on my laptop, Intel Graphics and Nvidia. I would like to use only Nvidia because the other solutions always had problems on my other distros. So I followed this guide (https://wiki.archlinux.org/index.php/NV … phics_only) and... it doesn't work for me.

Here is the output of 'lspci -k | grep -A 2 -E "(VGA|3D)"' :

00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0e)
	Subsystem: Hewlett-Packard Company Atom Processor Z36xxx/Z37xxx Series Graphics & Display
	Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
	Subsystem: Hewlett-Packard Company GeForce 820M
	Kernel modules: nouveau, nvidia_drm, nvidia

And here are the steps I followed :
- I installed nvidia package
- I created '/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf' file with the same content on the wiki :

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

- I added these two lines in the beginning of ~/.xprofile :

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

And 'glxinfo | grep NVIDIA' didn't display anything, and nvidia-settings told me the driver was not loaded.

So I even appended 'rcutree.rcu_idle_gp_delay=1' parameter to the kernel (in /etc/default/grub), without any change.

(And here is my xorg log file, I don't really know what I should read there : https://pastebin.com/s3CwdKD8)

Last edited by Cookie23 (2020-01-30 16:59:40)

Offline

#2 2020-01-29 20:38:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

That's a Fermi card, you need nvidia-390xx and (lib32)-nvidia-390xx-utils for that.

If you did and it doesn't work, post your dmesg.

Last edited by V1del (2020-01-29 20:39:41)

Offline

#3 2020-01-29 21:27:40

Cookie23
Member
Registered: 2018-10-24
Posts: 11

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

I removed nvidia and installed nvidia-390xx (pacman says lib32-nvidia-390xx-utils doesn't exist), and it's leading to a black screen, I only can see the tty if I switch to it.

dmesg output : https://pastebin.com/8uEZuJct

Offline

#4 2020-01-29 21:36:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

What are you intending to start xorg with? If startx you shouldn't put these commands into your .xprofile (in general you shouldn't, for DMs you would be too late) but your .xinitrc (or at least ensure you are sourcing that in your .xinitrc)

FWIW what's your xorg log and your .xinitrc now?

Last edited by V1del (2020-01-29 21:36:37)

Offline

#5 2020-01-29 21:45:02

Cookie23
Member
Registered: 2018-10-24
Posts: 11

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

I also already added it in .xinitrc even if I think it's useless because I'm using lxdm running as a deamon. So you think it may be too late ? How could I fix it since I pasted the same two lines in .xinitrc ?

xorg log : https://pastebin.com/Khc9je5P

Last edited by Cookie23 (2020-01-29 21:46:29)

Offline

#6 2020-01-29 21:54:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

https://wiki.archlinux.org/index.php/LXDM#Configuration - I suspect add them to LoginReady or PreLogin

If that doesn't work, use one of the display managers that has an explicitly mentioned and verified to work configuration option in that page.

Last edited by V1del (2020-01-29 21:55:33)

Offline

#7 2020-01-29 22:07:50

Cookie23
Member
Registered: 2018-10-24
Posts: 11

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

It doesn't work, so I'll check for another display manager, but I'm wondering if I'll get the same problem

Offline

#8 2020-01-30 10:28:27

Cookie23
Member
Registered: 2018-10-24
Posts: 11

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

So, I disabled lxdm and manually entered 'startx' and the same annoying black screen appeared. I'm sure the nvidia driver is loaded first :

.xinitrc :

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xcompmgr &
xmodmap .xmodmap.conf &
xbindkeys &
exec dwm &
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
ibus-daemon -d -x

And here is the new xorg log : https://pastebin.com/M8HbZut7

I see many warnings and errors in the log file but I don't know how to understand them.

Last edited by Cookie23 (2020-01-30 10:29:28)

Offline

#9 2020-01-30 14:04:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

The server in the log ran only for less than a second?

Let's first clean up the xinitrc (please read https://wiki.archlinux.org/index.php/Xinit#xinitrc )

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
# xcompmgr & # no compositor for the moment
xmodmap ~/.xmodmap.conf # no forking, use full path
xbindkeys &
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
ibus-daemon -d -x
exec dwm # forking exec does not what you might even expect and this should be the last call as well

Sidenote:

I would like to use only Nvidia because the other solutions always had problems on my other distros.

This is bonkers. It's not ideal for the HW (since the intel chip is the only VGA device, so you *have* to traverse it) and possibly not even desired (battery use?) and "I use X because Ubuntu" isn't a valid reason anyway.
Once you understood what's going on and got the present approach working, you might want to reconsider the overall approach.

Offline

#10 2020-01-30 16:58:04

Cookie23
Member
Registered: 2018-10-24
Posts: 11

Re: [SOLVED] NVIDIA driver not loaded (Optimus)

omg thanks it works !

seth wrote:

Let's first clean up the xinitrc

Yes, I completely missed that point. And I only tried to use Nvidia only because when I first tried it on Ubuntu, the others solutions were very buggy and I don't really want to try all the same things again. This installation is for playing video games, I do my other activities on other partitions with Intel chipset.

Thank you all for your help !

Offline

Board footer

Powered by FluxBB