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

Hello to everyone.

I'm a new net-bsd user. I'm learning and trying this OS. The first step is to configure correctly the resolution of my screen. On my PC I have 3 graphic cards :

1) 000:02:0: Intel UHD Graphics 630 (VGA display, revision 0x02)

2) 001:00:0: NVIDIA product 1e04 (VGA display, revision 0xa1) : (NVIDIA RTX 2080ti)

3) 002:00:0: NVIDIA GeForce GTX 1060 3GB (VGA display, revision 0xa1)

Good. On the BIOS I have configured the Intel UHD Graphics 630 as primary GPU device. In addition I have installed XFCE4. The problem that I have is that I can't increase the default resolution that have been chosen automatically,that's 1024x768. Probably I haven't installed the correct driver,I don't know. Below u can see all the hardware specs of my PC :

netbsd-marietto# pcictl pci0 list

000:00:0: Intel Xeon E (S, Desktop) Host Bridge, DRAM (host bridge, revision 0x0d)

000:01:0: Intel Core 6G PCIe x16 (PCI bridge, revision 0x0d)

000:01:1: Intel Core 6G PCIe x8 (PCI bridge, revision 0x0d)

000:02:0: Intel UHD Graphics 630 (VGA display, revision 0x02)

000:18:0: Intel 300 Series Thermal (miscellaneous DASP, revision 0x10)

000:20:0: Intel 300 Series USB 3.1 xHCI (USB serial bus, xHCI, revision 0x10)

000:20:2: Intel 300 Series Shared SRAM (RAM memory, revision 0x10)

000:22:0: Intel 300 Series MEI (miscellaneous communications, revision 0x10)

000:23:0: Intel 300 Series SATA (AHCI) desktop (SATA mass storage, AHCI 1.0, revision 0x10)

000:27:0: Intel 300 Series PCIe (PCI bridge, revision 0xf0)

000:28:0: Intel 300 Series PCIe (PCI bridge, revision 0xf0)

000:28:5: Intel 300 Series PCIe (PCI bridge, revision 0xf0)

000:29:0: Intel 300 Series PCIe (PCI bridge, revision 0xf0)

000:31:0: Intel Z390 LPC (ISA bridge, revision 0x10)

000:31:3: Intel 300 Series cAVS (mixed mode multimedia, revision 0x10)

000:31:4: Intel 300 Series SMBus (SMBus serial bus, revision 0x10)

000:31:5: Intel 300 Series SPI (FLASH) (miscellaneous serial bus, revision 0x10)

000:31:6: Intel I219-V Ethernet Connection (ethernet network, revision 0x10)

001:00:0: NVIDIA product 1e04 (VGA display, revision 0xa1)

001:00:1: NVIDIA product 10f7 (mixed mode multimedia, revision 0xa1)

001:00:2: NVIDIA product 1ad6 (USB serial bus, xHCI, revision 0xa1)

001:00:3: NVIDIA product 1ad7 (miscellaneous serial bus, revision 0xa1)

002:00:0: NVIDIA GeForce GTX 1060 3GB (VGA display, revision 0xa1)

002:00:1: NVIDIA product 10f1 (mixed mode multimedia, revision 0xa1)

003:00:0: Micron/Crucial Technology product 5403 (Flash mass storage, NVMe, revision 0x03)

005:00:0: Renesas Technologies uPD720201 USB 3.0 Host Controller (USB serial bus, xHCI, revision 0x03)

netbsd-marietto# dmesg

[ 15.871239] wsdisplay0: screen 1 added (default, vt100 emulation)

[ 15.871239] wsdisplay0: screen 2 added (default, vt100 emulation)

[ 15.871239] wsdisplay0: screen 3 added (default, vt100 emulation)

[ 15.871239] wsdisplay0: screen 4 added (default, vt100 emulation)

I've installed this server Xorg :

modular-xorg-server-1.20.11 Modular X11 server from modular X.org

At the moment I've installed these drivers with the command pkgin install : (please be patient if I made some mistake,I'm experimenting / learning)

**intel-vaapi-driver-2.4.0 VA-API user mode driver for Intel GEN Graphics family

xf86-video-intel-2.99.917.20200515 Modular Xorg Intel video driver**

Probably one some of them shouldn't be installed ?

And I'm not using any xorg.conf file because the one that I have generated with the command : Xorg -configure does not work at all,so I have removed it. I mean the one that u see below :

https://pastebin.ubuntu.com/p/9bSCXjnZZm/

Below u can read the Xorg log file :

https://pastebin.ubuntu.com/p/9PnxYmkqxH/

It's all. I would like to understand how to configure correctly my Intel graphic integrated chipset. Very thanks.

    marietto It's probably because your GPU is too new. NetBSD 9.x supports Intel GPUs up to and including Kaby Lake, with DRM implementation equal to Linux 4.4. Here's the link for 9.0 Announcement which mentions the DRM version.

    EDIT: UHD 630 is Coffee Lake and supported in Linux since around 4.13.

    marietto The Xorg server is using the NVIDIA RTX 2080ti card:

    [  1202.633] (--) PCI: (0@0:2:0) 8086:3e98:1458:d000 rev 2, Mem @ 0x98000000/16777216, 0x40000000/536870912, I/O @ 0x00005000/64
    [  1202.633] (--) 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
    [  1202.633] (--) 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

    You can see the * on the 2nd line. However, the nvidia driver fails to initialize the card:

    [  1202.649] (EE) [drm] Failed to open DRM device for pci:0001:01:00.0: -19
    [  1202.661] (EE) [drm] Failed to open DRM device for pci:0001:01:00.0: -19
    [  1202.661] (EE) open /dev/dri/card0: No such file or directory
    [  1202.661] (WW) Falling back to old probe method for modesetting
    [  1202.661] (EE) open /dev/dri/card0: No such file or directory

    so, Xorg falls back to the safe option for your HW which is the wsfb driver:

    [  1202.661] (II) wsfb(0): Creating default Display subsection in Screen section
            "Builtin Default wsfb Screen 0" for depth/fbbpp 24/32
    [  1202.661] (==) wsfb(0): Depth 24, (==) framebuffer bpp 32

    and that, since you probably haven't configured it to use a better resolution, defaults to 1024x768.

    Try:

    1. Uninstall modular-xorg and xf86-video-intel--Just use what's in the base install.

    2. Re-create the DRM devices. As root:

      cd /dev
      sh ./MAKEDEV drm0 drm1 drm2
    3. Edit /boot.cfg and disable the nouveau drivers by adding this line:

      userconf=disable nouveau*
    4. Reboot. Post /var/run/dmesg.boot and current Xorg log file if X starts.

      I already said this on reddit, but you shouldn't use modular-xorg with the official binary packages. They're built for native X only.

      Coffee Lake is indeed too new for the DRM/KMS stack in 9, but you should still be able to get the correct resolution with gop+wsfb.

      • Jay likes this.
      5 days later

      rvp Hello. thanks for your explanation. I would like to know why NetBSD chosen to use the NVIDIA graphic card instead of the Intel UHD 630 as primary choice. I have attached the screen to the HDMI port of the UHD 630,not on the NVIDIA card. And on the BIOS,I have chosen the UHD 630 as primary,not the NVIDIA card. I want to use the UHD 630 as primary graphic card and I want to make the NVIDIA card available to be passed thru with qemu + nvmm. About this : do u know if the pass thru of my graphic card can work on NetBSD ?

      • rvp replied to this.

        marietto I would like to know why NetBSD chosen to use the NVIDIA graphic card instead of the Intel UHD 630 as primary choice.

        No idea--will have to look at your /var/run/dmesg.boot. Try loading the intel driver explicitly. (Add a BusID to further nail it down.)

        marietto do u know if the pass thru of my graphic card can work on NetBSD ?

        No idea. Sorry.

          rvp
          like this ?

          /etc/X11/xorg.conf

          Section "Device"
          Identifier "Card0"
          Driver "intel"
          EndSection

          • rvp replied to this.

            marietto /etc/X11/xorg.conf

            Location is wrong. Move the wsfb.conf file out of the way and put that fragment, above, in the same dir.

            I tried the solution below but it didn't work :

            netbsd-marietto# pkgin install xf86-video-wsfb

            calculating dependencies...done.

            2 packages to install:
            xf86-video-wsfb-0.4.0nb8 modular-xorg-server-1.20.11

            0 to refresh, 0 to upgrade, 2 to install
            16K to download, 7861K to install

            proceed ? [Y/n] y

            cd /etc/X11/xorg.conf.d

            nano wsfb.conf

            Section "Device"
            Identifier "Card0"
            Driver "intel"
            EndSection

            • rvp replied to this.

              Did you actually disable nouveau and/or i915drmkms on your boot.cfg as suggested above by @rvp?

              • Jay likes this.

              yes. I need to know if I should create the file xorg.conf or the file wsfb.conf,which content should be written inside and where should it be placed. thanks.

              lets make a recap. This is what I did 😀

              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* i915drmkms*
              default=1
              timeout=5
              clear=1

              and I've created the file wsfb.conf that I have placed it into the folder /etc/X11/

              Section "Device"
              Identifier "Card0"
              Driver "intel"
              EndSection

              xorg started but I'm not sure that it uses the intel driver. how can I check it ?

              Inside the folder /etc/X11 I haven't any xorg.conf file and any xorg.conf.d folder...

                marietto

                2021-09-16 17:57 > dmesg | grep intel
                [     4.902797] intelfb0 at i915drmkms0
                [     4.902797] intelfb0: framebuffer at 0xc0097000, size 1366x768, depth 32, stride 5504
                [     5.902796] wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0

                nothing....

                netbsd-marietto# dmesg | grep intel
                netbsd-marietto#

                it seems that it ignores the file wsfb.conf located in /etc/X11/ and since I haven't any xorg.conf in /etc/X11/, xorg starts because it gets the default values.

                marietto I tried the solution below but it didn't work :

                netbsd-marietto# pkgin install xf86-video-wsfb

                calculating dependencies...done.

                2 packages to install:
                xf86-video-wsfb-0.4.0nb8 modular-xorg-server-1.20.11

                Aaand you have installed modular Xorg again... 🙂
                Please uninstall all modular-xorg and xf86-video-wsfb etc. NetBSD provides all these in base. There's no need to install any Xorg-related pkgs.

                pkgin rm xf86-video-wsfb
                pkgin rm modular-xorg-server modular-xorg-whatever xf86-whatever
                pkgin autoremove
                pkgin clean

                The correct dir. for the (base) Xorg configs is: /etc/X11/xorg.conf.d/

                wsfb is the fall-back, safe, Xorg display driver. You would only use it if nothing else (intel, nouveau, ...) worked properly.

                A question here:

                marietto menu=Boot normally:rndseed /var/db/entropy-file;gop 4;boot

                What resolution do you get with gop 4? On most EFI BIOSes you get the highest resolution with gop 0 (And, that gop directive is not needed if you use the standard Xorg display drivers.)

                marietto userconf=disable nouveau* i915drmkms*

                Don't disable the intel drm yet; we haven't determined if your intel card actually works.

                Post /var/run/dmesg.boot

                  By the way: why are there official packages for modular Xorg if you're not supposed to use them and anyone willing to use modular Xorg is expected to build its own packages? I don't understand the logic.

                  • nia replied to this.

                    bsduck Because I haven't really settled on a solution yet, heh.

                    The packages still get built for testing purposes. As for whether they're actually useful... someone should verify whether you can startx if you only install the xbase set of native xorg, then install modular-xorg-server. I am not actually sure.

                    Modular xorg is less useful for a few reasons, we do integration work and introduce useful hacks to xsrc that often don't make it to pkgsrc, and it's not subject to the same rigorous testing as xsrc. But it still might be useful to build your packages against modular xorg if you only need a few xorg components. For example, the bits that you need for processing fonts and images on a server.

                      nia Modular xorg is less useful for a few reasons, we do integration work and introduce useful hacks to xsrc that often don't make it to pkgsrc, and it's not subject to the same rigorous testing as xsrc. But it still might be useful to build your packages against modular xorg if you only need a few xorg components. For example, the bits that you need for processing fonts and images on a server.

                      I'll add using pkgsrc outside of NetBSD as a good reason to keep it, the same way it goes for linux-only packages. I've had pure pkgsrc desktop setups on Illumos.

                        JuvenalUrbino I'll add using pkgsrc outside of NetBSD as a good reason to keep it

                        Of course, but my question was not why it is in pkgsrc, but why packages for NetBSD are being built.

                        • pin replied to this.

                          bsduck Because bulk builds build all the packages in the tree. No cherry-picking is done.