• NetBSD
  • nvidia / nouveau problems on 9.2

Hello I'm currently running NetBSD 9.2 stable:

# uname -a
NetBSD localhost 9.2_STABLE NetBSD 9.2_STABLE (GENERIC) #0: Wed Apr 27 16:54:20 UTC 2022  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

and I've been having some issues getting my graphics card to work.

I'm currently trying to get an nvidia GTX 770 to work with nouveau, and it seems like it should be supported:
https://man.netbsd.org/NetBSD-9.2-STABLE/nouveau.4

However, once the boot process is done, even if I have xdm=NO on /etc/rc.conf, I get a blank (black) screen.
The machine is not crashed, as I can ssh into it.

The blank screen does not happen if I disable the nouveau driver on the boot manager with userconf disable nouveau.

Several debug outputs:
dmesg:
https://termbin.com/dlx4

dmesg.boot
https://termbin.com/0wfq

lspci -vnn
https://termbin.com/p60z

Xorg.0.log (after running startx)
https://termbin.com/8bac

modstat
https://termbin.com/5zb5

Any help would be appreciated, thanks!

    tse Those autoconfiguration errors are from the kernel driver, and will need a fix there. Try the latest -HEAD image. The newer DRM drivers in that might work.

    • tse replied to this.
    • Jay likes this.

      tse

      lspci -vnn

      Next time, better to run pcictl pci0 list -N on NetBSD, since that will print also the attached driver (similarly to lspci -k), useful to get an idea of what is supposedly working and what not.
      To print all PCI devices names and ids, you can do:

      /usr/sbin/pcictl pci0 list \
       | awk -F: '{print "pcictl pci0 dump -b "$1" -d "$2}' \
       | sort -u| sh | grep -i 'device name' | cut -d ':' -f 2
      
      • Jay likes this.

      tse Several debug outputs:
      dmesg:
      https://termbin.com/dlx4

      At first glance it seems like a regression introduced somewhere in 2017 (many reports like this one upon web search), and probably now fixed upstream. I fear that the graphic stack implemented in -current, which comes from Linux 5.6, would still be affected.

      rvp
      Hello,

      Thank you for the replies.

      If I try the latest HEAD kernel (https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/amd64/binary/kernel/netbsd-GENERIC.gz - MD5 (/netbsd-HEAD) = 0dd1f8ed7828c36b11281cd780f0cf20) I do not get a blank screen, however my console becomes completely unresponsive. I can still ssh into the box.

      # uname -a
      NetBSD localhost 9.99.96 NetBSD 9.99.96 (GENERIC) #0: Mon May  2 10:50:02 UTC 2022  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
      # cat boot.cfg
      menu=Boot HEAD:rndseed /var/db/entropy-file;boot netbsd-HEAD
      menu=Boot normally:rndseed /var/db/entropy-file;boot
      menu=Boot single user:rndseed /var/db/entropy-file;boot -s
      menu=Drop to boot prompt:prompt
      default=1
      timeout=5
      clear=1
      # pcictl pci0 list -N
      000:00:0: Intel Haswell Host Bridge, DRAM (host bridge, revision 0x06) [pchb0]
      000:01:0: Intel Haswell PCI-E x16 Controller (PCI bridge, revision 0x06) [ppb0]
      000:20:0: Intel 9 Series USB xHCI (USB serial bus, xHCI) [xhci0]
      000:22:0: Intel 9 Series MEI Controller (miscellaneous communications)
      000:26:0: Intel 9 Series USB EHCI (USB serial bus, EHCI) [ehci0]
      000:27:0: Intel 9 Series HD Audio (mixed mode multimedia, HD Audio 1.0) [hdaudio1]
      000:28:0: Intel 9 Series PCIe (PCI bridge, revision 0xd0) [ppb1]
      000:28:3: Intel 9 Series PCIe (PCI bridge, revision 0xd0) [ppb2]
      000:29:0: Intel 9 Series USB EHCI (USB serial bus, EHCI) [ehci1]
      000:31:0: Intel Z97 LPC (ISA bridge) [ichlpcib0]
      000:31:2: Intel 9 Series SATA Controller (AHCI) (SATA mass storage, AHCI 1.0) [ahcisata0]
      000:31:3: Intel 9 Series SMBus Controller (SMBus serial bus) [ichsmb0]
      001:00:0: NVIDIA product 1184 (VGA display, revision 0xa1) [nouveau0]
      001:00:1: NVIDIA product 0e0a (mixed mode multimedia, HD Audio 1.0, revision 0xa1) [hdaudio0]
      003:00:0: Attansic Technologies Killer E2200 (ethernet network, revision 0x13) [alc0]

      dmesg (before startx)
      https://termbin.com/xrbi

      dmesg (after startx)
      https://termbin.com/cwvj

      dmesg.boot
      https://termbin.com/lx3i

      Xorg.0.log:
      https://termbin.com/6o6n

      • rvp replied to this.

        tse Please file a PR about this. This is a driver issue.

        • tse replied to this.

          rvp Will do.

          As for the NetBSD release, should I report it as -CURRENT, -HEAD, or NetBSD 9.2-STABLE?

          • rvp replied to this.

            tse -CURRENT and -HEAD can be used interchangeably, so either will do. File it against that. Bugs get fixed in -HEAD, then back-ported to the still-supported releases.

            • tse replied to this.

              rvp

              PR submitted (kern/56813). I hope it has all the required information. In the meantime, is there any alternative that would allow me to use my system with its native resolution (2560x1440), preferably that would allow me to watch videos on firefox? 🙂 (preferably if I could do it with 9.2-STABLE).

              Thank you very much for all the help.

                tse is there any alternative that would allow me to use my system with its native resolution (2560x1440), preferably that would allow me to watch videos on firefox? 🙂 (preferably if I could do it with 9.2-STABLE).

                You can disable/unplug the NVidia card and use embedded graphics in your Intel chip. Since it's a 4th gen Intel Core we're talking about, it should be supported by i915drmkms even on 9.2. This would be imho the recommended workaround for the time being.

                Otherwise you can use the generic framebuffer driver (can't say if it supports 2K res), wsfb(4). See How to use Xorg's wsfb display driver with a UEFI/BIOS framebuffer, and change its resolution. Have also a look at this thread on DaemonForums in case.

                  JuvenalUrbino You can disable/unplug the NVidia card and use embedded graphics in your Intel chip.

                  According to his pcictl output, OP doesn't have an integrated Intel graphics card. But, wsfb can be made to work at the native resolution using gop in /boot.cfg

                    rvp According to his pcictl output, OP doesn't have an integrated Intel graphics card

                    I'm skeptic about this since Intel Core processors usually have integrated graphics (Xeon do not) and a 4th gen Intel Core should come with Intel HD 4600 graphics embedded. Is it possibile that it's being disabled at BIOS level due to the connected NVidia card ?

                    • rvp replied to this.
                    • rvp likes this.

                      JuvenalUrbino (Xeon do not)

                      It might be a Xeon. From OP's lspci output:

                      00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06) (prog-if 00 [Normal decode])

                      But, a cpuctl identify would be a more definitive confirmation...

                      sorry I've been busy and I haven't been able to get back to this. The cpu is not a xeon, and I believe I have the integrated graphics card disabled in the bios. Later today, if I get the chance I'll try out the integrated graphics and report back 🙂

                      edit: the motherboard only has vga and dvi outputs, so I cannot test it. I tried the gop option as suggested, but neither the HDMI nor the DisplayPort outputs list my native resolution.

                      I guess I can still ssh into the machine and /pray very hard for a fix 🙂

                      • rvp replied to this.
                      • Jay likes this.

                        tse I tried the gop option as suggested, but neither the HDMI nor the DisplayPort outputs list my native resolution.

                        The gop command queries the UEFI firmware for the resolutions it supports. On laptops, UEFI is almost sure to return the highest resolution the panel supports (otherwise, users will want their money back, right?). For HDMI or DP-connected monitors, UEFI may (or may not) query the monitor for EDID data. Or, it may simply return some standard resolutions: 1920x1080, 1024x768, etc.

                        Does your external monitor support your card's best resolution?

                        • tse replied to this.

                          tse Can you show what resolutions the gop command outputs (and in the same order)?
                          Also a hexdump of the monitor's EDID data.
                          Describe your HW setup too.

                            rvp Also a hexdump of the monitor's EDID data.

                            Forget this--I got the EDID from your Xorg.0.log

                            rvp sorry for the late reply. I'll do this tomorrow if I get the chance!

                            rvp

                            the gop command outputs

                            *0: 800x600 BGRR pitch 800 bpp 32
                             1: 1024x768 BGRR pitch 1024 bpp 32

                            as far as hardware goes, that hasn't been mentioned before, I have an
                            Acer Predator XB271HUA (a 2k monitor with gsync), which is connected to the netbsd computer via HDMI (displayport is being used to connect it to a windows machine).
                            The motherboard is an MSI Z97 Gaming 5, and the only setting I can think of as being relevant here is:

                            Settings\Advanced\Integrated Graphics Configuration\Initiate Graphic Adapter -> PEG

                            The CPU is an Intel i5-4690K @ 3.5 GHz.

                            The memory is two 8gb sticks: DDR3 SDRAM - Kingston KHX1866C10D3/8G

                            Did I miss something important?