source: x/installing/xorg-config.xml@ e180a646

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since e180a646 was e180a646, checked in by Ken Moffat <ken@…>, 8 years ago

For a' that, an a' that,
It's coming yet for a' that,
That ilka body the world o'er,
Can use Guid Fonts for a' that.

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

  • Property mode set to 100644
File size: 9.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="xorg-config">
9 <?dbhtml filename="xorg-config.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>Xorg-&xorg-version; Testing and Configuration</title>
17
18 <indexterm zone="xorg-config">
19 <primary sortas="g-configuring-xorg">Configuring Xorg</primary>
20 </indexterm>
21
22 <sect2 id='X11-testing' xreflabel="Testing Xorg">
23 <title>Testing Xorg</title>
24
25 <note><para>Before starting Xorg for the first time, is is useful to
26 rebuild the library cache by running <userinput>ldconfig</userinput>
27 as the <systemitem class="username">root</systemitem> user.</para></note>
28
29 <para>To test the <application>Xorg</application> installation, issue
30 <userinput>startx</userinput>. This command brings up a rudimentary window
31 manager called <emphasis>twm</emphasis> with three xterm windows and one
32 xclock window. The xterm window in the upper left is a login terminal and
33 running <emphasis>exit</emphasis> from this terminal will exit the
34 <application>X Window</application> session. The third xterm window may be
35 obscured on your system by the other two xterms.</para>
36
37 <para>Generally, there is no specific configuration required for
38 <application>Xorg</application>, but customization is possible. For details
39 see <xref linkend='xconfig'/> below.</para>
40
41 </sect2>
42
43 <sect2 role="configuration" id="checking-dri" xreflabel="Checking the DRI installation">
44 <title>Checking the Direct Rendering Infrastructure (DRI) Installation</title>
45
46 <para>
47 DRI is a framework for allowing software to access graphics hardware in a safe and
48 efficient manner. It is installed in <application>X</application> by default
49 (using <application>Mesa</application>) if you have a supported video card.
50 </para>
51
52 <para>
53 To check if DRI drivers are installed properly, check the log file
54 <filename>/var/log/Xorg.0.log</filename> for statements such as:
55 </para>
56
57<screen><literal>(II) intel(0): direct rendering: DRI2 Enabled</literal></screen>
58
59 <para>or</para>
60
61<screen><literal>(II) NOUVEAU(0): Loaded DRI module</literal></screen>
62
63 <note>
64 <para>
65 DRI configuration may differ if you are using alternate drivers, such
66 as those from
67 <ulink url="http://www.nvidia.com/page/home.html">NVIDIA</ulink> or
68 <ulink url="http://www.ati.com/">ATI</ulink>.
69 </para>
70 </note>
71
72 <para>
73 Although all users can use software acceleration, any hardware acceleration (DRI2)
74 is only available to <systemitem class="username">root</systemitem> and members
75 of the <systemitem class="groupname">video</systemitem> group.
76 </para>
77<!--
78 <para>
79 To see if hardware acceleration is available for your driver, look in
80 <filename>/var/log/Xorg.0.log</filename> for statements like:
81 </para>
82
83<screen><literal>(II) intel(0): direct rendering: DRI2 Enabled</literal></screen>
84-->
85 <para>
86 If your driver is supported, add any users that might use X to that group:
87 </para>
88
89<screen role="root"><userinput>usermod -a -G video <replaceable>&lt;username&gt;</replaceable></userinput></screen>
90
91 <para>
92 Another way to determine if DRI is working properly is to use one of the
93 two optionally installed OpenGL demo programs in <xref
94 linkend="mesa"/>. From an X terminal, run <command>glxinfo</command>
95 and look for the phrase:
96 </para>
97
98<screen><computeroutput>name of display: :0
99display: :0 screen: 0
100direct rendering: Yes</computeroutput></screen>
101
102 <para>
103 If direct rendering is enabled, you can add verbosity by running
104 <command>LIBGL_DEBUG=verbose glxinfo</command>. This will show the drivers,
105 device nodes and files used by the DRI system.
106 </para>
107
108 <para>
109 To confirm that DRI2 hardware acceleration is working, you can (still in
110 the X terminal) run the command <command>glxinfo | egrep "(OpenGL
111 vendor|OpenGL renderer|OpenGL version)"</command>.
112 If that reports something <emphasis>other than</emphasis>
113 <literal>Software Rasterizer</literal> then you have working
114 acceleration for the user who ran the command.
115 </para>
116
117 <para>
118 If your hardware does not have any DRI2 driver available, it will use a
119 Software Rasterizer for Direct Rendering. In such cases, you can use a new,
120 LLVM-accelerated, Software Rasterizer called LLVMPipe. In order to build
121 LLVMPipe just make sure that <xref linkend="llvm"/> is present at Mesa
122 build time. Note that all decoding is done on the CPU instead of the GPU,
123 so the display will run slower than with hardware acceleration.
124 To check if you are using LLVMpipe,
125 review the output ot the glxinfo command above. An example of the
126 output using the Software Rasterizer is shown below:
127 </para>
128
129<screen><computeroutput>OpenGL vendor string: VMware, Inc.
130OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.5, 256 bits)
131OpenGL version string: 3.0 Mesa 10.4.5</computeroutput></screen>
132
133 <para>
134 You can also force LLVMPipe by exporting the <envar>LIBGL_ALWAYS_SOFTWARE=1</envar>
135 environment variable when starting Xorg.
136 </para>
137
138 <para>
139 Again, if you have built the Mesa OpenGL demos, you can also run the test
140 program <command>glxgears</command>. This program brings up a window with
141 three gears turning. The X terminal will display how many frames were
142 drawn every five seconds, so this will give a rough benchmark. The window
143 is scalable, and the frames drawn per second is highly dependent on the
144 size of the window. On some hardware, <command>glxgears</command> will
145 run synchronized with the vertical refresh signal and the frame rate will
146 be approximately the same as the monitor refresh rate.
147 </para>
148
149 </sect2>
150
151 <sect2 role="configuration" id="hybrid-graphics" xreflabel="Hybrid Graphics">
152 <title>Hybrid Graphics</title>
153
154 <para>
155 Hybrid Graphics is still in experimental state for Linux. Xorg Developers have
156 developed a technology called PRIME that can be used for switching between
157 integrated and muxless discrete GPU at will. Automatic switching is not
158 possible at the moment.
159 </para>
160
161 <para>
162 In order to use PRIME for GPU switching, make sure that you are using Linux
163 Kernel 3.4 or later (recommended). You will need latest DRI and DDX drivers
164 for your hardware and <application>Xorg Server</application> 1.13 or later
165 with an optional patch applied.
166 </para>
167
168 <para>
169 <application>Xorg Server</application> should load both GPU drivers automaticaly.
170 In order to run a GLX application on a discrete GPU, you will need to export
171 the <envar>DRI_PRIME=1</envar> environment variable. For example,
172
173<screen><userinput>DRI_PRIME=1 glxinfo | egrep "(OpenGL vendor|OpenGL renderer|OpenGL version)"</userinput></screen>
174
175 will show OpenGL vendor, renderer and version for the discrete GPU.
176 </para>
177
178 <para>
179 If the last command reports same OpenGL renderer with and without
180 <envar>DRI_PRIME=1</envar>, you will need to check your installation.
181 </para>
182
183 </sect2>
184
185 <sect2 role="configuration" id='xconfig'>
186 <title>Setting up Xorg Devices</title>
187
188 <para>For most hardware configurations, modern Xorg will automatically
189 get the server configuration correct without any user intervention. There
190 are, however, some cases where auto-configuration will be incorrect.
191 Following are some example manual configuration items that may be of use in
192 these instances.</para>
193
194 <sect3 id="xinput">
195 <title>Setting up X Input Devices</title>
196 <para>For most input devices, no additional configuration will be
197 necessary. This section is provided for informational purposes only.</para>
198
199 <para>A sample default XKB setup could look like the following (executed as
200 the <systemitem class="username">root</systemitem> user):</para>
201
202<screen><userinput role="username">cat &gt; /etc/X11/xorg.conf.d/xkb-defaults.conf &lt;&lt; "EOF"
203Section "InputClass"
204 Identifier "XKB Defaults"
205 MatchIsKeyboard "yes"
206 Option "XkbOptions" "terminate:ctrl_alt_bksp"
207EndSection
208EOF</userinput></screen>
209
210 </sect3>
211
212 <sect3 id="xdisplay">
213 <title>Fine Tuning Display Settings</title>
214
215 <para>Again, with modern Xorg, little or no additional configuration is
216 necessary. If you should need extra options passed to your video driver,
217 for instance, you could use something like the following (again, executed as
218 the <systemitem class="username">root</systemitem> user):</para>
219
220<screen><userinput role="root">cat &gt; /etc/X11/xorg.conf.d/videocard-0.conf &lt;&lt; "EOF"
221Section "Device"
222 Identifier "Videocard0"
223 Driver "radeon"
224 VendorName "Videocard vendor"
225 BoardName "ATI Radeon 7500"
226 Option "NoAccel" "true"
227EndSection
228EOF</userinput></screen>
229
230 <para>Another common setup is having multiple server layouts for use in
231 different environments. Though the server will automatically detect the
232 presence of another monitor, it may get the order incorrect:</para>
233
234<screen><userinput role="root">cat &gt; /etc/X11/xorg.conf.d/server-layout.conf &lt;&lt; "EOF"
235Section "ServerLayout"
236 Identifier "DefaultLayout"
237 Screen 0 "Screen0" 0 0
238 Screen 1 "Screen1" LeftOf "Screen0"
239 Option "Xinerama"
240EndSection
241EOF</userinput></screen>
242
243 </sect3>
244 </sect2>
245</sect1>
Note: See TracBrowser for help on using the repository browser.