<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A5] Linux refresh rates in ALLEGRO_DISPLAY_MODE incorrect?</title>
		<link>http://www.allegro.cc/forums/view/608154</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 24 Aug 2011 12:50:33 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I used this little program</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="p">#include &lt;stdio.h&gt;</span>
<span class="number">  2</span><span class="p">#include &lt;allegro5/allegro.h&gt;</span>
<span class="number">  3</span>
<span class="number">  4</span><a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY_MODE"><span class="a">ALLEGRO_DISPLAY_MODE</span></a> mode<span class="k2">;</span>
<span class="number">  5</span>
<span class="number">  6</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  7</span><span class="k2">{</span>
<span class="number">  8</span>  <span class="k1">int</span> i<span class="k2">;</span>
<span class="number">  9</span>  <span class="k1">int</span> num_modes<span class="k2">;</span>
<span class="number"> 10</span>  
<span class="number"> 11</span>  <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/al_init"><span class="a">al_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span>
<span class="number"> 12</span>  <span class="k2">{</span>
<span class="number"> 13</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>stderr, <span class="s">"failed to initialize allegro!\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 14</span>    <span class="k1">return</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span>
<span class="number"> 15</span>  <span class="k2">}</span>
<span class="number"> 16</span>
<span class="number"> 17</span>  num_modes <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_num_display_modes"><span class="a">al_get_num_display_modes</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 18</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"%d screenmodes\n"</span>,num_modes<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 19</span>
<span class="number"> 20</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"\nall mode refresh rates\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 21</span>  <span class="k1">for</span><span class="k2">(</span>i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span>num_modes<span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 22</span>  <span class="k2">{</span>
<span class="number"> 23</span>    <a href="http://www.allegro.cc/manual/al_get_display_mode"><span class="a">al_get_display_mode</span></a><span class="k2">(</span>i,<span class="k3">&amp;</span>mode<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 24</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"mode %d has a refresh rate of %d\n"</span>,i,mode.refresh_rate<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 25</span>  <span class="k2">}</span>
<span class="number"> 26</span>
<span class="number"> 27</span>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 28</span><span class="k2">}</span>
</div></div><p>

to produce this output:</p><pre>
29 screenmodes

all mode refresh rates
mode 0 has a refresh rate of 50
mode 1 has a refresh rate of 51
mode 2 has a refresh rate of 52
mode 3 has a refresh rate of 53
mode 4 has a refresh rate of 54
mode 5 has a refresh rate of 55
mode 6 has a refresh rate of 56
mode 7 has a refresh rate of 57
mode 8 has a refresh rate of 58
mode 9 has a refresh rate of 59
mode 10 has a refresh rate of 60
mode 11 has a refresh rate of 61
mode 12 has a refresh rate of 62
mode 13 has a refresh rate of 63
mode 14 has a refresh rate of 64
mode 15 has a refresh rate of 65
mode 16 has a refresh rate of 66
mode 17 has a refresh rate of 67
mode 18 has a refresh rate of 68
mode 19 has a refresh rate of 69
mode 20 has a refresh rate of 70
mode 21 has a refresh rate of 71
mode 22 has a refresh rate of 72
mode 23 has a refresh rate of 73
mode 24 has a refresh rate of 74
mode 25 has a refresh rate of 75
mode 26 has a refresh rate of 76
mode 27 has a refresh rate of 77
mode 28 has a refresh rate of 78
</pre><p>

I tried looking at source, and saw where the refresh rates were calculated by getting dotclocks/pixels, but that AL_INLINE stuff still whooshes right over both my brain cells.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 22 Aug 2011 11:37:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I didn&#39;t know this either:<br /><a href="https://wiki.archlinux.org/index.php/NVIDIA#Refresh_rate_not_detected_properly_by_XRandR_dependant_utilities">https://wiki.archlinux.org/index.php/NVIDIA#Refresh_rate_not_detected_properly_by_XRandR_dependant_utilities</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Mon, 22 Aug 2011 12:42:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You could replace the binary nvidia drivers with nouveau I guess.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 22 Aug 2011 14:25:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/928881#target">Elias</a> said:</div><div class="quote"><p> You could replace the binary nvidia drivers with nouveau I guess.</p></div></div><p>I&#39;d posted a couple of months ago where the nouveau drivers didn&#39;t do the ex_gldepth correctly.</p><p><span class="remote-thumbnail"><span class="json">{"name":"956181f2a4816479000cccded84c63b3.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/5\/956181f2a4816479000cccded84c63b3.png","w":651,"h":505,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/5\/956181f2a4816479000cccded84c63b3"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/9/5/956181f2a4816479000cccded84c63b3-240.jpg" alt="956181f2a4816479000cccded84c63b3.png" width="240" height="186" /></span></p><p>I have some stuff that&#39;ll get the correct refresh rate but I&#39;d have to get a lot of extraneous junk out first.</p><p>[EDIT]</p><p>This little program</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="p">#include &lt;string.h&gt;</span>
<span class="number">  2</span><span class="p">#include &lt;X11/Xlib.h&gt;</span>
<span class="number">  3</span><span class="p">#include &lt;X11/Xutil.h&gt;</span>
<span class="number">  4</span><span class="p">#include &lt;Xm/MwmUtil.h&gt;</span>
<span class="number">  5</span><span class="p">#include &lt;X11/extensions/xf86vmode.h&gt;</span>
<span class="number">  6</span>
<span class="number">  7</span>
<span class="number">  8</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  9</span><span class="k2">{</span>
<span class="number"> 10</span>  Display <span class="k3">*</span>dpy<span class="k2">;</span>
<span class="number"> 11</span>  XF86VidModeModeInfo <span class="k3">*</span><span class="k3">*</span>modes<span class="k2">;</span>
<span class="number"> 12</span>  <span class="k1">float</span> pixels_per_frame<span class="k2">;</span>
<span class="number"> 13</span>  <span class="k1">float</span> pixels_per_second<span class="k2">;</span>
<span class="number"> 14</span>  <span class="k1">float</span> ffps<span class="k2">;</span>
<span class="number"> 15</span>  <span class="k1">int</span> ifps<span class="k2">;</span>
<span class="number"> 16</span>  <span class="k1">int</span> <a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a><span class="k2">;</span>
<span class="number"> 17</span>  <span class="k1">int</span> num_fullscreen_modes<span class="k2">;</span>
<span class="number"> 18</span>  <span class="k1">int</span> i<span class="k2">;</span>
<span class="number"> 19</span>  
<span class="number"> 20</span>  dpy <span class="k3">=</span> XOpenDisplay<span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 21</span>  <a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a> <span class="k3">=</span> DefaultScreen<span class="k2">(</span>dpy<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 22</span>  XF86VidModeGetAllModeLines<span class="k2">(</span>dpy, <a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a>, <span class="k3">&amp;</span>num_fullscreen_modes, <span class="k3">&amp;</span>modes<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 23</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"%d modes\n"</span>,num_fullscreen_modes<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 24</span>  
<span class="number"> 25</span>  <span class="k1">for</span> <span class="k2">(</span>i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> num_fullscreen_modes<span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 26</span>  <span class="k2">{</span>
<span class="number"> 27</span>    pixels_per_second <span class="k3">=</span> modes<span class="k2">[</span>i<span class="k2">]</span><span class="k3">-</span><span class="k3">&gt;</span>dotclock <span class="k3">*</span> <span class="n">1000</span>.<span class="n">0</span><span class="k2">;</span>
<span class="number"> 28</span>    pixels_per_frame <span class="k3">=</span> modes<span class="k2">[</span>i<span class="k2">]</span><span class="k3">-</span><span class="k3">&gt;</span>htotal <span class="k3">*</span> modes<span class="k2">[</span>i<span class="k2">]</span><span class="k3">-</span><span class="k3">&gt;</span>vtotal<span class="k2">;</span>
<span class="number"> 29</span>    ffps <span class="k3">=</span> pixels_per_second <span class="k3">/</span> pixels_per_frame <span class="k3">+</span> <span class="n">0</span>.<span class="n">5</span><span class="k2">;</span>
<span class="number"> 30</span>    ifps <span class="k3">=</span> ffps<span class="k2">;</span>
<span class="number"> 31</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"Mode %d has width %d, height %d, refresh rate %d\n"</span>,i,modes<span class="k2">[</span>i<span class="k2">]</span><span class="k3">-</span><span class="k3">&gt;</span>hdisplay,modes<span class="k2">[</span>i<span class="k2">]</span><span class="k3">-</span><span class="k3">&gt;</span>vdisplay,ifps<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 32</span>  <span class="k2">}</span>
<span class="number"> 33</span>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 34</span><span class="k2">}</span>
</div></div><p>

gave this output</p><pre>
29 modes
Mode 0 has width 1024, height 768, refresh rate 85
Mode 1 has width 1024, height 768, refresh rate 43
Mode 2 has width 1024, height 768, refresh rate 75
Mode 3 has width 1024, height 768, refresh rate 70
Mode 4 has width 1024, height 768, refresh rate 60
Mode 5 has width 832, height 624, refresh rate 75
Mode 6 has width 800, height 600, refresh rate 85
Mode 7 has width 800, height 600, refresh rate 85
Mode 8 has width 800, height 600, refresh rate 75
Mode 9 has width 800, height 600, refresh rate 72
Mode 10 has width 800, height 600, refresh rate 60
Mode 11 has width 800, height 600, refresh rate 56
Mode 12 has width 720, height 400, refresh rate 85
Mode 13 has width 700, height 525, refresh rate 120
Mode 14 has width 640, height 480, refresh rate 85
Mode 15 has width 640, height 480, refresh rate 75
Mode 16 has width 640, height 480, refresh rate 73
Mode 17 has width 640, height 480, refresh rate 73
Mode 18 has width 640, height 480, refresh rate 60
Mode 19 has width 640, height 480, refresh rate 60
Mode 20 has width 640, height 400, refresh rate 85
Mode 21 has width 640, height 350, refresh rate 85
Mode 22 has width 512, height 384, refresh rate 140
Mode 23 has width 512, height 384, refresh rate 87
Mode 24 has width 512, height 384, refresh rate 120
Mode 25 has width 400, height 300, refresh rate 144
Mode 26 has width 320, height 240, refresh rate 146
Mode 27 has width 320, height 240, refresh rate 120
Mode 28 has width 320, height 175, refresh rate 171
</pre><p>

Libraries were -lGL -lGLU -lXxf86vm
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 22 Aug 2011 15:17:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you disable dynamic TwinView (whatever that is) the driver will stop reporting fake refresh rates:</p><div class="source-code snippet"><div class="inner"><pre>Option <span class="s">"DynamicTwinView"</span> <span class="s">"False"</span>
</pre></div></div><p>

I&#39;ll make the xrandr backend for Allegro zero out all the refresh rates if the fake ones are detected.</p><p>We already have the option of using xf86vm, but randr is preferred. You can disable it at build time with cmake -DWANT_X11_XRANDR=off.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Mon, 22 Aug 2011 16:31:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/928883#target">Peter Wang</a> said:</div><div class="quote"><p> You can disable it at build time with cmake -DWANT_X11_XRANDR=off.</p></div></div><p>Now I get this output (from the A5 proglet)</p><pre>
1 screenmodes

all mode refresh rates
mode 0 has a refresh rate of 0
</pre><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 22 Aug 2011 17:52:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sounds like cmake didn&#39;t find the xf86vidmode dev libraries.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 22 Aug 2011 18:30:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This was in CMakeCache.txt:</p><p>//Have library Xxf86vm<br />CAN_XF86VIDMODE:INTERNAL=1
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 22 Aug 2011 22:30:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hm, don&#39;t suppose you can build a debug version and post the allegro.log could you?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 22 Aug 2011 22:40:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/928921#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p> build a debug version</p></div></div><p>Well I can&#39;t seem to do that either, I tried<br />-DGRADE_DEBUG=on<br />-DDEBUGMODE=on<br />-DDEBUG=on</p><p>as well as using 1 for a suffix instead of &#39;on&#39; and all I get are warnings like this:</p><p>CMake Warning: The variable, &#39;GRADE_DEBUG&#39;, specified manually, was not used during the generation.</p><p>Oh, yeah, I tried an evironment var too.</p><p>set | grep CMAKE<br />CMAKE_C_FLAGS_DEBUG=CMAKE_C_FLAGS_DEBUG</p><p>[EDIT]</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/928883#target">Peter Wang</a> said:</div><div class="quote"><p> Option &quot;DynamicTwinView&quot; &quot;False&quot;</p></div></div><p>If that refers to something in xorg.conf, it&#39;s not in mine.<br />Or I&#39;m supposed to enter it?  I&#39;ll try it.<br />I only have one CRT hooked up.</p><p>[EDIT2]</p><p>I put that line in the &quot;Devices&quot; section of xorg.conf, did a &quot;make clean&quot; in<br />build, followed by make, make install, and that first program still says 1 screen mode with a refresh rate of 0.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 22 Aug 2011 23:03:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/928924#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>Well I can&#39;t seem to do that either, I tried</p></div></div><p>Easiest way is to use &#39;ccmake&#39; rather than &#39;cmake&#39;. Otherwise do &#39;-DCMAKE_BUILD_TYPE=Debug&#39;</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>I put that line in the &quot;Devices&quot; section of xorg.conf, did a &quot;make clean&quot; in<br />build, followed by make, make install, and that first program still says 1 screen mode with a refresh rate of 0.</p></div></div><p>Changes in xorg.conf need an X restart.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 22 Aug 2011 23:34:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK, I got the debug version, and recompiled the test proggie, but I can&#39;t find(1) allegro.log anywhere.  It still says one screen mode with refresh 0.</p><p>Also, I did restart X, twice, the second time to check for errors on tty1.</p><p>[EDIT]</p><p>I tried trace into the program with gdb, and several interesting bits merely said &quot;Value optimized out&quot;.</p><p>Never mind.  I&#39;ll go back to X11 and OpenGL.  Sorry.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 22 Aug 2011 23:43:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/928930#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>OK, I got the debug version, and recompiled the test proggie, but I can&#39;t find(1) allegro.log anywhere. It still says one screen mode with refresh 0.</p><p>I tried trace into the program with gdb, and several interesting bits merely said &quot;Value optimized out&quot;.</p></div></div><p>Then you didn&#39;t get the debug version. You&#39;d get an allegro.log in &#39;cwd&#39;, and it wouldn&#39;t be optimizing anything out.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 23 Aug 2011 04:23:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/928965#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p> you didn&#39;t get the debug version.</p></div></div><p>I forgot to specify the debug library <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" /></p><pre>
system   I            xsystem.c:220  xglx_initialize                  [   0.00006] XGLX driver connected to X11 (The X.Org Foundation 10905000).
system   I            xsystem.c:222  xglx_initialize                  [   0.00011] X11 protocol version 11.0.
system   I            xsystem.c:232  xglx_initialize                  [   0.00023] events thread spawned.
system   I             system.c:270  al_install_system                [   0.00024] Allegro version: 5.0.4
display  I        xfullscreen.c:184  xinerama_init                    [   0.00043] Xinerama version: 1.1
display  I        xfullscreen.c:196  xinerama_init                    [   0.00051] Xinerama is active
display  D        xfullscreen.c:941  _al_xglx_get_default_adapter     [   0.00052] get default adapter
display  D        xfullscreen.c:941  _al_xglx_get_default_adapter     [   0.00054] get default adapter
system   I            xsystem.c:243  xglx_shutdown_system             [   0.00055] shutting down.
display  D        xfullscreen.c:213  xinerama_exit                    [   0.10086] xfullscreen: xinerama exit.
system   D            xsystem.c:270  xglx_shutdown_system             [   0.10105] xsys: close x11display.
</pre><p>

Anyway, it&#39;s all too clever by at least a factor of two.</p><p>Off topic:  I think we just had a mini-earthquake!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Tue, 23 Aug 2011 22:21:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/929023#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>Anyway, it&#39;s all too clever by at least a factor of two.</p></div></div><p>It didn&#39;t even initialize the XVidMode code, are you running that same code as above? You&#39;re sure allegro has XVidMode enabled? What happens if you create an ALLEGRO_DISPLAY first? (this shouldn&#39;t be necessary).</p><p>If by too clever you mean how it lazily init&#39;s the vidmode/xrandr/xinerama stuff, thats because xrandr and xvidmode can take some time to query, and when it was called on startup, it would pause for half a second for all allegro apps, even ones that never use a full screen mode, or want/need monitor modes or resolutions.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 23 Aug 2011 23:26:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/929025#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p> are you running that same code as above? </p></div></div><p>Yes.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p> You&#39;re sure allegro has XVidMode enabled?</p></div></div><p>I&#39;m googling what that means now.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p> What happens if you create an ALLEGRO_DISPLAY first? </p></div></div><p>Same thing (250Kb log attached in paperclip)</p><p>By &quot;too clever&quot; I mean it&#39;s too complicated for me to understand, I might as well do my own stuff instead of understanding Allegro all the way down, evils of premature optimization and all that.</p><p>[EDIT]</p><p>As far as I can tell, xvidmode is a command line app to change screen modes?  I&#39;ve only done that with shift-alt-keypad_plus or something.  What&#39;s wrong with xrandr stuff?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Tue, 23 Aug 2011 23:39:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/929026#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>I&#39;m googling what that means now.</p></div></div><p>The log you posted in the thread earlier doesn&#39;t show it initializing the XVidMode extension, or fetching any modes, so something there is wrong. Did you make absolute sure Allegro was compiled with XVidMode support?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 23 Aug 2011 23:45:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>As the edit above shows (while you were posting) I have no idea what xvidmode is, apropos doesn&#39;t say anything about it.  Googling more.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Tue, 23 Aug 2011 23:48:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>&quot;XVidMode&quot; is the name of the X11 extension that provides the &quot;XF86VidModeGetAllModeLines&quot; function.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/929026#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p> What&#39;s wrong with xrandr stuff?</p></div></div><p>Nothing if your driver supports it properly (it doesn&#39;t if you use Nvidia&#39;s <span class="cuss"><span><span class="cuss"><span><span class="cuss"><span>shit</span></span></span></span>ty</span></span> TwinView extension). If you can get either XVidMode or XRANDR to work, you should be golden. Just make sure you have the -dev packages for both before running cmake for allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 23 Aug 2011 23:52:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve hooked up two monitors, things are... interesting.  I&#39;m going to fiddle with it a few days, hoping my table doesn&#39;t collapse in the meantime.  Or maybe I should grab an old computer and stack some books on it to support the back edge of the table.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Wed, 24 Aug 2011 05:56:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I should still have my nvidia xorg.conf files laying about if you need some help with that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 24 Aug 2011 06:34:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It seems to work as far as it goes, my own OpenGL program is bombing out somewhere in keyboard events somewhere when using separate X screens, working on that first.</p><p>A5 seems to work except ex_fs_resize, and ex_fs_window always opens window on primary screen.  I seem to recall reading that before.  Oh, yeah, ex_display_options won&#39;t do fullscreen with TwinView or separate X screens, I don&#39;t remember how well these programs worked with one monitor.</p><p>I doubt I&#39;ll continue using twin monitors after I&#39;m done experimenting, it seems too weird.</p><p>[EDIT]</p><p>If I comment this out then the program can accept and use keypresses, but you can&#39;t close the window except with Control C in the parent terminal.</p><div class="source-code snippet"><div class="inner"><pre>        <span class="k1">case</span> ClientMessage:
          <span class="k1">if</span> <span class="k2">(</span><span class="k3">*</span>XGetAtomName<span class="k2">(</span>gwin.dpy, event.xclient.message_type<span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> <span class="k3">*</span><span class="s">"WM_PROTOCOLS"</span><span class="k2">)</span>
          <span class="k2">{</span>
            quit <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
          <span class="k2">}</span>
          <span class="k1">break</span><span class="k2">;</span>
</pre></div></div><p>

[EDIT3]<br />I seemed to fix it with
</p><div class="source-code snippet"><div class="inner"><pre>          <span class="k1">if</span><span class="k2">(</span>event.xclient.message_type <span class="k3">=</span><span class="k3">=</span> <span class="n">292</span><span class="k2">)</span>
            quit <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
          <span class="k1">break</span><span class="k2">;</span>
</pre></div></div><p>
but that seems mighty hackish.</p><p>It shows </p><pre>
X Error of failed request:  BadAtom (invalid Atom parameter)
  Major opcode of failed request:  17 (X_GetAtomName)
  Atom id in failed request:  0x299
  Serial number of failed request:  65
  Current serial number in output stream:  65
</pre><p>

[EDIT2]</p><p>If you minimize something on the secondary monitor, how do you restore it?<br />[SOLVED]  just alt-tab to it
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Wed, 24 Aug 2011 06:42:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/929057#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>my own OpenGL program is bombing out somewhere in keyboard events somewhere when using separate X screens, working on that first.</p></div></div><p>Mesa really hates that. It won&#39;t work with the open source drivers. Trying to open a second gl context on a second X Screen will cause the program to lock up.</p><p>I think it&#39;ll work with TwinView if you have Fake Xinerama enabled. I think. That way allegro can still detect both monitors, but you&#39;re stuck with one mode per screen. There&#39;s a lot of comments in the xfullscreen.c code that talks about the fun I had getting things to work as well as they do (I did fairly extensive testing, as have others, so it works in <i>many</i> cases, just probably not all). </p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>I doubt I&#39;ll continue using twin monitors after I&#39;m done experimenting, it seems too weird.</p></div></div><p>When I&#39;m hunkering down to do some serious programming work, I love a dual display setup. Sometimes I&#39;ll even setup my old LCD with my laptop to work dual display on my laptop <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 24 Aug 2011 12:45:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608154/929077#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p> Trying to open a second gl context on a second X Screen will cause the program to lock up.</p></div></div><p>I just meant getting one window to work with the driver settings specifying separate X screens instead of one wide Twinview screen.  I haven&#39;t gotten to having more than one window open yet, I&#39;d have to convert lots of stuff to using structs in malloc&#39;ed blocks rather than globals using one GL window.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Wed, 24 Aug 2011 12:50:33 +0000</pubDate>
	</item>
</rss>
