• X11 Accel work-around for intel(4) systems

    From nobody@net.bsd@21:1/5 to All on Mon Aug 2 16:21:40 2021
    Thought I'd post this as a kind of memory dump..

    Was attempting to improve X11 performance on a old 32bit HP Slimline
    with Intel on-board itegrated graphics that uses DVMT to shuffle system
    memory to graphics as needed. This saves the manufacture some money
    but possibly is a source of instability as the system will experience
    frequent pauses during moments of higher load.

    Anyway.. NetBSD apparently has a very old Linux port of DRM which results
    in GPU hangs if enabled on this system. If acceleration and DRI are
    disabled the system is stable but very slow.

    The partial solution was to create a xorg.conf file under /etc/X11 and
    add the following tweaks to the main "Device" section:

    Option Accel "True"
    Option AccelMethod "BLT"
    Option DRI "False"

    The "BLT" option (Block Litigated Transfer) seems to be the deciding
    factor between having a system that still occasionally hiccups but
    recovers vs a system that regularly experiences garbled display, loss
    of pointer cursor or full on X11 crash that lands the user back at the
    xdm login screen.

    The intel(4) manpage says the BLT option tells the system to "..disable
    render acceleration and only use the BLT engine". Not sure what the BLT
    engine is as not much comes up in web search results but I'm guessing
    it's still part of the SNA acceleration scheme and selecting "BLT"
    results in a crippled "SNA" (Sandybridge New Acceleration); certainly
    there is no advanced 3D acceleration going on.

    Ultimately the NetBSD folks need to freshen their DRM stuff so DRI can
    be enabled. Chatting with some NetBSD developers suggests this may not
    be a high priority so until then work-arounds as described are the only
    option.

    ref:
    - intel(4) manpage
    - Intel HD Graphics/BLT Engine:
    https://wiki.osdev.org/index.php?title=Intel_HD_Graphics&oldid=24565"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Aelius Gallus@21:1/5 to nobody@net.bsd on Mon Aug 2 20:51:19 2021
    nobody@net.bsd wrote:
    Thought I'd post this as a kind of memory dump..

    Was attempting to improve X11 performance on a old 32bit HP Slimline
    ..
    ..
    ..
    - intel(4) manpage
    - Intel HD Graphics/BLT Engine:
    https://wiki.osdev.org/index.php?title=Intel_HD_Graphics&oldid=24565"

    Wow, I hope you, and others, will continue sharing their thoughts on this newsgroup as it has hardly any traffic. The stuff you wrote is above my head but somebody could find it useful.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Vincenzo Olivo@21:1/5 to All on Mon Aug 30 03:19:17 2021
    Sul meriggio di 020821 16:21,
    nobody@net.bsd <nobody@net.bsd> enarrava tali parole:

    Ultimately the NetBSD folks need to freshen their DRM stuff so DRI can
    be enabled. Chatting with some NetBSD developers suggests this may not
    be a high priority so until then work-arounds as described are the only
    option.


    As far as I can tell the graphics stack update is on on the tasklist for
    -10 RELEASE, listed among "Ongoing projects and unmerged branches"; see: https://wiki.netbsd.org/releng/netbsd-10/

    Nia Alarie recently told on UnitedBSD that Riastradh has been syncing
    NetBSD's graphics drivers with the DRM/KMS stack in Linux 5.6. This will
    bring support for a large amount of newer hardware, as well as support
    for GLAMOR, a new acceleration mode in the X Window System. The newer
    shims for Linux kernel interfaces should also make future GPU driver
    updates much easier, resulting in less of a lag before newer GPUs are
    supported in NetBSD.

    The -9.* stack is indeed much older if compared to that one, being still
    stuck at 4.11, making it tediosuly hard to run NetBSD on anything above Broadwell. Hopefully, it will make it into -10.*

    If you're interested in testing the new code (still pretty much
    experimental), clone the repository from Riastradh's GitHub and build a
    kernel (remember to back up the known-working one):

    git clone https://github.com/riastradh/netbsd-src
    cd netbsd-src
    git checkout reredrm56

    (follow the standard instructions for building a kernel)
    Please report any panics to the GitHub repository.

    With Intel GPUs, the modesetting Xorg display driver must be used
    currently, so you'll need to explicitly set it inside inside
    /etc/X11/xorg.conf or a partial /etc/X11/xorg.conf.d/99-intel.conf configuration file:

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


    Personally, I'm looking forward to testing this on a Nvidia GTX 1060,
    which my workstation is equipped with; this had been substantially holding
    me back from installing NetBSD on it, as the nouveau(4) implementation
    from Linux 4.11, dated early 2017, would support up to GTX 9xx only.

    If you happen to give this a try, any feedback is welcome. As a desktop
    user, I'm as much interested as you.

    Regards
    --
    Paolo Vincenzo Olivo ~ sehnsucht.multics.org
    SDF Public Access UNIX System - https://sdf.org
    PGP fingerprint = 39F1 9E55 77AF 6BF3 005 B181 8F2A 9A4D 9001 2186

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sehnsucht@21:1/5 to All on Mon Feb 14 21:14:24 2022
    Replying to this thread to notify that the drm update was merged
    to HEAD's main branch in December. The current stack is in par with
    Linux 5.6. You can test it by fetching a -current kernel nightly build
    from nycdn.netbsd.org.

    --
    “Hell is empty and all the devils are here.„

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)