You are not logged in.

#1 2020-10-01 21:14:29

speltriao
Member
Registered: 2020-09-04
Posts: 10

[SOLVED] NVIDIA as Primary GPU not working

Hello, I'm using (pure) Arch Linux with linux-lts. I'm trying to use NVIDIA as my primary GPU (turning off intel graphics) in my laptop.

I installed nvidia-lts and ran nvidia-xconfig (exactly as suggested https://wiki.archlinux.org/index.php/NV … stallation).The installation succeeded.

After a reboot I followed this section (https://wiki.archlinux.org/index.php/NV … phics_only). My /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf, ~/.xinitrc and GDM are identical as in the manual.

After rebooting again, I get the following errors:

nvidia-settings

  "ERROR: Unable to find display on any available system"



 nvidia-smi 

Thu Oct  1 21:03:01 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.23.04    Driver Version: 455.23.04    CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce MX250       Off  | 00000000:02:00.0 Off |                  N/A |
| N/A   40C    P8    N/A /  N/A |      0MiB /  2002MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+


 glxinfo | grep NVIDIA 

returns nothing


The funniest thing is that this setup used to work last time I used Arch (2 months ago). Please, help.

Last edited by speltriao (2020-10-02 14:41:55)

Offline

#2 2020-10-01 21:27:33

seth
Member
Registered: 2012-09-03
Posts: 51,175

Re: [SOLVED] NVIDIA as Primary GPU not working

speltriao wrote:

I installed nvidia-lts and ran nvidia-xconfig

Wiki wrote:

The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file.

Please post your xorg config and the actual output of "glxinfo" (at least "glxinfo | head -n60") so we can see what *is* being used.

~/.xinitrc and GDM are identical as in the manual

GDM doesn't use xinitrc - let's also see "loginctl session-status"

Offline

#3 2020-10-01 22:03:34

speltriao
Member
Registered: 2020-09-04
Posts: 10

Re: [SOLVED] NVIDIA as Primary GPU not working

Thanks for the reply. 

The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file.

After reading this, I've formatted my HDD and reinstalled Arch Linux (just in case).

I've reinstalled linux-lts and nvidia-lts without running nvidia-xconfig. I also did https://wiki.archlinux.org/index.php/NV … phics_only again.

I'm also using LightDM and XFCE4 now because of  ~/.xinitrc.

Still facing the same issue:

 glxinfo | head -n6 

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4


 nano ~/.xinitrc 

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


 loginctl-session-status 

2 - speltriao (1000)
           Since: Thu 2020-10-01 21:53:15 UTC; 7min ago
          Leader: 462 (lightdm)
            Seat: seat0; vc7
         Display: :0
         Service: lightdm; type x11; class user
         Desktop: xfce
           State: active
            Unit: session-2.scope
                  |- 462 lightdm --session-child 14 21
                  |- 481 xfce4-session
                  |- 529 xfwm4
                  |- 538 xfsettingsd
                  |- 539 xfce4-panel
                  |- 545 Thunar --daemon
                  |- 550 xfdesktop
                  |- 553 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/>
                  |- 554 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/>
                  |- 555 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/>
                  |- 567 /usr/lib/polkit-gnome/polkit-gnome-authentication-agen>
                  |- 570 xfce4-power-manager
                  |- 606 /usr/bin/xfce4-terminal
                  |- 611 bash
lines 1-23...skipping...
2 - speltriao (1000)
           Since: Thu 2020-10-01 21:53:15 UTC; 7min ago
          Leader: 462 (lightdm)
            Seat: seat0; vc7
         Display: :0
         Service: lightdm; type x11; class user
         Desktop: xfce
           State: active
            Unit: session-2.scope
                  |- 462 lightdm --session-child 14 21
                  |- 481 xfce4-session
                  |- 529 xfwm4
                  |- 538 xfsettingsd
                  |- 539 xfce4-panel
                  |- 545 Thunar --daemon
                  |- 550 xfdesktop
                  |- 553 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libsystray.so 6 14680072 systray Notification Area Area where notification icons appear
                  |- 554 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libxfce4powermanager.so 9 14680073 power-manager-plugin Power Manager Plugin Display the battery level>
                  |- 555 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libactions.so 14 14680074 actions Action Buttons Log out, lock or other system actions
                  |- 567 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
                  |- 570 xfce4-power-manager
                  |- 606 /usr/bin/xfce4-terminal
                  |- 611 bash
                  |- 625 xfce4-appfinder
                  |- 630 /usr/lib/firefox/firefox
                  |- 687 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 222488 -parentBuildID 20201001181215 -appdir /usr/lib/firefox/browser 630 tr>
                  |- 744 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 803 -prefMapSize 222488 -parentBuildID 20201001181215 -appdir /usr/lib/firefox/browser 630 >
                  |- 773 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 6941 -prefMapSize 222488 -parentBuildID 20201001181215 -appdir /usr/lib/firefox/browser 630>
                  |- 866 /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 7739 -prefMapSize 222488 -parentBuildID 20201001181215 -appdir /usr/lib/firefox/browser 630>
                  |- 926 /usr/lib/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 7852 -prefMapSize 222488 -parentBuildID 20201001181215 -appdir /usr/lib/firefox/browser 630>
                  |-1111 /usr/lib/firefox/firefox -contentproc -childID 8 -isForBrowser -prefsLen 9691 -prefMapSize 222488 -parentBuildID 20201001181215 -appdir /usr/lib/firefox/browser 630>
                  |-1203 /usr/lib/firefox/firefox -contentproc -childID 9 -isForBrowser -prefsLen 9967 -prefMapSize 222488 -parentBuildID 20201001181215 -appdir /usr/lib/firefox/browser 630>
                  |-1241 loginctl session-status
                  `-1242 less

Oct 01 21:53:15 spel-arch systemd[1]: Started Session 2 of user speltriao.
Oct 01 21:53:16 spel-arch pkexec[597]: pam_unix(polkit-1:session): session opened for user root(uid=0) by (uid=1000)


And...
/etc/X11/xorg.conf doesn't exist.
/etc/X11/xorg.conf.d/ contains only 10-nvidia-drm-outputclass.conf (created using the NVIDIA Optimus Arch Manual)

Last edited by speltriao (2020-10-01 22:09:13)

Offline

#4 2020-10-02 05:47:45

seth
Member
Registered: 2012-09-03
Posts: 51,175

Re: [SOLVED] NVIDIA as Primary GPU not working

Please wrap the shell output in code tags, https://bbs.archlinux.org/help.php#bbcode

Also

seth wrote:

glxinfo | head -n60

- the first 6 lines tell little to nothing. But it already looks like you're using some mesa driver, likely on the intel chip.

Lightdm doesn't use xinitrc either, please see https://wiki.archlinux.org/index.php/Li … ng_monitor and also stop creating a moving target.
The session status is now irrelevant because you're not using wayland (on intel) for sure.

To get us an overview on the system you created, please post the entire xorg log as well.

Offline

#5 2020-10-02 11:00:45

speltriao
Member
Registered: 2020-09-04
Posts: 10

Re: [SOLVED] NVIDIA as Primary GPU not working

Thanks for the reply and for your time.

My Xorg Log: https://pastebin.com/5ZxaWdCf

glxinfo | head -n60
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_no_error, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_no_config_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context, 
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile, 
    GLX_EXT_create_context_es_profile, GLX_EXT_fbconfig_packed_float, 
    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_no_error, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_OML_swap_method, 
    GLX_OML_sync_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) UHD Graphics 620 (WHL GT2) (0x3ea0)
    Version: 20.1.8
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2

Offline

#6 2020-10-02 12:24:32

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED] NVIDIA as Primary GPU not working

The xorg log doesn't show any sign of using /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf .
post its contents and ls -lR /etc/X11/

Also look at the prime page again and scroll  a bit down to find instructions how to setup lightdm to execute those xrandr commands.

Last edited by Lone_Wolf (2020-10-02 12:25:01)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#7 2020-10-02 12:32:40

speltriao
Member
Registered: 2020-09-04
Posts: 10

Re: [SOLVED] NVIDIA as Primary GPU not working

Thanks for the reply and for your time.

 $ls -lR /etc/X11/
/etc/X11/:
total 8
drwxr-xr-x 3 root root 4096 Oct  1 21:48 xinit
drwxr-xr-x 2 root root 4096 Oct  2 01:01 xorg.conf.d

/etc/X11/xinit:
total 12
-rw-r--r-- 1 root root  739 May 16 14:02 xinitrc
drwxr-xr-x 2 root root 4096 Oct  1 21:48 xinitrc.d
-rw-r--r-- 1 root root   45 May 16 14:02 xserverrc

/etc/X11/xinit/xinitrc.d:
total 8
-rwxr-xr-x 1 root root 318 May  7 17:32 40-libcanberra-gtk-module.sh
-rwxr-xr-x 1 root root 199 Sep 20 19:56 50-systemd-user.sh

/etc/X11/xorg.conf.d:
total 4
-rw-r--r-- 1 root root 362 Oct  2 01:01 10-nvidia-drm-outputclass.conf

My lightdm is as in the wiki (for the xrandr commands)


My /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf: https://pastebin.com/YEzZSMgA

My /etc/lightdm/display_setup.sh (marked as executable):

#!/bin/sh

xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto

My /etc/lightdm/lightdm.conf: https://pastebin.com/CgZtZjvX

My pacman -Qs nvidia: https://pastebin.com/epHdxEv2

Offline

#8 2020-10-02 12:48:24

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED] NVIDIA as Primary GPU not working

Looks like you setup things correctly.

I did notice that conf file will only work if nvidia-drm has finished initialising .
please reboot , post dmesg and/or journalctl -b , also fresh xorg log and your /etc/mkinitcpio.conf


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#9 2020-10-02 12:59:27

speltriao
Member
Registered: 2020-09-04
Posts: 10

Re: [SOLVED] NVIDIA as Primary GPU not working

Thanks for the reply.

After a reboot:

My dmesg: https://pastebin.com/pN4XiPdz

My journalctl -b: https://pastebin.com/Q7MwujAt

My (fresh ) xorg log: https://pastebin.com/USS9rbRD

My /etc/mkinitcpio.conf: https://pastebin.com/KPQzhEAD

Offline

#10 2020-10-02 13:38:47

seth
Member
Registered: 2012-09-03
Posts: 51,175

Re: [SOLVED] NVIDIA as Primary GPU not working

The journal is missing the important parts in the center…
The X11 server still runs on the intel chip only, see https://wiki.archlinux.org/index.php/NV … de_setting add the kernel parameter and also move the modules into the initramfs for early KMS

Offline

#11 2020-10-02 13:57:17

speltriao
Member
Registered: 2020-09-04
Posts: 10

Re: [SOLVED] NVIDIA as Primary GPU not working

Thanks for the reply.

I followed the wiki and added nvidia-drm.modeset=1 to my GRUB /etc/default/grub like this:

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet nvidia-drm.modeset=1" 

And then:

 sudo grub-mkconfig -o /boot/grub/grub.cfg

After a reboot, nothing changed. Neither nvidia-settings nor nvidia-smi.

Offline

#12 2020-10-02 14:01:08

seth
Member
Registered: 2012-09-03
Posts: 51,175

Re: [SOLVED] NVIDIA as Primary GPU not working

seth wrote:

also move the modules into the initramfs for early KMS

Offline

#13 2020-10-02 14:40:38

speltriao
Member
Registered: 2020-09-04
Posts: 10

Re: [SOLVED] NVIDIA as Primary GPU not working

Yes!!! This worked! Thank you.

I made a small .txt file with all the steps for this setting. Might be useful for future reference: https://pastebin.com/bZ1b9XA0

Thank you for your help and have a nice day!

Last edited by speltriao (2020-10-02 16:05:32)

Offline

Board footer

Powered by FluxBB