No devices detected/no screens found(EE)

Yes, the nvidia-driver is necessary, as xorg itself only detects the (very old!) nvidia cards that are supported by the xf86-video-nv driver.

It's not magic, it goes through a hardcoded set of drivers and only probes nvidia on Solaris (!): https://github.com/freedesktop/xorg-xserver/blob/master/hw/xfree86/common/xf86AutoConfig.c#L228. Our port is additionally patched to probe scfb. That's all there is to it.
If all other attempts do not help, maybe try deleting the nvidia-driver and installing the upstream nvidia driver from the nvidia site.
If it then still does not work, then a problem with the port itself could probably be ruled out.

Personally I am using the upstream driver because, at least with earlier versions of the packaged nvidia-drivers, there were stability problems with suspend/resume.
This is commonly advised against, because the upstream driver does not register itself with the packaging system, which can cause problems when installing or updating stuff.
 
xorg itself only detects the (very old!) nvidia cards that are supported by the xf86-video-nv driver.
That's not true.

If all other attempts do not help, maybe try deleting the nvidia-driver and installing the upstream nvidia driver from the nvidia site.
Tracing and bisection are pretty reliable debugging strategies. Reinstalling things with random variations, on the other hand, is not.
 
Also, commented out nvidia:

Code:
 # cat /boot/loader.conf
....
# nvidia_load="YES"
# nvidia-modeset_load="YES"
Also the X configuration is useless without the NVIDIA kernel module loaded. Execute as root kldload nvidia-modeset before startx.

Note: The recommended place to enable the driver is in /etc/rc.conf:
Code:
kld_list="nvidia-modeset"
 
I re-read the thread from the top to better understand what's going on. If you know all this, please ignore & sorry for the noise.
  1. You are aware that FreeBSD has CURRENT (head branch, developer) major-STABLE (stable API, test branch) & major.minor-RELEASE (production) branches of the source tree.
    The stable branch receives cherry-picked so-called MFC updates & bug fixes from current, and this will eventually become the next maj.min release. The purpose of stable is to supply newest software to early adaptors willing to test & help with bug fixes. Early adaptors are typically the test labs of big organisations, experienced users willing to test & curious newbies... Besides that, those whose hardware demands the newest release because their hardware is not supported by a release version.
  2. Therefore, if you want to run stable, you are kindly requested to subscribe to svn-src-stable (read about latest MFCs) & freebsd-stable (report bugs & get help). Did you?
  3. That version maj.min-STABLE is to make the version number to conform to the scheme maj.min-XYZ, e.g. to make scripts happy that parse that. In realitas, it is maj-STABLE.
FWIW, X did work fine in this same hardware setup under 12.1-STABLE. Yesterday I updated from source, after which neither the new nor the old kernel booted. I installed an additional hard drive and installed on the new hard drive 12.2-STABLE and imported the old zpool - but haven't been able to start X.
No matter the outcome here, you should report this issue to the mailing list, because your previous stable version ran ok, so there must have been an MFC that might be suspicious or errorneous and should be investigated.

Now enjoy the privilege to follow a graphics wizzards (shkhin) guidance. T-Daemon may also be one, I dunno because usually I don't follow these threads. I'm not, @least not with non-intel. Afterwards, you may want to sum up & report to <freebsd-stable@freebsd.org>. Good luck!

PS: Theoretically, a x11 graphics driver from packages (same major version) should run as long as it's not a kernel module (*-kmod), but experience shows that you're better off compiling from ports for the kernel version you want to run it on. Since these talk to the kernel module, minimal changes in the kernel interface can cause incompatibilities.
 
Without an X configuration file for the NVIDIA driver there won't be a use of the full potential of the GPU, all attempts to diagnose the problem without loading the driver are useless. As the Xorg.0.log in #19 shows no NVIDIA driver is loaded. Please put the following minimal configuration into /usr/local/etc/X11/xorg.conf.d/nvidia.conf, restart Xorg and report back:

Code:
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"
EndSection
Hello T-Daemon,

following the advice given by Mjölnir, I have disabled the nvidia card in the BIOS in favor of the on-board card. X gives the same error using either the onboard card or the GT 1030.
 
There is a lot of mixing two GPU's going on here, I suggest we concentrate on one GPU. Is this a desktop or notebook system? Please give details on the hardware.
 
There is a lot of mixing two GPU's going on here, I suggest we concentrate on one GPU. Is this a desktop or notebook system? Please give details on the hardware.
Hello T-Daemon,

It's a desktop. Full dmesg:

# dmesg
---<<BOOT>>---
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.2-STABLE r369362 GENERIC amd64
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
VT(vga): resolution 640x480
CPU: AMD Opteron(TM) Processor 6212 (2600.06-MHz K8-class CPU)
Origin="AuthenticAMD" Id=0x600f12 Family=0x15 Model=0x1 Stepping=2
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
Features2=0x1e98220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX>
AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
AMD Features2=0x1c9bfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,NodeId,Topology,PCXC,PNXC>
SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=65536
TSC: P-state invariant, performance statistics
real memory = 34359738368 (32768 MB)
avail memory = 33353658368 (31808 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <111111 APIC1653>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 2 cache groups x 4 core(s)
random: unblocking device.
Firmware Warning (ACPI): 32/64X length mismatch in FADT/Gpe0Block: 64/32 (20200430/tbfadt-748)
ioapic0 <Version 2.1> irqs 0-23 on motherboard
Launching APs: 1 2 6 3 7 5 4
Timecounter "TSC-low" frequency 1300028028 Hz quality 1000
random: entropy device external interface
WARNING: Device "g_ctl" is Giant locked and may be deleted before FreeBSD 14.0.
000.000017 [4340] netmap_init netmap: loaded module
WARNING: Device "pci" is Giant locked and may be deleted before FreeBSD 14.0.
[ath_hal] loaded
module_register_init: MOD_LOAD (vesa, 0xffffffff81171790, 0) error 19
WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 14.0.
kbd1 at kbdmux0
mlx5en: Mellanox Ethernet driver 3.6.0 (December 2020)
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <SMCI > on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
apei0: <ACPI Platform Error Interface> on acpi0
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 18 at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xc800-0xc87f mem 0xfc000000-0xfcffffff,0xd0000000-0xdfffffff,0xce000000-0xcfffffff irq 18 at device 0.0 on pci1
vgapci0: Boot video device
hdac0: <NVIDIA (0x0fb8) HDA Controller> mem 0xfdefc000-0xfdefffff irq 19 at device 0.1 on pci1
pcib2: <ACPI PCI-PCI bridge> irq 17 at device 9.0 on pci0
pci2: <ACPI PCI bus> on pcib2
em0: <Intel(R) PRO/1000 Network Connection> port 0xd800-0xd81f mem 0xfe9e0000-0xfe9fffff,0xfe9dc000-0xfe9dffff irq 17 at device 0.0 on pci2
em0: Using 1024 TX descriptors and 1024 RX descriptors
em0: Using 2 RX queues 2 TX queues
em0: Using MSI-X interrupts with 3 vectors
em0: Ethernet address: 00:25:90:4e:32:3a
em0: netmap queues/slots: TX 2/1024, RX 2/1024
pcib3: <ACPI PCI-PCI bridge> irq 18 at device 10.0 on pci0
pci3: <ACPI PCI bus> on pcib3
em1: <Intel(R) PRO/1000 Network Connection> port 0xe800-0xe81f mem 0xfeae0000-0xfeafffff,0xfeadc000-0xfeadffff irq 18 at device 0.0 on pci3
em1: Using 1024 TX descriptors and 1024 RX descriptors
em1: Using 2 RX queues 2 TX queues
em1: Using MSI-X interrupts with 3 vectors
em1: Ethernet address: 00:25:90:4e:32:3b
em1: netmap queues/slots: TX 2/1024, RX 2/1024
ahci0: <AMD SB7x0/SB8x0/SB9x0 AHCI SATA controller> port 0xb000-0xb007,0xa000-0xa003,0x9000-0x9007,0x8000-0x8003,0x7000-0x700f mem 0xfebfbc00-0xfebfbfff irq 22 at device 17.0 on pci0
ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier supported
ahci0: quirks=0x22000<ATI_PMP_BUG,1MSI>
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ohci0: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfebf9000-0xfebf9fff irq 16 at device 18.0 on pci0
usbus0 on ohci0
usbus0: 12Mbps Full Speed USB v1.0
ohci1: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfebfa000-0xfebfafff irq 16 at device 18.1 on pci0
usbus1 on ohci1
usbus1: 12Mbps Full Speed USB v1.0
ehci0: <AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller> mem 0xfebfb800-0xfebfb8ff irq 17 at device 18.2 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci0
usbus2: 480Mbps High Speed USB v2.0
ohci2: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfebf7000-0xfebf7fff irq 18 at device 19.0 on pci0
usbus3 on ohci2
usbus3: 12Mbps Full Speed USB v1.0
ohci3: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfebf8000-0xfebf8fff irq 18 at device 19.1 on pci0
usbus4 on ohci3
usbus4: 12Mbps Full Speed USB v1.0
ehci1: <AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller> mem 0xfebfb400-0xfebfb4ff irq 19 at device 19.2 on pci0
usbus5: EHCI version 1.0
usbus5 on ehci1
usbus5: 480Mbps High Speed USB v2.0
atapci0: <ATI IXP700/800 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 20.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
pcib4: <ACPI PCI-PCI bridge> at device 20.4 on pci0
pci4: <ACPI PCI bus> on pcib4
vgapci1: <VGA-compatible display> mem 0xfa000000-0xfaffffff,0xfdffc000-0xfdffffff,0xfe000000-0xfe7fffff irq 20 at device 4.0 on pci4
ohci4: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfebf6000-0xfebf6fff irq 18 at device 20.5 on pci0
usbus6 on ohci4
usbus6: 12Mbps Full Speed USB v1.0
acpi_button0: <Power Button> on acpi0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
orm0: <ISA Option ROM> at iomem 0xce800-0xcf7ff pnpid ORM0000 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbdc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 12.
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
hdacc0: <NVIDIA (0x0081) HDA CODEC> at cad 0 on hdac0
hdaa0: <NVIDIA (0x0081) Audio Function Group> at nid 1 on hdacc0
pcm0: <NVIDIA (0x0081) (HDMI/DP 8ch)> at nid 4 on hdaa0
pcm1: <NVIDIA (0x0081) (HDMI/DP 8ch)> at nid 5 on hdaa0
ugen4.1: <ATI OHCI root HUB> at usbus4
ugen1.1: <ATI OHCI root HUB> at usbus1
uhub0: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen0.1: <ATI OHCI root HUB> at usbus0
ugen5.1: <ATI EHCI root HUB> at usbus5
uhub1: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen3.1: <ATI OHCI root HUB> at usbus3
ugen2.1: <ATI EHCI root HUB> at usbus2
Trying to mount root from zfs:buffrescue/ROOT/default []...
Root mount waiting for: CAM usbus0 usbus1 usbus2 usbus3 usbus4 usbus5 usbus6
uhub2: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
uhub3: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
uhub4: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen6.1: <ATI OHCI root HUB> at usbus6
uhub5: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus5
uhub6: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus6
uhub6: 2 ports with 2 removable, self powered
uhub1: 3 ports with 3 removable, self powered
uhub2: 3 ports with 3 removable, self powered
uhub3: 3 ports with 3 removable, self powered
uhub0: 3 ports with 3 removable, self powered
Root mount waiting for: CAM usbus2 usbus5
Root mount waiting for: CAM usbus2 usbus5
uhub5: 6 ports with 6 removable, self powered
uhub4: 6 ports with 6 removable, self powered
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <Hitachi HDS723020BLA642 MN6OA800> ATA8-ACS SATA 3.x device
ada0: Serial Number MN1240F33RJUXD
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1907729MB (3907029168 512 byte sectors)
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: <Hitachi HDS723020BLA642 MN6OA800> ATA8-ACS SATA 3.x device
ada1: Serial Number MN1240F33RLNGD
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 1907729MB (3907029168 512 byte sectors)
ada2 at ahcich2 bus 0 scbus2 target 0 lun 0
ada2: <Hitachi HDS723020BLA642 MN6OA800> ATA8-ACS SATA 3.x device
ada2: Serial Number MN1240F33RGGXD
ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 1907729MB (3907029168 512 byte sectors)
ada3 at ata0 bus 0 scbus4 target 1 lun 0
ada3: <WDC WD2003FZEX-00Z4SA0 01.01A01> ACS-2 ATA SATA 3.x device
ada3: Serial Number WD-WMC1F1223234
ada3: 150.000MB/s transfers (SATA, UDMA6, PIO 8192bytes)
ada3: 1907729MB (3907029168 512 byte sectors)
ada3: quirks=0x1<4K>
cd0 at ahcich3 bus 0 scbus3 target 0 lun 0
cd0: <ASUS DRW-24B1ST c 1.05> Removable CD-ROM SCSI device
cd0: Serial Number C3D0CL166037
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
ugen0.2: <Logitech Trackball> at usbus0
ugen3.2: <Winbond Electronics Corp Hermon USB hidmouse Device> at usbus3
ukbd0 on uhub3
ukbd0: <Winbond Electronics Corp Hermon USB hidmouse Device, class 0/0, rev 1.10/0.01, addr 2> on usbus3
kbd2 at ukbd0
ugen1.2: <Unicomp Inc Unicomp R7210xKbrdv748> at usbus1
ukbd1 on uhub2
ukbd1: <Boot Ifc Keyboard> on usbus1
kbd3 at ukbd1
intsmb0: <AMD SB600/7xx/8xx/9xx SMBus Controller> at device 20.0 on pci0
intsmb0: intr SMI enabled revision 0
intsmb0: using polling mode when configured interrupt is SMI
smbus0: <System Management Bus> on intsmb0
lo0: link state changed to UP
em0: link state changed to UP
ums0 on uhub3
ums0: <Winbond Electronics Corp Hermon USB hidmouse Device, class 0/0, rev 1.10/0.01, addr 2> on usbus3
ums1 on uhub1
ums1: <Logitech Trackball, class 0/0, rev 1.10/2.20, addr 2> on usbus0
ums0: 3 buttons and [Z] coordinates ID=0
ums1: 3 buttons and [XYZ] coordinates ID=0
Security policy loaded: MAC/ntpd (mac_ntpd)
 
Got it.

Is the Xorg configuration I advised in place, and the nvidia-modeset kernel driver loaded?
Yes, both:

# kldload nvidia-modeset
kldload: can't load nvidia-modeset: module already loaded or in kernel


# cat /usr/local/etc/X11/xorg.conf.d/nvidia.conf
Section "Device"
Identifier "Card0"
Driver "nvidia"
EndSection


Also, I have attached the file startx3.txt which is the output of truss -o startx3.txt startx
 

Attachments

  • startx3.txt
    14.6 KB · Views: 108
Yes, both:

# kldload nvidia-modeset
kldload: can't load nvidia-modeset: module already loaded or in kernel


# cat /usr/local/etc/X11/xorg.conf.d/nvidia.conf
Section "Device"
Identifier "Card0"
Driver "nvidia"
EndSection


Also, I have attached the file startx3.txt which is the output of truss -o startx3.txt startx
Please execute startx -- -verbose 5 -logverbose 5 and afterwards cat /var/log/Xorg.0.log | nc termbin.com 9999, post URL.
 
The xorg.conf only tells us what we alredy know, that the packaged nvidia-driver just does nothing.
It does not give idea why.

shkln repeated multiple times:
sudo ktrace -d X -retro, then kdump -H | grep -E "(ioctl|nvidia)" -A 1.
 
Hello Snurg,

Here it is:

# ktrace -d X -retro

X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 12.2-STABLE amd64
Current Operating System: FreeBSD buffrescue.[...] 12.2-STABLE FreeBSD 12.2-STABLE r369362 GENERIC amd64
Build Date: 01 March 2021 02:20:56AM

Current version of pixman: 0.40.0
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.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar 4 00:24:05 2021
(==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(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.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
# kdump -H | grep -E "(ioctl|nvidia)" -A 1
4950 101440 Xorg.wrap NAMI "/usr/local/etc/libmap.d/nvidia.conf"
4950 101440 Xorg.wrap RET openat 4
--
"# libmap.conf file for nvidia provide libraries

--
libGLESv1_CM.so libGLESv1_CM_nvidia.so
libGLESv1_CM.so.1 libGLESv1_CM_nvidia.so.1

--
4950 101440 Xorg NAMI "/usr/local/etc/libmap.d/nvidia.conf"
4950 101440 Xorg RET openat 4
--
"# libmap.conf file for nvidia provide libraries

--
libGLESv1_CM.so libGLESv1_CM_nvidia.so
libGLESv1_CM.so.1 libGLESv1_CM_nvidia.so.1

--
4950 101440 Xorg NAMI "/usr/local/etc/X11/xorg.conf.d/nvidia.conf"
4950 101440 Xorg RET open 14/0xe
--
Driver "nvidia"
EndSection
--
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETCONF,0x7fffffffb8f0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL mmap(0,0x3000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffffffff,0)
--
4950 101440 Xorg CALL ioctl(0xa,PCIOCREAD,0x7fffffffe848)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl -1 errno 22 Invalid argument
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl -1 errno 22 Invalid argument
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCREAD,0x7fffffffe848)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl -1 errno 22 Invalid argument
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl -1 errno 22 Invalid argument
4950 101440 Xorg CALL ioctl(0xa,PCIOCGETBAR,0x7fffffffe8e0)
4950 101440 Xorg RET ioctl -1 errno 22 Invalid argument
4950 101440 Xorg CALL ioctl(0xa,PCIOCREAD,0x7fffffffe8b8)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xa,PCIOCREAD,0x7fffffffe8b8)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL write(0x3,0x7fffffffdcd0,0xd)
--
4950 101440 Xorg NAMI "/usr/local/lib/xorg/modules/drivers/nvidia_drv.so/"
4950 101440 Xorg RET fstatat -1 errno 20 Not a directory
--
4950 101440 Xorg NAMI "/usr/local/lib/xorg/modules/extensions/libglxserver_nvidia.so/"
4950 101440 Xorg RET fstatat -1 errno 20 Not a directory
--
"(II) LoadModule: "nvidia""
4950 101440 Xorg RET write 25/0x19
--
4950 101440 Xorg NAMI "/usr/local/lib/xorg/modules/drivers/nvidia_drv.so/"
4950 101440 Xorg RET fstatat -1 errno 20 Not a directory
--
"(II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
"
--
4950 101440 Xorg NAMI "/usr/local/lib/xorg/modules/drivers/nvidia_drv.so"
4950 101440 Xorg RET openat 12/0xc
--
"(II) Module nvidia: vendor="NVIDIA Corporation"
"
--
4950 101440 Xorg CALL ioctl(0xc,TIOCNOTTY,0)
4950 101440 Xorg RET ioctl -1 errno 1 Operation not permitted
4950 101440 Xorg CALL close(0xc)
--
4950 101440 Xorg CALL ioctl(0xc,0xc0185671,0x7fffffffe3d8)
4950 101440 Xorg RET ioctl -1 errno 25 Inappropriate ioctl for device
4950 101440 Xorg CALL close(0xc)
--
4950 101440 Xorg CALL ioctl(0xc,VT_GETMODE,0x7fffffffe3e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,CONS_GETVERS,0x7fffffffe3d8)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,VT_GETACTIVE,0x43b4dc)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,VT_OPENQRY,0x43b23c)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL close(0xc)
--
4950 101440 Xorg CALL ioctl(0xc,VT_GETMODE,0x7fffffffe3e0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL write(0x3,0x7fffffffd760,0xd)
--
4950 101440 Xorg CALL ioctl(0xc,VT_ACTIVATE,0x9)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,VT_WAITACTIVE,0x9)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL sigprocmask(SIG_SETMASK,0x80091c66c,0x7fffffffe2f0)
--
4950 101440 Xorg CALL ioctl(0xc,VT_SETMODE,0x7fffffffe438)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,KDSETMODE,0x1)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,TIOCGETA,0x44f314)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,KDGKBMODE,0x44f340)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,KDSKBMODE,0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,TIOCSETA,0x7fffffffe440)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL openat(AT_FDCWD,0x230e13,0x2<O_RDWR>)
--
4950 101440 Xorg CALL ioctl(0xc,KDSETMODE,0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,KDSKBMODE,0x1)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,TIOCSETA,0x44f314)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,VT_GETMODE,0x7fffffffe8a0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,VT_SETMODE,0x7fffffffe8a0)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL ioctl(0xc,VT_ACTIVATE,0x1)
4950 101440 Xorg RET ioctl 0
4950 101440 Xorg CALL close(0xc)
 
Great!
Now the turn is on shkhln .
Would be wonderful if he takes the effort to find out why the packaged nvidia driver apparently does some erroneous system calls and bails out.
 
Hello shkhln,

I have added the file /usr/local/etc/X11/xorg.conf.d/nvidia.conf with the content

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

Also, copied the same file to /usr/local/share/X11/xorg.conf.d/nvidia.conf.

# ls -l /usr/local/share/X11/xorg.conf.d
total 19
-rw-r--r-- 1 root wheel 1099 Mar 1 02:31 10-evdev.conf
-rw-r--r-- 1 root wheel 1350 Mar 1 02:24 10-quirks.conf
-rw-r--r-- 1 root wheel 152 Mar 1 02:24 20-evdev-kbd.conf
-rw-r--r-- 1 root wheel 1429 Mar 1 02:41 40-libinput.conf
-rw-r--r-- 1 root wheel 93 Mar 5 09:21 nvidia.conf



X does start, but the keyboard and mouse is frozen and shows a black screen, and CTR-ALT-Backspace doesn't kill X.

I have attached the logfile.
 

Attachments

  • buffrescure_Xorg.0.log_202103051036.txt
    19 KB · Views: 172
As far as I can tell, the userspace driver doesn't attempt to talk to the kernel driver. amnixed, did you actually test a configuration with BusID "PCI:1:0:0"?
Forgot to add: in the startup messages, this appears: rc.conf: nvidia-modeset_load=YES: not found
 
Well, I think it might be best to be frank:
I feel at loss why it was necessary at least three times to ask, by me and by shkhln as well, to make you actually try with the BusID directive.
Getting the kernel trace also needed at least three requests by shkhln and me as well.

Regarding the log, I see no monitor detection, and I do not know why.
Personally I have the feeling it might be due to some problem with the packaged driver, but who knows whether you actually did all steps necessary. You may want to review the article "HOWTO: Setup Xorg with NVIDIA's driver" to verify this.

If this does provide insights, you might send another kernel trace, this time with the nvidia driver actually running due to the BusID directive. Maybe shkhln might look into it then.

The Zap keys are disabled by default, here is how to re-enable them.

Otherwise, if shkhln is already tired of this issue, I'd try the upstream driver just to know whether it also shows the same problems like the packaged version.
 
Code:
% pkg info -D nvidia-driver
…
Starting with version 358.09, some important functionality of the driver
has been broken out into a separate kernel module, nvidia-modeset.ko.
Users that experience hangs when starting X11 server, or observe

    (II) NVIDIA(0): Validated MetaModes:
    (II) NVIDIA(0):     "NULL"

in /var/log/Xorg.0.log should replace ``nvidia'' with ``nvidia-modeset''
in their /boot/loader.conf or /etc/rc.conf configuration files, depending
on how they prefer to load NVidia driver kernel module.

See /usr/local/share/doc/NVIDIA_GLX-1.0/README for more information.
 
Also, copied the same file to /usr/local/share/X11/xorg.conf.d/nvidia.conf.

Please remove it. That in /usr/local/etc/X11/xorg.conf.d will suffice.

Forgot to add: in the startup messages, this appears: rc.conf: nvidia-modeset_load=YES: not found

Please remove nvidia-modeset_load=YES from /etc/rc.conf, enable the nvidia driver in the same file with kld_list="nvidia" only.
 
Using sysrc kld_list+=" nvidia" is safer, since it does not remove all other entries of kld_list. Likewise, you can remove with the command sysrc -x "nvidia-modeset_load"
 
Hello shkhln, T-Daemon, Snurg and Mjölnir,

Thank you for all your help and my apologies for being a scatterbrain in following your advice.

1. I have added the configuration described in the post https://unix.stackexchange.com/questions/375/how-to-enable-killing-xorg-with-ctrlaltbackspace.

2. In /etc/rc.conf removed
Code:
nvidia-modeset_load="YES"
and added
Code:
kld_list+="nvidia"
.

3. In /boot/loader.conf replaced
Code:
nvidia_load="YES"
with
Code:
nvidia-modeset_load="YES"
.

4. Rebooted.

5. Starting X: works perfect!

6. CTR-ALT-Backspace kills X.

Upon startup though I see "/etc/rc.conf: kld_list+=nvidia: not found".

I have attached the last Xorg.0.log file.
 

Attachments

  • buffrescure_Xorg.0.log_202103061051.txt
    22.2 KB · Views: 98
kld_list+="nvidia" will not work as expected. This syntax can be used with the command line utilty sysrc(8) like this: on a console (aka terminal) type as user root: sysrc kld_list+=" nvidia" (note the space) will append the string nvidia (again note the space) to the variable kld_list in the file rc.conf(5). When you omit the space, the item to add will be merged tightly to the previous items in that variable, without the necessary space between them. That kld_list is, well, a list. The separator between the items of the list is a space.
 
Back
Top