You are not logged in.

#1 2024-03-24 03:00:02

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

[SOLVED] Cannot configure X with nvidia drivers.

Hello.
I am pretty new to arch, and after a while I switched to the proprietary nvidia driver; my computer booted normally, my sddm doesn't work on boot and I kinda never bothered to fix it so I would just switch to tty3 and login as root, then run systemctl restart sddm.
anyways, after running nvidia-settings, it told me that I was not using the nvidia driver for X and that I should just run nvidia-xconfig as root and restart the X server; now of course, I didn't know that the command usually doesn't work and so I ran it and rebooted my computer, to which I saw sddm not loading as usual, however this time trying to restart the daemon wouldn't work and would return the error "Failed to read display number from pipe".
Now if I'm not mistaken, I could have just used the backup xorg config file that might've been backed up by nvidia-xconfig, but I probably ruined it by running nvidia-xconfig again, and in any way, the backup file was lost, if there even was any config file for the nouveau driver I used before.
I tried using X -configure which returned an ABI error so I just used told it to not care about the ABI and then moved the new config file to /etc/X11/xorg.config, but then it would just show the Nvidia logo for a frame or two and then show a black screen.
upon surfing the web I found out I can just remove the xorg.config file and it would work, and it did, but now my problem is that I can't configure X because well, there is no config file.
I also tried using lightdm, but it would tell me "Start request repeated too quickly".
I also might've missed some stuff or said somethings in the wrong order, I don't completely remember.
and by the way, my graphic card is GeForce GT 220 which is no longer supported, and I installed nvidia-340xx-dkms using yay.
Thanks in advance.

Last edited by adam_Barfi (2024-03-27 14:04:05)

Offline

#2 2024-03-24 09:31:37

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

anyways, after running nvidia-settings, it told me that I was not using the nvidia driver for X and that I should just run nvidia-xconfig as root and restart the X server

Don't do anything like this.

Remove /etc/X11/xorg.conf and post your Xorg log, https://wiki.archlinux.org/title/Xorg#General

Offline

#3 2024-03-24 10:16:45

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

Remove /etc/X11/xorg.conf and post your Xorg log

I had already deleted the configuration file as said in the post, and here's my Xorg log from /var/log/Xorg.0.log.

Offline

#4 2024-03-24 10:26:23

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

[    61.136] (II) xfree86: Adding drm device (/dev/dri/card0)
[    61.136] (II) Platform probe for /sys/devices/platform/simple-framebuffer.0/drm/card0
[    61.163] (II) modeset(0): using drv /dev/dri/card0

You're running on the simpledrm device => please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st
[    61.134] Current Operating System: Linux mansamusa 6.8.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:35 +0000 x86_64

Most likely the 340xx driver didn't build against 6.8 because of the recent GPL symbol expansions.
GTry the LTS kernel (don't forget linux-lts-headers)

Offline

#5 2024-03-24 11:11:38

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

please post your complete system journal for the boot

Here's the journal, and btw I rebooted after the previous Xorg log so here's the Xorg log for the new boot if you need it.
Oh and by the way, I switched to termbin because 0x0.st wasn't working for some reason.

Last edited by adam_Barfi (2024-03-24 11:12:04)

Offline

#6 2024-03-24 13:54:01

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

Mar 24 14:34:05 mansamusa kernel: nvidia 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=io+mem
Mar 24 14:34:05 mansamusa kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  340.108  Wed Dec 11 11:06:58 PST 2019

seems to load fine enough.

pacman -Qikkl nvidia-340xx-utils
lsmod | grep nvidia

And  enable https://wiki.archlinux.org/title/NVIDIA … de_setting - use the "nvidia_drm.modeset=1" kernel parameter (modprobe.conf won't do!) to get rid of the simpledrm device.

And

seth wrote:

Try the LTS kernel (don't forget linux-lts-headers)

Offline

#7 2024-03-25 02:48:25

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

And  enable https://wiki.archlinux.org/title/NVIDIA … de_setting - use the "nvidia_drm.modeset=1" kernel parameter (modprobe.conf won't do!) to get rid of the simpledrm device.

I used /etc/default/grub and grub-mkconfig to add the kernel parameter but after a reboot sddm wouldn't load(keep in mind systemctl would show that sddm started just fine)
Here's the journal and the Xorg log from this boot.
Also here's the output of the pacman command and lsmod command you sent.

seth wrote:

Try the LTS kernel (don't forget linux-lts-headers)

Do I just need to install linux-lts and linux-lts-headers to switch to the LTS kernel?

Offline

#8 2024-03-25 08:30:54

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

xorg log doesn't fit, probably x11 completely failed.

[    30.285] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=4cd4f853-9cfd-4424-9c1b-0e358f26720d rw loglevel=3 quiet
Mar 25 05:53:58 mansamusa kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=4cd4f853-9cfd-4424-9c1b-0e358f26720d rw loglevel=3 quiet nvidia_drm.modeset=1

But the journal does

Mar 25 05:54:15 mansamusa sddm[435]: Initializing...
Mar 25 05:54:15 mansamusa sddm[435]: Starting...
Mar 25 05:54:15 mansamusa sddm[435]: Logind interface found
Mar 25 05:55:11 mansamusa sddm[435]: Signal received: SIGTERM
Mar 25 05:55:11 mansamusa systemd[1]: sddm.service: Deactivated successfully.
Mar 25 05:55:11 mansamusa sddm[484]: Initializing...
Mar 25 05:55:11 mansamusa sddm[484]: Starting...
Mar 25 05:55:11 mansamusa sddm[484]: Logind interface found
Mar 25 05:55:34 mansamusa sddm[484]: Signal received: SIGTERM
Mar 25 05:55:34 mansamusa systemd[1]: sddm.service: Deactivated successfully.
Mar 25 05:55:34 mansamusa sddm[495]: Initializing...
Mar 25 05:55:34 mansamusa sddm[495]: Starting...
Mar 25 05:55:34 mansamusa sddm[495]: Logind interface found
Mar 25 05:56:25 mansamusa sddm[495]: Signal received: SIGTERM
Mar 25 05:56:25 mansamusa systemd[1]: sddm.service: Deactivated successfully.
Mar 25 05:56:25 mansamusa sddm[500]: Initializing...
Mar 25 05:56:25 mansamusa sddm[500]: Starting...
Mar 25 05:56:25 mansamusa sddm[500]: Logind interface found
Mar 25 05:56:26 mansamusa sddm[500]: Signal received: SIGTERM
Mar 25 05:56:26 mansamusa systemd[1]: sddm.service: Deactivated successfully.
Mar 25 05:56:26 mansamusa sddm[505]: Initializing...
Mar 25 05:56:26 mansamusa sddm[505]: Starting...
Mar 25 05:56:26 mansamusa sddm[505]: Logind interface found
Mar 25 05:56:26 mansamusa sddm[505]: Signal received: SIGTERM
Mar 25 05:56:26 mansamusa systemd[1]: sddm.service: Deactivated successfully.
Mar 25 05:56:26 mansamusa systemd[1]: sddm.service: Start request repeated too quickly.
Mar 25 05:56:26 mansamusa systemd[1]: sddm.service: Failed with result 'start-limit-hit'.
Mar 25 05:56:48 mansamusa systemd[1]: sddm.service: Start request repeated too quickly.
Mar 25 05:56:48 mansamusa systemd[1]: sddm.service: Failed with result 'start-limit-hit'.
Mar 25 05:57:07 mansamusa sddm[514]: Initializing...
Mar 25 05:57:07 mansamusa sddm[514]: Starting...
Mar 25 05:57:07 mansamusa sddm[514]: Logind interface found

The greeter doesn't start.

Do I just need to install linux-lts and linux-lts-headers to switch to the LTS kernel?

Yes. Make sure the nvidia dkms module builds w/o errors.
The nvidia module gets loaded, but nvidia-drm doesn't (doesn't exist w/ 340xx? There's a reference in the provided xorg configlet…); nvidia-340xx-utils looks ok

Offline

#9 2024-03-25 09:13:47

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

Yes. Make sure the nvidia dkms module builds w/o errors.

I did install them and didn't see any nvidia related errors, but the same thing happens and I see no GUI.

seth wrote:

The nvidia module gets loaded, but nvidia-drm doesn't (doesn't exist w/ 340xx? There's a reference in the provided xorg configlet…)

Well, now I get it.
While reading the wiki on turning nvidia-drm on, it said:

# cat /sys/module/nvidia_drm/parameters/modeset

Should return Y, and not N anymore.
But when I did that, it just told me that the file doesn't exist and after looking I didn't have the /sys/module/nvidia_drm directory at all.
Is it supposed to be that way or did something mess up while installing the driver?

Anyways, just to check, after installing the LTS kernel I removed the nvidia_drm part from the grub config(maybe it was keeping the GUI from showing normally because there is no nvidia_drm? I don't know) and then added a xorg.conf file in /etc/X11/ generated by X -configure -ignoreABI and sddm would again tell me "could not read display number from pipe".
I put back the nvidia_drm part in the grub config after it though.

And I also figured after switching to the LTS kernel and with the nvidia-drm part in the grub config sddm did load while there was an xorg.conf(I don't know how it would behave with an xorg.conf before switching to LTS, so maybe there was no change and this just happened because of the nvidia_drm thing), but now the problem is that I don't see any GUI like how I said in the last reply(which you speculated was probably because of X11 failing entirely).

Offline

#10 2024-03-25 09:27:16

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

The nvidia_drm.modeset=1 kernel parameter esp. blocks the simpledrm device (even if you don't have the module) and results in a hard failure.
=> Keep it to prevent the simpledrm device from confusing the results.

Cut out SDDM, boot the multi-user.target (2nd link below) and try to "startx" from the console login (you'll need to configure xinitrc or have xterm and twm installed for that to do sth. meaningful)
This will either get you an at least somewhat functional X11 server (check "glxinfo -B" there) or a better error message/X11 log

Offline

#11 2024-03-25 10:20:05

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

Cut out SDDM, boot the multi-user.target (2nd link below) and try to "startx" from the console login (you'll need to configure xinitrc or have xterm and twm installed for that to do sth. meaningful)

I disabled sddm, changed the default to multi-user.target, installed xterm and xorg-twm from pacman, rebooted and did startx; for some reason I couldn't really get the output to upload so here's an image from my screen instead.
Also here's the Xorg log if it matters.

Offline

#12 2024-03-25 15:01:11

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

[    78.687] (==) Using config file: "/etc/X11/xorg.conf"

Remove that and try again. Do not create a static server config w/ nvidia-settings or nvidia-xconfig, in your case it lead to

[    80.374] (EE) NVIDIA: Use the -ignoreABI option to override this check.

which would have been applied by https://aur.archlinux.org/cgit/aur.git/ … idia-340xx

Offline

#13 2024-03-26 07:29:19

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

Remove that and try again. Do not create a static server config w/ nvidia-settings or nvidia-xconfig

The config file was actually generated by

X -configure -ignoreABI

But anyway, here's the startx output and Xorg log after deleting /etc/X11/xorg.conf.

Offline

#14 2024-03-26 08:30:42

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

You can skip the screenshots.
The nvidia driver isn't even considered

[    40.943] 	ABI class: X.Org Server Extension, version 10.0
[    40.943] (==) Matched nouveau as autoconfigured driver 0
[    40.943] (==) Matched nv as autoconfigured driver 1
[    40.943] (==) Matched modesetting as autoconfigured driver 2
[    40.943] (==) Matched fbdev as autoconfigured driver 3
[    40.943] (==) Matched vesa as autoconfigured driver 4
[    40.943] (==) Assigned the driver to the xf86ConfigLayout
[    40.943] (II) LoadModule: "nouveau"
[    40.977] (WW) Warning, couldn't open module nouveau

There's either something wrong w/ the 340xx packages or your hardware.
Try this in /etc/X11/xorg.conf.d/19-nvidia.conf

Section "Device"
    Identifier  "nvidia"
    Driver      "nvidia"
    BusID       "PCI:1:0:0"
EndSection

And also post the output of

dkms status

Offline

#15 2024-03-26 10:58:49

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

Try this in /etc/X11/xorg.conf.d/19-nvidia.conf
And also post the output of

dkms status

Sure, here's the Xorg log and here's the dkms status output

Offline

#16 2024-03-26 12:59:23

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

ls -R /{etc,usr/share}/X11/xorg.conf*
cat /usr/share/X11/xorg.conf.d/20-nvidia.conf

Add

Section "Files"
  ModulePath   "/usr/lib64/nvidia/xorg"
  ModulePath   "/usr/lib64/xorg/modules"
EndSection

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

to the file you created, but those should™ exist from nivida-340xx-utils

And remove this patch https://aur.archlinux.org/cgit/aur.git/ … a1494a6177
At least for the LTS kernel this still should™ work and it largely explains why you're not getting drm support, the driver isn't auto-matched etcetc.

Offline

#17 2024-03-27 11:50:42

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

Here's the ls command output and as for the cat command, the file doesn't exist.

seth wrote:

Add ... to the file you created, but those should™ exist from nivida-340xx-utils,

Ok, I added those to /etc/X11/xorg.conf.d/19-nvidia.conf just to make sure we're on the same page.

To do that, I should install nvidia-340xx from AUR without any AUR helper and with reversing the changes shown in the link before installing, yes?

Offline

#18 2024-03-27 13:11:49

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

To do that, I should install nvidia-340xx from AUR without any AUR helper and with reversing the changes shown in the link before installing, yes?

The patch affects nvidia-340xx-dkms

But before that

/etc/X11/xorg.conf.nvidia-xconfig-original

/etc/X11/xorg.conf.d:
19-nvidia.conf

/usr/share/X11/xorg.conf.d:
10-nvidia-drm-outputclass.conf
10-quirks.conf
40-libinput.conf

Where is /usr/share/X11/xorg.conf.d/20-nvidia.conf ?

Ok, I added those to /etc/X11/xorg.conf.d/19-nvidia.conf just to make sure we're on the same page

Ans what was the impact of that… ?

Offline

#19 2024-03-27 13:40:52

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

But before that Where is /usr/share/X11/xorg.conf.d/20-nvidia.conf ?

I uhh, don't know lol . It doesn't exist.

And what was the impact of that… ?

Wow, I completely forgot to reboot and check startx but it works now big_smile .
Here's the output of glxinfo -B.
Am I good to go or is there any other thing left to do?

Offline

#20 2024-03-27 13:44:42

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

I uhh, don't know lol . It doesn't exist.

What was the problem all along.
Restoring that file should allow you to remove your custom config, otherwise you look fine.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#21 2024-03-27 13:50:09

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

Oh sure, just one thing.

seth wrote:

Restoring that file should allow you to remove your custom config, otherwise you look fine.

How exactly should I restore that file? Just copy the custom config to that place?

Offline

#22 2024-03-27 14:07:32

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

In doubt re-install the package (it's probably in nvidia-340xx-utils)

Offline

#23 2024-03-27 14:26:25

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

seth wrote:

In doubt re-install the package (it's probably in nvidia-340xx-utils)

While re-installing, I saw this:

>>> You must tell Xorg to use the nvidia driver with kernels >=5.11.0.
    You must also set IgnoreABI option with Xorg version >= 21.1.1.
    Minimal config example provided in /usr/share/nvidia-340xx/20-nvidia.conf
    which you should manually place in /etc/X11/xorg.conf.d/

and indeed, that file was technically the same as the custom config you told me to put.
It was my fault all along yikes
either way, it's really heart-warming to see people who are up to give their precious time fixing other people's problems while asking for nothing in return.
Thanks smile.

Offline

#24 2024-03-27 14:44:12

adam_Barfi
Member
Registered: 2024-03-24
Posts: 13

Re: [SOLVED] Cannot configure X with nvidia drivers.

Oh and btw(I keep forgetting things) I had to stop trying to load nvidia_drm to get X to work, is that ok?

Last edited by adam_Barfi (2024-03-27 14:44:25)

Offline

#25 2024-03-27 14:55:48

seth
Member
Registered: 2012-09-03
Posts: 60,813

Re: [SOLVED] Cannot configure X with nvidia drivers.

is that ok?

Yes, it's necessary b/c of the forementioned patch - it's not ideal but the 340xx features are limited w/ or w/o KMS.

Offline

Board footer

Powered by FluxBB