Changeset f38727d for x


Ignore:
Timestamp:
12/30/2012 09:07:18 PM (11 years ago)
Author:
Krejzi <krejzi@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
52cc64d
Parents:
503a60a0
Message:

Rework Xorg configuration a bit.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@10909 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • x/installing/xorg-config.xml

    r503a60a0 rf38727d  
    3737    </sect2>
    3838
    39     <sect2 role="configuration" id='checking-dri' xreflabel="Checking the DRI installation">
     39    <sect2 role="configuration" id="checking-dri" xreflabel="Checking the DRI installation">
    4040    <title>Checking the Direct Rendering Infrastructure (DRI) Installation</title>
    4141
    42     <para>DRI is a framework for allowing software to access graphics hardware
    43     in a safe and efficient manner. It is installed in <application>X</application>
    44     by default (using <application>MesaLib</application>) if you have a supported
    45     video card.</para>
    46 
    47     <para>To check if DRI is installed properly, check the log file
    48     <filename>/var/log/Xorg.0.log</filename> for statements like:</para>
    49 
    50 <screen><literal>(II) R128(0): Direct rendering enabled</literal></screen>
    51 
    52     <note><para>DRI configuration may differ if you are using alternate
    53     drivers, such as those from
    54     <ulink url="http://www.nvidia.com/page/home.html">NVIDIA</ulink> or
    55     <ulink url="http://www.ati.com/">ATI</ulink>.</para>
     42    <para>
     43      DRI is a framework for allowing software to access graphics hardware in a safe and
     44      efficient manner. It is installed in <application>X</application> by default
     45      (using <application>MesaLib</application>) if you have a supported video card.
     46    </para>
     47
     48    <para>
     49      To check if DRI drivers are installed properly, check the log file
     50      <filename>/var/log/Xorg.0.log</filename> for statements like:
     51    </para>
     52
     53<screen><literal>(II) intel(0): direct rendering: DRI2 Enabled</literal></screen>
     54
     55    <note>
     56      <para>
     57        DRI configuration may differ if you are using alternate drivers, such
     58        as those from
     59        <ulink url="http://www.nvidia.com/page/home.html">NVIDIA</ulink> or
     60        <ulink url="http://www.ati.com/">ATI</ulink>.
     61      </para>
    5662    </note>
    5763
    58     <para>Although all users can use software acceleration, any hardware
    59     acceleration (DRI2) is only available to
    60     <systemitem class="username">root</systemitem> and members of the
    61     <systemitem class="groupname">video</systemitem> group.</para>
    62 
    63     <para>To see if hardware acceleration is available for your driver, look in
    64     <filename>/var/log/Xorg.0.log</filename> for statements like:</para>
    65 
    66 <screen><literal> (II) intel(0): direct rendering: DRI2 Enabled</literal></screen>
    67 
    68     <para>If your driver is supported, add any users that might use X to that group:</para>
     64    <para>
     65      Although all users can use software acceleration, any hardware acceleration (DRI2)
     66      is only available to <systemitem class="username">root</systemitem> and members
     67      of the <systemitem class="groupname">video</systemitem> group.
     68    </para>
     69
     70    <para>
     71      To see if hardware acceleration is available for your driver, look in
     72      <filename>/var/log/Xorg.0.log</filename> for statements like:
     73    </para>
     74
     75<screen><literal>(II) intel(0): direct rendering: DRI2 Enabled</literal></screen>
     76
     77    <para>
     78      If your driver is supported, add any users that might use X to that group:
     79    </para>
    6980
    7081<screen role="root"><userinput>usermod -a -G video <replaceable>&lt;username&gt;</replaceable></userinput></screen>
    7182
    72     <para>If you elected to install the Mesa-Demos package when installing
    73     <xref linkend="mesalib"/>, from an <command>xterm</command>, run
    74     <command>glxinfo</command> and first look for the phrase:</para>
    75 
    76 <screen><computeroutput>direct rendering: Yes</computeroutput></screen>
    77 
    78     <para>If direct rendering is enabled, you can add verbosity by
    79     running <command>LIBGL_DEBUG=verbose glxinfo</command>.  This will
    80     show the drivers, device nodes and files used by the DRI system.</para>
    81 
    82     <para>If DRI is enabled, to confirm that DRI2 hardware acceleration is
    83     working you can (still in the <command>xterm</command>) run the command
    84     <command>glxinfo | grep "OpenGL renderer string"</command> - if that
    85     reports something <emphasis>other than</emphasis>
    86     <literal>Software Rasterizer</literal> then you have working acceleration
    87     for the user who ran the command.</para>
    88 
    89     <para>Again, if you have added the Mesa-Demos package, you can also
    90     run the test program <command>glxgears</command>.
    91     This program brings up a window with three gears turning.  The
    92     <command>xterm</command> will display how many frames were drawn every
    93     five seconds, so this is a reasonable benchmark.  The window is scalable,
    94     and the frames drawn per second is highly dependent on the size of
    95     the window.</para>
     83    <para>
     84      If you have installed two OpenGL demo programs when you installed
     85      <xref linkend="mesalib"/>, from an X terminal, run <command>glxinfo</command>
     86      and look for the phrase:
     87    </para>
     88
     89<screen><computeroutput>name of display: :0
     90display: :0  screen: 0
     91direct rendering: Yes</computeroutput></screen>
     92
     93    <para>
     94      If direct rendering is enabled, you can add verbosity by running
     95      <command>LIBGL_DEBUG=verbose glxinfo</command>. This will show the drivers,
     96      device nodes and files used by the DRI system.
     97    </para>
     98
     99    <para>
     100      If DRI2 is enabled, to confirm that DRI2 hardware acceleration is working you can
     101      (still in the X terminal) run the command
     102      <command>glxinfo | egrep "(OpenGL vendor|OpenGL renderer|OpenGL version)"</command>
     103      - if that reports something <emphasis>other than</emphasis>
     104      <literal>Software Rasterizer</literal> then you have working acceleration for the
     105      user who ran the command.
     106    </para>
     107
     108    <para>
     109      If your hardware does not have any DRI2 driver available, it will use Software Rasterizer
     110      for Direct Rendering. In such cases, it is recommended that you use new, LLVM-accelerated,
     111      Software Rasterizer called LLVMPipe. In order to build LLVMPipe just make sure that
     112      <xref linkend="llvm"/> is present at MesaLib build time. Please note that all decoding is
     113      done on CPU instead of GPU, so expect that things run slower. To check if you are using
     114      LLVMpipe, run
     115      <command>glxinfo | egrep "(OpenGL vendor|OpenGL renderer|OpenGL version)"</command>.
     116      An example output is shown below:
     117    </para>
     118
     119<screen><computeroutput>OpenGL vendor string: VMware, Inc.
     120OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.2, 256 bits)
     121OpenGL version string: 2.1 Mesa 9.1-devel (git-cb3b172)</computeroutput></screen>
     122
     123    <para>
     124      You can always force LLVMPipe by exporting <envar>LIBGL_ALWAYS_SOFTWARE=1</envar>
     125      environment variable.
     126    </para>
     127
     128    <para>
     129      Again, if you have built Mesa OpenGL demos, you can also run the test program
     130      <command>glxgears</command>. This program brings up a window with three gears
     131      turning. The X terminal will display how many frames were drawn every five
     132      seconds, so this is a reasonable benchmark. The window is scalable, and the
     133      frames drawn per second is highly dependent on the size of the window. On some
     134      hardware, <command>glxgears</command> will run synchronized to vertical refresh
     135      and framerate will be approximately the same as the monitor refresh rate.
     136    </para>
    96137
    97138    </sect2>
    98139
     140    <sect2 role="configuration" id="hybrid-graphics" xreflabel="Hybrid Graphics">
     141    <title>Hybrid Graphics</title>
     142
     143    <para>
     144      Hybrid Graphics is still in experimental state for Linux. Xorg Developers have
     145      developed a technology called PRIME that can be used for switching between
     146      integrated and muxless discrete GPU at will. Automatic switching is not
     147      possible at the moment.
     148    </para>
     149
     150    <para>
     151      In order to use PRIME for GPU switching, make sure that you are using Linux
     152      Kernel 3.4 or later (recommended). You will need latest DRI and DDX drivers
     153      for your hardware and <application>Xorg Server</application> 1.13 with an
     154      optional patch applied.
     155    </para>
     156
     157    <para>
     158      <application>Xorg Server</application> should load both GPU drivers automaticaly.
     159      In order to run a GLX application on a discrete GPU, you will need to export
     160      <envar>DRI_PRIME=1</envar> environment variable. For example,
     161     
     162<screen><userinput>DRI_PRIME=1 glxinfo | egrep "(OpenGL vendor|OpenGL renderer|OpenGL version)"</userinput></screen>
     163
     164      will show OpenGL vendor, renderer and version for the discrete GPU.
     165    </para>
     166
     167    <para>
     168      If the last command reports same OpenGL renderer with and without <envar>DRI_PRIME=1</envar>,
     169      you will need to check your installation.
     170    </para>
     171
     172    </sect2>
     173
     174<!--
    99175    <sect2 role="configuration" id='X11R6-compat-symlink'
    100176         xreflabel="Creating an X11R6 Compatibility Symlink">
     
    130206
    131207    </sect2>
     208-->
    132209
    133210    <sect2 role="configuration" id="xft-font-protocol"  xreflabel="Xft Font Protocol">
Note: See TracChangeset for help on using the changeset viewer.