Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: i915 observations



On Mon, 19 Dec 2022, Mayuresh wrote:

I tried using Linux's xorg.conf on NetBSD as well as the other way round.

- Both work on the system they are taken from, but both don't work on the
  other system.
- Both use the driver intel, but still when they use the other's file they
  both give the same error Driver not found : intel.


Not surprising that you can't use the xorg.conf from NetBSD on
Linux, or vice-versa. If you look at the full x.org.conf that's
being used you'll see many OS-specific things in there. Eg. references
to the "wheel" group in the NetBSD config, and to "/dev/input/*"
devices in the Linux one. Other critical things like ModulePath are
different too.

Really, just use the xorg.conf fragments and let the X server use
its defaults for the rest.

On Linux:

If I do NOT have xorg.conf startx works.

But if I generate one using X -configure then it doesn't (no matter I set
UXA or not).

    Backtrace:
    0: /usr/libexec/Xorg (xorg_backtrace+0x7d) [0x55bec268d9cd]
    1: /usr/libexec/Xorg (0x55bec2549000+0x14f9b5) [0x55bec26989b5]
    2: /usr/lib/libpthread.so.0 (0x7f976534f000+0x13900) [0x7f9765362900]
    3: /usr/libexec/Xorg (xf86OptionValue+0x7) [0x55bec26a4cf7]
    4: /usr/lib64/xorg/modules/extensions/libvnc.so (0x7f9764862000+0x362c0) [0x7f97648982c0]
    5: /usr/libexec/Xorg (InitExtensions+0x89) [0x55bec2590329]
    6: /usr/libexec/Xorg (0x55bec2549000+0x3aa3e) [0x55bec2583a3e]
    7: /usr/lib/libc.so.6 (__libc_start_main+0xea) [0x7f9764e61e0a]
    8: /usr/libexec/Xorg (_start+0x2a) [0x55bec2584e0a]

    Segmentation fault at address 0x100000011

    Caught signal 11 (Segmentation fault). Server aborting


I think what's happening here is that the full xorg.conf file
generated using `-configure' tried to load the "vnc" module which
is what's segfaulting.

The correct one (when it works on Linux) is attached now.


The internally autogenerated one (in the absence of a xorg.conf
file), does not load the "vnc" module. In both instance, the "intel"
driver is loaded with "SNA" as the AccelMethod. Also on Linux, since
the DRI module failed to load the software GL rasterizer is used
as a fallback:

```
[   428.237] (EE) AIGLX error: dlopen of /usr/lib64/dri/i965_dri.so failed (/usr/lib64/dri/i965_dri.so: cannot open shared object
file: No such file or directory)
[   428.237] (EE) AIGLX error: unable to load driver i965
[   428.295] (II) IGLX: Loaded and initialized swrast
[   428.295] (II) GLX: Initialized DRISWRAST GL provider for screen 0
```

On NetBSD, prsumably the `i965_dri.so' DRI module loads (but, I
haven't seen the Xorg.0.log from NetBSD yet.) You can make NetBSD
behave like Linux here by disabling DRI as I suggested before:

```
Option "DRI" "off"
```

With above settings, after connecting hdmi monitor and running xrandr
rotate the system instantly rebooted!


Well, OK, after a bit of experimentation I've _finally_ got both
"modesetting" and "intel" working on my card which is a:

```
i915drmkms0 at pci0 dev 2 function 0: Intel Ivy Bridge Integrated Graphics Device (rev. 0x09)
```

As I reported before, both previously either hung the X server
process, or produced horribly slow screen updates coupled with
streaky screen effects. I can make all my problems vanish (a Christmas
Miracle?) by _not doing_ either of these things:

1. Adding `gop 0' to /boot.cfg. ie. use the default BIOS video mode
   (1024x768) That was something I've always had in the config. Now removed
   since you don't need it with the DRMKMS driver.

2. Adding a non-default FONT to the kernel config.
   For example, I'd had this for a long time:
```
#options        FONT_BOLD8x16
#options        FONT_BOLD16x32
options         FONT_SPLEEN12x24
```
   This too, bizarrely, caused my issue. (I noticed this last year[1].)

[1]: https://mail-index.netbsd.org/current-users/2022/01/04/msg041887.html

So, a) remove `gop 0' from /boot.cfg, and b) leave the standard
fonts alone!

BTW, the working xorg.conf fragments are the standard ones, ie:

```
Section "Device"
    Identifier  "Card0"
    Driver      "modesetting"	# or, "intel"
EndSection
```

Of course, YMMV. See you folks next year!

-RVP


Home | Main Index | Thread Index | Old Index