• NetBSD
  • Trying to install the driver for my main GPU,the Intel UHD Graphics 630.(i915)

rvp

-) That location is wrong. The correct locations are given here.

Please don't give me the man pages. They are too full of informations that I'm not able to filter,because my low technical knowledge. give me clearly what's the proper path. very thanks.

-) You should not (unless the Intel DRM driver doesn't work).

The screen is turned off if enabling or disabling nouveau and / or i915drmkms. Inside xorg.conf is not accepted intel and modesetting.

-) Disable the i915drmkms driver temporarily....

I will do this.

    marietto Please don't give me the man pages. They are too full of informations that I'm not able to filter,because my low technical knowledge. give me clearly what's the proper path. very thanks.

    From a user standpoint, there's really no practical advantage in preferring BSD over a user-friendly Linux distro in day to day usage, be it desktop or server. The main reason you see people using BSD here, is that they got interested in these systems at some point, appreciated some of their features, their design choices, their development model or their community and decided they wanted to dig deeper into them, learn them.

    While personally I started using FreeBSD before Linux, I would have never considered installing BSD weren't it for a true interest in learning, understanding and having fun with a system which wouldn't have hidden what was going on beneath the surface.

    Man pages are possibly the best maintained and the most reliable source of information on BSDs, and it's really hard to imaging leaving without. Not seldom will they provide the provide the proper answer to any question and it's safe to assume every BSD user will have to look up man pages sooner or later, so the sooner one starts the easier will dealing with BSD in everyday life turn out.

    Do not get me wrong, the fact you're just getting started with this is pretty understandable; everything seems a little bit alien and keeping track of all the info you're given is not a easy task. And while it's not hard to relate (everybody has gone through it at a certain point), I still recommend you to try to be a little bit keener to cooperate and look up official documentation.

    Worth noticing this forum is populated by non technical users who work outside of IT.

    marietto The screen is turned off if enabling or disabling nouveau and / or i915drmkms

    so none of the four possible combinations apparently leads to a working console?

      JuvenalUrbino
      I think that you should take much care of my point of view,not of the point of view of a generic "user" ; As a psychologyst I can tell you that the way the concepts are shown, the way they are aggregated, the way they are related to each other, makes the difference in the ability to absorb or skim them. The man pages are up to date and full of information for sure, but from my point of view they get lost in too much detail and do not go straight to the point. The form in which concepts are shown on the man pages are not tailored for learning how things should be done, but more for showing what you can do. Consequently, they aren't useful for me, because they do not help me to focus my attention on what I really need, because I do not have the skills to understand completely what I really need, since my job is different. I am someone who tries to get by and tries to cross the advices that I get from the various forums and thanks to the intuition and the trial and errors method,usually I can solve a problem,if this is not much complicated. I'm a psychologist. That's why I can't use them but I look for much more targeted tutorials. Your point of view is the one of a systems engineer, an experienced IT technician, mine is that of someone who like to play with operatying systems as apprentice and hobbyist, but above all it is the point of view of a psychologist who studies the learning processes of the human mind.

      ----> so none of the four possible combinations apparently leads to a working console?

      exactly. In addition,below u can see that as soon as NetBSD try to boot,it switches to VESA mode...

      maybe because on the boot.cfg I have disabled the nouveau driver and the i915drmkms driver ?

      So,I tried the suggestions of "rvp" ; I mean I did this 😀

      1) I've recompiled the kernel after uncommenting these lines in sys/arch/amd64/conf/GENERIC:

      options DRM_MAX_RESOLUTION_HORIZONTAL=1920 # Limit DRM size in horizontal dimension
      options DRM_MAX_RESOLUTION_VERTICAL=1080 # Limit DRM size in vertical dimension

      2) I've recreated the drm devices ;

      3) I've tried to boot netbsd using two different versions of boot.cfg 😀

      a)

      menu=Boot normally:rndseed /var/db/entropy-file;gop 4;boot
      #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
      userconf=disable nouveau*
      userconf=disable i915drmkms*
      default=1
      timeout=5
      clear=1
      consdev com1

      b)

      menu=Boot normally:rndseed /var/db/entropy-file;gop 4;boot
      #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
      userconf=disable nouveau*
      #userconf=disable i915drmkms*
      default=1
      timeout=5
      clear=1
      consdev com1

      AND this content inside /etc/X11/xorg.conf.d/xorg.conf

      Section "Device"
      Identifier "Card0"
      Driver "modesetting"
      EndSection

      if b) the monitor turns off and I can't use netbsd anymore

      if a) netbsd is able to boot,but when I do : startx,xorg does not start. Below u can read the logs file attached.

      dmesg : https://pastebin.ubuntu.com/p/TB4f88ZYzm/

      xorg.log : https://pastebin.ubuntu.com/p/7FqGdQNjbW/

      • rvp replied to this.

        marietto give me clearly what's the proper path

        Already given in post #17

        marietto if a) netbsd is able to boot,but when I do : startx,xorg does not start.

        Of course this won't start: In this configuration you've disabled both your DRM drivers and then you're asking to run the modesetting X display driver which needs DRM kernel drivers. modesetting won't work on genfb. The only X display driver which will work on genfb is wsfb

        marietto if b) the monitor turns off and I can't use netbsd anymore

        Multiple reasons could account for this:

        1. The new kernel doesn't have the MAX_RESOLUTION changes because you compiled the kernel with -u.
          Solution: compile only the kernel again, this time, omit the -u flag to do a full rebuild of the kernel.
          (Really, -u is for developers. Users should just rebuild the whole kernel from scratch.)

        2. You've specified a serial console and/or are running in a VM.
          Solution: Run on the regular console and actual HW. Also without -s (single-user mode)

        3. You've made the Intel card the primary in BIOS, but, have disabled i915drmkms and this confuses NetBSD nouveau DRM driver.
          Solution: If the Intel card is selected in BIOS, then nouveau should be disabled. And vice versa.
          In both cases, the Xorg display driver should be modesetting. Make sure you re-create the DRM devices in /dev before starting X.

        Q: Is it possible to disable the unwanted graphic adapters completely in your BIOS instead of only selecting which one to make primary?

        1. Your GPU HW or HW combination is not supported yet.
          Solution: report with full dmesg/Xorg.log on the Github issues page.

        marietto Below u can read the logs file attached.

        These logs don't help at all. Here, you've disabled both the Intel and Nvidia DRM drivers--after which the safe genfb framebuffer driver takes over (which we already know works), and then you're trying to run the modesetting X driver on genfb (which is invalid--modesettingonly works if the kernel DRM drivers are enabled).

        Since we want to make DRM work, enable the Intel DRM driver (first), then boot into it.
        Set up sshd (instead of using a serial console) so that you can log into the system to shut it down safely in case the display becomes unusable.

        Ok. I did everything like you have suggested. But maybe I did some mistake. So,I want to make a recap :

        0) I've used the phisycal installation of netBSD to do everything

        1) I have uncommented these lines in sys/arch/amd64/conf/GENERIC:

        options DRM_MAX_RESOLUTION_HORIZONTAL=1920 # Limit DRM size in horizontal dimension
        options DRM_MAX_RESOLUTION_VERTICAL=1080 # Limit DRM size in vertical dimension

        2) I've recreated the drm devices with :

        cd /dev
        sh ./MAKEDEV drm0 drm1 drm2

        3) recompiled tools and kernel with the following commands :

        ./build.sh -U -j14 -m amd64 -O /home/mario/Desktop/Dati/obj -T /home/mario/Desktop/Dati/tools tools
        ./build.sh -U -j14 -m amd64 -O /home/mario/Desktop/Dati/obj -T /home/mario/Desktop/Dati/tools kernel=GENERIC

        3.1) copied the netbsd kernel from /home/mario/Desktop/Dati/obj/sys/arch/amd64/compile/GENERIC/netbsd to / with the following command 😀

        cp /home/mario/Desktop/Dati/obj/sys/arch/amd64/compile/GENERIC/netbsd /

        4) I've edited the file boot.cfg like this 😀

        nano /boot.cfg

        
        menu=Boot normally:rndseed /var/db/entropy-file;gop 4;boot
        menu=Boot single user:rndseed /var/db/entropy-file;boot -s
        menu=Drop to boot prompt:prompt
        userconf=disable nouveau* 
        #userconf=disable i915drmkms*
        default=1
        timeout=5
        clear=1

        5.1) I don't know if it useful,but I did an additional try,trying to boot netBSD with bhyve and trying to capture the early boot messages because I wanted to know what's happened as soon as netbsd booted,to understand the reason why the screen turns off and I've captured the messages that u see on the picture below

        6) I've used this xorg.conf file,saved on : /etc/X11/xorg.conf.d

        Section "Device"
        Identifier "Card0"
        Driver "modesetting"
        EndSection

        what else ? nothing is changed. At some point the screen turns off and I can't use netBSD anymore.

          marietto 1) I have uncommented these lines in sys/arch/amd64/conf/GENERIC

          Correct.

          marietto 2) I've recreated the drm devices with

          Correct. Not normally needed, but, if there are errors when starting the modesetting driver, then those devices are removed--for some reason.

          marietto 3) recompiled tools and kernel with the following commands

          Correct. However, in your case, you don't need to build tools. The kernel alone is sufficient.

          marietto 3.1) copied the netbsd kernel

          Correct.

          marietto 4) I've edited the file boot.cfg like this

          First: just remove that gop 4 directive.

          As I mentioned before, it's only useful with the genfb/wsfb combo., since the wsfb Xorg driver doesn't switch resolutions on its own--it just uses whatever the bootloader/kernel set-up. The DRM drivers usually switch to the highest possible resolution, but sometimes, what's chosen can exceed what the monitor is capable of (turning the display off). Which is why we're constraining the max resolution to 1920x1080.

          And, I don't understand why you've disabled the i915drmkms driver when you want your Intel card to be used. This might be a problem if you've made the Intel card the primary in BIOS and then the nouveau driver takes over.

          Look, this is very simple: If the Intel card is primary, then disable the nouveau driver in /boot.cfg.
          If one of the Nvidia cards is primary, then the i915drmkms driver has to be disabled.

          I would suggest either:
          a) completely disabling the unwanted video card in BIOS (if possible), or
          b) physically removing the unneeded cards (if possible).

          marietto 5.1) I don't know if it useful,but I did an additional try,trying to boot netBSD with bhyve and trying to capture the early boot messages

          bhyve screenshots are not useful as they're not real HW. You can make a more useful screenshot like this:
          Use your phone to make a short movie (at the highest possible resolution) of the screen. Then, step through the ending frames one-by-one and post the frame just before the screen blanks.

          Even more useful would be combining that with the dmesg and Xorg.log files from the machine. If you enable sshd, then you just login--even if the screen is off--and collect those files.

          marietto 6) I've used this xorg.conf file,saved on : /etc/X11/xorg.conf.d

          Correct.

          • Jay likes this.

          3) I tried to compile the kernel alone without the tools,but an error came up,telling that it wants the tools to build the kernel

          4) going to try

          4.1) I haven't disabled the i915drmkms driver from boot.cfg,because I used the hashtag before the command,like this : #userconf=disable i915drmkms* ; maybe you didn't see it

          5) my BIOS doesn't allow to disable a graphic card. I can only select which card I want as primary or secondary

          6) I can't remove physically a graphic card

          • rvp replied to this.

            I made new experiments :

            1) I have disabled the gop 4 directive,but the screen turned off again

            2) I've installed ssh in NetBSD and I've been able to connect to the ssh server using ssh client on Windows. It means that the NetBSD kernel does not crash

            3) I've recorded a video because I wanted to capture the latest boot message displayed on the screen just before the monitor turns off. Do you want to give it a look ? it is here

            https://drive.google.com/file/d/1H8uKrzirCqtd1IQ1JrW_HXNl6Rm3hNnn/view?usp=sharing

            The error message is : failed to load dmc firmware i915/kbl_dmc_ver1_04.bin

            but I'm not sure. I'm not able to see it clearly...

            • rvp replied to this.

              marietto The error message is : failed to load dmc firmware i915/kbl_dmc_ver1_04.bin
              but I'm not sure. I'm not able to see it clearly...

              That looks about right, but, I can't make out clearly either. (Atleast hold the camera sideways, mate.)
              Looks like either:
              a) you'll have to bring in the Linux firmware blobs--see this post, or
              b) it's a driver bug and you'll have to report it.

              marietto I used the hashtag before the command,like this : #userconf=disable i915drmkms* ; maybe you didn't see it

              My mistake, I thought the nouveau was commented out.

              • Jay likes this.

              I've tried to follow this tutorial,but at some point it didn't work :

              https://www.unitedbsd.com/d/253-intel-hd-graphics-on-nuc6cayh/46

              
              netbsd-marietto# git clone https://git.kernel.org/.../git/firmware/linux-firmware.git
              
              netbsd-marietto# mkdir /libdata/firmware/i915drmkms
              
              netbsd-marietto# mv linux-firmware/i915 /libdata/firmware/i915drmkms/
              
              netbsd-marietto# rm -rf linux-firmware
              
              netbsd-marietto# ftp http://defert.com/netbsd/intel_csr.c.patch
              
              netbsd-marietto# patch /usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_csr.c intel_csr.c.patch
              Hmm...  Looks like a unified diff to me...
              The text leading up to this was:
              --------------------------
              |--- intel_csr.c.orig   2020-02-14 15:34:58.000000000 +0100
              |+++ intel_csr.c        2021-04-04 12:41:15.467350912 +0200
              --------------------------
              patch: **** can't find /usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_csr.c
              
              netbsd-marietto# cp -r /home/mario/Desktop/Dati/netbsd-src/sys/external/bsd/drm2/dist/drm/i915 /usr/src/sys/external/bsd/drm2/dist/drm
              
              netbsd-marietto# patch /usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_csr.c intel_csr.c.patch
              Hmm...  Looks like a unified diff to me...
              The text leading up to this was:
              --------------------------
              |--- intel_csr.c.orig   2020-02-14 15:34:58.000000000 +0100
              |+++ intel_csr.c        2021-04-04 12:41:15.467350912 +0200
              --------------------------
              Patching file /usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_csr.c using Plan A...
              Hunk #1 failed at 49.
              Hunk #2 failed at 205.
              Hunk #3 failed at 338.
              3 out of 3 hunks failed--saving rejects to /usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_csr.c.rej
              done
              • rvp replied to this.

                marietto at some point it didn't work

                Only the firmware needs to be installed, mate. The patching and compiling stuff is for getting his Intel card to work. You don't need it.

                And, you've overwritten the 9.2 intel_csr.c with the same file from 9.99.82. (Why?)

                1. Remove the intel_csr.c.rej
                2. Rename the intel_csr.c.orig file saved (in the same dir.) by patch back over intel_csr.c

                done. what should I do now ?

                $ cd /usr/src/sys/arch/amd64/conf
                $ config GENERIC
                $ cd ../compile/GENERIC
                $ make
                $ mv /netbsd /netbsd.old
                $ cp netbsd /
                $ cd /dev
                $ sh ./MAKEDEV drm0 drm1 drm2
                $ cd /etc/X11/xorg.conf.d
                $ mv xorg-intel.conf xorg.intel.conf_
                $ mv xorg-modesetting.conf_ xorg-modesetting.conf

                kern info [drm] failed to find VBIOS tables (VBT)
                i915drmkms0 : interrupting at ms19 vec0

                • rvp replied to this.

                  marietto

                  kern info [drm] failed to find VBIOS tables (VBT)
                  i915drmkms0 : interrupting at ms19 vec0

                  Those are standard messages. They're fine. The next message is more important:

                  [drm] finished loading DMC firmware ...

                  This means that the right firmware was copied to the correct location. If the screen is blanking even after this, then its a driver bug and you should report it on Github. BTW, I just tried the new DRM drivers on my own 10-year-old integrated Intel card, and while the driver didn't blank the screen, the results of running X were either:

                  a) locked-up the system (with glamor acceleration--only on -HEAD; 9.2 doesn't have it), or
                  b) a completely unusable display woth glamor disabled.

                  Can you:

                  1. Post the dmesg output?

                  2. Try this experiment: After the screen goes blank, wait a few minutes; then blindly type-in (on the console) your username, password, and then startx
                    I want to see if running X produces a display. Post the Xorg.log file.
                    (You can check if X is running by logging in via ssh.)

                  3. Disable your Intel driver, and see if the new Nvidia DRM drivers work better.

                  • Jay likes this.

                  marietto

                  $ cd /usr/src/sys/arch/amd64/conf
                  $ config GENERIC
                  $ cd ../compile/GENERIC
                  $ make
                  $ mv /netbsd /netbsd.old
                  $ cp netbsd /

                  I don't know what all this is, but, you don't need to do it. If you want to compile the kernel use build.sh as you've already done.

                    10 days later

                    rvp

                    I did what u have suggested. logged inside the pc with ssh and copied and pasted the xorg.conf file. no,X is not running on the machine. and yes,I have created the drm0 1 and 2 devices before booting netbsd. on the boot.cfg file I have disabled the nouveau driver,but not the i915drmkms one. The driver that I have included on the xorg.conf file is "modesetting". This is the boot.cfg file i've used 😀 and I've recompiled the kernel with the build.sh script.

                    menu=Boot normally:rndseed /var/db/entropy-file;gop 4;boot
                    menu=Boot single user:rndseed /var/db/entropy-file;boot -s
                    menu=Boot DEVELOPMENT kernel:rndseed /var/db/entropy-file;gop 4;boot netbsd -v -x
                    menu=Drop to boot prompt:prompt
                    #userconf=disable i915drmkms*
                    userconf=disable nouveau*
                    default=1
                    timeout=5
                    clear=1

                    /var/log/Xorg.1.log file :

                    [   319.957]
                    X.Org X Server 1.20.5
                    X Protocol Version 11, Revision 0
                    [   319.957] Build Operating System: NetBSD/amd64 9.2 - The NetBSD Foundation, Inc.
                    [   319.957] Current Operating System: NetBSD netbsd-marietto.homenet.telecomitalia.it 8.99.22 NetBSD 8.>[   319.958] Build Date: 03 March 2019  07:11:23AM
                    [   319.958]
                    [   319.958] Current version of pixman: 0.38.4
                    [   319.958]    Before reporting problems, check http://wiki.x.org
                            to make sure that you have the latest version.
                    [   319.958] Markers: (--) probed, (**) from config file, (==) default setting,
                            (++) from command line, (!!) notice, (II) informational,
                            (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
                    [   319.958] (==) Log file: "/var/log/Xorg.1.log", Time: Wed Sep 22 04:26:55 2021
                    [   319.958] (==) Using config directory: "/etc/X11/xorg.conf.d"
                    [   319.958] (==) ServerLayout "X.org Configured"
                    [   319.958] (**) |-->Screen "Screen0" (0)
                    [   319.958] (**) |   |-->Monitor "Monitor0"
                    [   319.958] (**) |   |-->Device "Card0"
                    [   319.958] (**) |-->Screen "Screen1" (1)
                    [   319.958] (**) |   |-->Monitor "Monitor1"
                    [   319.958] (**) |   |-->Device "Card1"
                    [   319.958] (**) |-->Screen "Screen2" (2)
                    [   319.958] (**) |   |-->Monitor "Monitor2"
                    [   319.958] (**) |   |-->Device "Card2"
                    [   319.958] (**) |-->Input Device "Mouse0"
                    [   319.958] (**) |-->Input Device "Keyboard0"
                    [   319.958] (==) Not automatically adding devices
                    [   319.958] (==) Not automatically enabling devices
                    [   319.958] (==) Not automatically adding GPU devices
                    [   319.958] (==) Max clients allowed: 256, resource mask: 0x1fffff
                    [   319.958] (**) FontPath set to:
                            /usr/X11R7/lib/X11/fonts/misc/,
                            /usr/X11R7/lib/X11/fonts/TTF/,
                            /usr/X11R7/lib/X11/fonts/Type1/,
                            /usr/X11R7/lib/X11/fonts/75dpi/,
                            /usr/X11R7/lib/X11/fonts/100dpi/,
                            /usr/X11R7/lib/X11/fonts/misc/,
                            /usr/X11R7/lib/X11/fonts/TTF/,
                            /usr/X11R7/lib/X11/fonts/Type1/,
                            /usr/X11R7/lib/X11/fonts/75dpi/,
                            /usr/X11R7/lib/X11/fonts/100dpi/
                    [   319.958] (**) ModulePath set to "/usr/X11R7/lib/modules"
                    [   319.958] (II) Loader magic: 0x1ec8ea60
                    [   319.958] (II) Module ABI versions:
                    [   319.958]    X.Org ANSI C Emulation: 0.4
                    [   319.958]    X.Org Video Driver: 24.0
                    [   319.958]    X.Org XInput driver : 24.1
                    [   319.958]    X.Org Server Extension : 10.0
                    [   319.996] (--) PCI: (0@0:2:0) 8086:3e98:1458:d000 rev 2, Mem @ 0x98000000/16777216, 0x40000000/536870>
                    [   319.996] (--) PCI:*(1@1:0:0) 10de:1e04:19da:2503 rev 161, Mem @ 0x96000000/16777216, 0x60000000/2684>
                    [   319.996] (--) PCI: (2@2:0:0) 10de:1c02:19da:2438 rev 161, Mem @ 0x92000000/16777216, 0x80000000/2684>
                    [   319.996] (II) "glx" will be loaded by default.
                    [   319.996] (II) LoadModule: "glx"
                    [   319.996] (II) Loading /usr/X11R7/lib/modules/extensions/libglx.so
                    [   319.996] (II) Module glx: vendor="X.Org Foundation"
                    [   319.996]    compiled for 1.20.5, module version = 1.0.0
                    [   319.996]    ABI class: X.Org Server Extension, version 10.0
                    [   319.996] (II) LoadModule: "modesetting"
                    [   319.997] (II) Loading /usr/X11R7/lib/modules/drivers/modesetting_drv.so
                    [   319.997] (II) Module modesetting: vendor="X.Org Foundation"
                    [   319.997]    compiled for 1.20.5, module version = 1.20.5
                    [   319.997]    Module class: X.Org Video Driver
                    [   319.997]    ABI class: X.Org Video Driver, version 24.0
                    [   319.997] (II) LoadModule: "nouveau"
                    [   319.997] (II) Loading /usr/X11R7/lib/modules/drivers/nouveau_drv.so
                    [   319.997] (II) Module nouveau: vendor="X.Org Foundation"
                    [   319.997]    compiled for 1.20.5, module version = 1.0.16
                    [   319.997]    Module class: X.Org Video Driver
                    [   319.997]    ABI class: X.Org Video Driver, version 24.0
                    [   319.997] (II) LoadModule: "mouse"
                    [   319.997] (II) Loading /usr/X11R7/lib/modules/drivers/mouse_drv.so
                    [   319.997] (II) Module mouse: vendor="X.Org Foundation"
                    [   319.998]    compiled for 1.20.5, module version = 1.9.2
                    [   319.998]    Module class: X.Org XInput Driver
                    [   319.998]    ABI class: X.Org XInput driver, version 24.1
                    [   319.998] (II) LoadModule: "kbd"
                    [   319.998] (II) Loading /usr/X11R7/lib/modules/drivers/kbd_drv.so
                    [   319.998] (II) Module kbd: vendor="X.Org Foundation"
                    [   319.998]    compiled for 1.20.5, module version = 1.9.0
                    [   319.998]    Module class: X.Org XInput Driver
                    [   319.998]    ABI class: X.Org XInput driver, version 24.1
                    [   319.998] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
                    [   319.998] (II) NOUVEAU driver
                    [   319.998] (II) NOUVEAU driver for NVIDIA chipset families :
                    [   319.998]    RIVA TNT            (NV04)
                    [   319.998]    RIVA TNT2           (NV05)
                    [   319.998]    GeForce 256         (NV10)
                    [   319.998]    GeForce 2           (NV11, NV15)
                    [   319.998]    GeForce 4MX         (NV17, NV18)
                    [   319.998]    GeForce 3           (NV20)
                    [   319.998]    GeForce 4Ti         (NV25, NV28)
                    [   319.998]    GeForce FX          (NV3x)
                    [   319.998]    GeForce 6           (NV4x)
                    [   319.998]    GeForce 7           (G7x)
                    [   319.998]    GeForce 8           (G8x)
                    [   319.998]    GeForce 9           (G9x)
                    [   319.998]    GeForce GTX 2xx/3xx (GT2xx)
                    [   319.998]    GeForce GTX 4xx/5xx (GFxxx)
                    [   319.998]    GeForce GTX 6xx/7xx (GKxxx)
                    [   319.998]    GeForce GTX 9xx     (GMxxx)
                    [   319.998]    GeForce GTX 10xx    (GPxxx)
                    [   319.998] (--) Using wscons driver on /dev/ttyE4 in pcvt compatibility mode (version 3.32)
                    [   319.998] (--) using VT number 5
                    [   320.124] (EE) open /dev/dri/card0: No such file or directory
                    [   320.124] (WW) Falling back to old probe method for modesetting
                    [   320.124] (EE) open /dev/dri/card0: No such file or directory
                    [   320.124] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
                    [   320.124] (EE) Screen 0 deleted because of no matching config section.
                    [   320.125] (II) UnloadModule: "modesetting"
                    [   320.125] (EE) Device(s) detected, but none match those in the config file.
                    [   320.125] (EE)
                    Fatal server error:
                    [   320.125] (EE) no screens found(EE)
                    [   320.125] (EE)
                    Please consult the The X.Org Foundation support
                             at http://wiki.x.org
                     for help.
                    [   320.125] (EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
                    [   320.125] (EE)
                    [   320.245] (EE) Server terminated with error (1). Closing log file.
                    • rvp replied to this.

                      marietto and yes,I have created the drm0 1 and 2 devices before booting netbsd.

                      Not according to that log:

                      [   320.124] (EE) open /dev/dri/card0: No such file or directory
                      [   320.124] (WW) Falling back to old probe method for modesetting
                      [   320.124] (EE) open /dev/dri/card0: No such file or directory

                      which os why Xorg didn't start. Try again.

                      marietto I have disabled the nouveau driver,but not the i915drmkms one.

                      Try the other way around also: disable intel, enable nouveau. And again, please post the dmesg output too like I asked.

                      1. I I've created the script below and I've called it /etc/rc.d/mkdri
                      2. I've added mkdri=YES in /etc/rc.conf

                      . /etc/rc.subr

                      name="mkdri"
                      desc="Create drm devices"
                      start_cmd="mkdri_start"
                      stop_cmd=":"

                      mkdri_start()
                      {
                      cd /dev
                      sh MAKEDEV drm0 drm1 drm2
                      }

                      load_rc_config $name
                      run_rc_command "$1"

                      Check what happened from the screenshots that I've attached.

                      This is the xorg log 😀

                      
                      [   319.957] 
                      X.Org X Server 1.20.5
                      X Protocol Version 11, Revision 0
                      [   319.957] Build Operating System: NetBSD/amd64 9.2 - The NetBSD Foundation, Inc.
                      [   319.957] Current Operating System: NetBSD netbsd-marietto.homenet.telecomitalia.it 8.99.22 NetBSD 8.99.22 (GENERIC) #0: Wed Sep 22 02:02:43 CEST 2021  root@netbsd-marietto.homenet.telecomitalia.it:/home/mario/Desktop/Dati/obj/sys/arch/amd64/compile/GENERIC amd64
                      [   319.958] Build Date: 03 March 2019  07:11:23AM
                      [   319.958]  
                      [   319.958] Current version of pixman: 0.38.4
                      [   319.958] 	Before reporting problems, check http://wiki.x.org
                      	to make sure that you have the latest version.
                      [   319.958] Markers: (--) probed, (**) from config file, (==) default setting,
                      	(++) from command line, (!!) notice, (II) informational,
                      	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
                      [   319.958] (==) Log file: "/var/log/Xorg.1.log", Time: Wed Sep 22 04:26:55 2021
                      [   319.958] (==) Using config directory: "/etc/X11/xorg.conf.d"
                      [   319.958] (==) ServerLayout "X.org Configured"
                      [   319.958] (**) |-->Screen "Screen0" (0)
                      [   319.958] (**) |   |-->Monitor "Monitor0"
                      [   319.958] (**) |   |-->Device "Card0"
                      [   319.958] (**) |-->Screen "Screen1" (1)
                      [   319.958] (**) |   |-->Monitor "Monitor1"
                      [   319.958] (**) |   |-->Device "Card1"
                      [   319.958] (**) |-->Screen "Screen2" (2)
                      [   319.958] (**) |   |-->Monitor "Monitor2"
                      [   319.958] (**) |   |-->Device "Card2"
                      [   319.958] (**) |-->Input Device "Mouse0"
                      [   319.958] (**) |-->Input Device "Keyboard0"
                      [   319.958] (==) Not automatically adding devices
                      [   319.958] (==) Not automatically enabling devices
                      [   319.958] (==) Not automatically adding GPU devices
                      [   319.958] (==) Max clients allowed: 256, resource mask: 0x1fffff
                      [   319.958] (**) FontPath set to:
                      	/usr/X11R7/lib/X11/fonts/misc/,
                      	/usr/X11R7/lib/X11/fonts/TTF/,
                      	/usr/X11R7/lib/X11/fonts/Type1/,
                      	/usr/X11R7/lib/X11/fonts/75dpi/,
                      	/usr/X11R7/lib/X11/fonts/100dpi/,
                      	/usr/X11R7/lib/X11/fonts/misc/,
                      	/usr/X11R7/lib/X11/fonts/TTF/,
                      	/usr/X11R7/lib/X11/fonts/Type1/,
                      	/usr/X11R7/lib/X11/fonts/75dpi/,
                      	/usr/X11R7/lib/X11/fonts/100dpi/
                      [   319.958] (**) ModulePath set to "/usr/X11R7/lib/modules"
                      [   319.958] (II) Loader magic: 0x1ec8ea60
                      [   319.958] (II) Module ABI versions:
                      [   319.958] 	X.Org ANSI C Emulation: 0.4
                      [   319.958] 	X.Org Video Driver: 24.0
                      [   319.958] 	X.Org XInput driver : 24.1
                      [   319.958] 	X.Org Server Extension : 10.0
                      [   319.996] (--) PCI: (0@0:2:0) 8086:3e98:1458:d000 rev 2, Mem @ 0x98000000/16777216, 0x40000000/536870912, I/O @ 0x00005000/64
                      [   319.996] (--) PCI:*(1@1:0:0) 10de:1e04:19da:2503 rev 161, Mem @ 0x96000000/16777216, 0x60000000/268435456, 0x94000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
                      [   319.996] (--) PCI: (2@2:0:0) 10de:1c02:19da:2438 rev 161, Mem @ 0x92000000/16777216, 0x80000000/268435456, 0x90000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/524288
                      [   319.996] (II) "glx" will be loaded by default.
                      [   319.996] (II) LoadModule: "glx"
                      [   319.996] (II) Loading /usr/X11R7/lib/modules/extensions/libglx.so
                      [   319.996] (II) Module glx: vendor="X.Org Foundation"
                      [   319.996] 	compiled for 1.20.5, module version = 1.0.0
                      [   319.996] 	ABI class: X.Org Server Extension, version 10.0
                      [   319.996] (II) LoadModule: "modesetting"
                      [   319.997] (II) Loading /usr/X11R7/lib/modules/drivers/modesetting_drv.so
                      [   319.997] (II) Module modesetting: vendor="X.Org Foundation"
                      [   319.997] 	compiled for 1.20.5, module version = 1.20.5
                      [   319.997] 	Module class: X.Org Video Driver
                      [   319.997] 	ABI class: X.Org Video Driver, version 24.0
                      [   319.997] (II) LoadModule: "nouveau"
                      [   319.997] (II) Loading /usr/X11R7/lib/modules/drivers/nouveau_drv.so
                      [   319.997] (II) Module nouveau: vendor="X.Org Foundation"
                      [   319.997] 	compiled for 1.20.5, module version = 1.0.16
                      [   319.997] 	Module class: X.Org Video Driver
                      [   319.997] 	ABI class: X.Org Video Driver, version 24.0
                      [   319.997] (II) LoadModule: "mouse"
                      [   319.997] (II) Loading /usr/X11R7/lib/modules/drivers/mouse_drv.so
                      [   319.997] (II) Module mouse: vendor="X.Org Foundation"
                      [   319.998] 	compiled for 1.20.5, module version = 1.9.2
                      [   319.998] 	Module class: X.Org XInput Driver
                      [   319.998] 	ABI class: X.Org XInput driver, version 24.1
                      [   319.998] (II) LoadModule: "kbd"
                      [   319.998] (II) Loading /usr/X11R7/lib/modules/drivers/kbd_drv.so
                      [   319.998] (II) Module kbd: vendor="X.Org Foundation"
                      [   319.998] 	compiled for 1.20.5, module version = 1.9.0
                      [   319.998] 	Module class: X.Org XInput Driver
                      [   319.998] 	ABI class: X.Org XInput driver, version 24.1
                      [   319.998] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
                      [   319.998] (II) NOUVEAU driver 
                      [   319.998] (II) NOUVEAU driver for NVIDIA chipset families :
                      [   319.998] 	RIVA TNT            (NV04)
                      [   319.998] 	RIVA TNT2           (NV05)
                      [   319.998] 	GeForce 256         (NV10)
                      [   319.998] 	GeForce 2           (NV11, NV15)
                      [   319.998] 	GeForce 4MX         (NV17, NV18)
                      [   319.998] 	GeForce 3           (NV20)
                      [   319.998] 	GeForce 4Ti         (NV25, NV28)
                      [   319.998] 	GeForce FX          (NV3x)
                      [   319.998] 	GeForce 6           (NV4x)
                      [   319.998] 	GeForce 7           (G7x)
                      [   319.998] 	GeForce 8           (G8x)
                      [   319.998] 	GeForce 9           (G9x)
                      [   319.998] 	GeForce GTX 2xx/3xx (GT2xx)
                      [   319.998] 	GeForce GTX 4xx/5xx (GFxxx)
                      [   319.998] 	GeForce GTX 6xx/7xx (GKxxx)
                      [   319.998] 	GeForce GTX 9xx     (GMxxx)
                      [   319.998] 	GeForce GTX 10xx    (GPxxx)
                      [   319.998] (--) Using wscons driver on /dev/ttyE4 in pcvt compatibility mode (version 3.32)
                      [   319.998] (--) using VT number 5
                      [   320.124] (EE) open /dev/dri/card0: No such file or directory
                      [   320.124] (WW) Falling back to old probe method for modesetting
                      [   320.124] (EE) open /dev/dri/card0: No such file or directory
                      [   320.124] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
                      [   320.124] (EE) Screen 0 deleted because of no matching config section.
                      [   320.125] (II) UnloadModule: "modesetting"
                      [   320.125] (EE) Device(s) detected, but none match those in the config file.
                      [   320.125] (EE) 
                      Fatal server error:
                      [   320.125] (EE) no screens found(EE) 
                      [   320.125] (EE) 
                      Please consult the The X.Org Foundation support 
                      	 at http://wiki.x.org
                       for help. 
                      [   320.125] (EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
                      [   320.125] (EE) 
                      [   320.245] (EE) Server terminated with error (1). Closing log file.

                      Take in considerations these phenomenon :

                      1) if I disable the nouveau driver and the i915 driver and I don't use the framebuffer driver the screen will be disabled
                      2) if I disable only the nouveau driver t.s.w.b.s
                      3) if I disable only the i915 driver t.s.w.b.s

                      whatever things I do,netbsd always choose the nvidia graphic card as primary. it works only with the framebuffer driver (wsfb) on the xorg.conf file.

                      • rvp replied to this.

                        marietto I've created the script below and I've called it /etc/rc.d/mkdri
                        I've added mkdri=YES in /etc/rc.conf

                        This is a very good idea, but this only creates the dri devices at boot time.
                        If you start Xorg with the wsfb driver, then switch to the modesetting driver, the devices will be lost and the modesetting driver won't load. Remember to keep this in mind.

                        marietto Take in considerations these phenomenon :

                        1) if I disable the nouveau driver and the i915 driver and I don't use the framebuffer driver the screen will be disabled
                        2) if I disable only the nouveau driver t.s.w.b.s
                        3) if I disable only the i915 driver t.s.w.b.s

                        whatever things I do,netbsd always choose the nvidia graphic card as primary. it works only with the framebuffer driver (wsfb) on the xorg.conf file.

                        I can't tell if any if these are true because you haven't shown me the kernel logs.

                        It's very simple: every Xorg.log has to be paired with the corresponding dmesg output and the /boot.cfg and the Xorg config file. Right now, you're just confusing the heck of me, and during troubleshooting the usual rule is that only one party at a time should be confused.

                        Logs.