Just moozing

Before you can check your notes, you must make them…

Extra graphics card

leave a comment »

I inserted a spare graphics card in epia. It is old, but I wanted an extra monitor attached. This is the log of how it it failed to work.

Do the system recognize the card?

Epia:~$ lspci
 00:00.0 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge
 ...
 00:14.0 VGA compatible controller: Cirrus Logic GD 5434-8 [Alpine] (rev 8e)
 01:00.0 VGA compatible controller: VIA Technologies, Inc. CN700/P4M800 Pro/P4M800 CE/VN800 [S3 UniChrome Pro] (rev 01)
 Epia:~$

ok graphics has been inserted. It is an old cirrus logic gd

 Epia:~$ xrandr -q -d :0
 xrandr: Failed to get size of gamma for output default
 Screen 0: minimum 640 x 400, current 1280 x 1024, maximum 1280 x 1024
 default connected 1280x1024+0+0 0mm x 0mm
 1280x1024      60.0*    75.0
 1280x960       60.0
 1152x864       75.0     70.0     60.0
 1024x768       75.0     70.0     60.0
 832x624        75.0
 800x600        75.0     72.0     60.0     56.0
 640x480        75.0     73.0     67.0     60.0
 720x400        70.0
 Epia:~$

Does this mean that X doesn’t recognize the card?

Epia:~$ less /var/log/Xorg.0.log | grep -i cirrus
 (--) PCI: (0:0:20:0) 1013:00a8:0000:0000 Cirrus Logic GD 5434-8 [Alpine] rev 142, Mem @ 0xfa000000/16777216, BIOS @ 0x????????/16777216

Hmm, x.org finds something.
Two options:
1) We need to do something special for X to use two graphics cards.
2) The cirrus card needs something special in order to work.

Attempt 1: Two graphics cards

Let’s start with the first option since we expect it to be easiest 🙂 The cirrus card is an old card and I expect documentation to a bit dated.
We stop the x server (the hard way).

 killall gdm

And to generate the xorg.conf file, we issue

 X -configure

Oh, dear. Black screen. But an ssh connection works, so issuing

reboot

makes it work again nicely

After killing the server again, we issue (again)

Epia:~# Xorg -configure
X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.32-5-686 i686 Debian
Current Operating System: Linux Epia 2.6.32-5-686 #1 SMP Thu Oct 14 17:15:16 UTC 2010 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686 root=UUID=db2e97b9-f466-4526-9c09-812d92ea625c ro quiet
Build Date: 20 September 2010  03:40:46PM
xorg-server 2:1.7.7-7 (Julien Cristau <jcristau@debian.org>)
Current version of pixman: 0.16.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Oct 20 20:39:24 2010
List of video drivers:
[...]
cirrus
[....]
openchrome
[....]
vmware: Please ignore above "FATAL: Module vmwgfx not found."
Xorg: symbol lookup error: /usr/lib/xorg/modules/drivers/glide_drv.so: undefined symbol: LoaderRefSymLists
Epia:~#

(the pc is unresponsive again, but using the ssh I chose to ignore it)
I think the last line is bad news. It looks like some kind of badly installed package.

Epia:~# dpkg -S /usr/lib/xorg/modules/drivers/glide_drv.so
xserver-xorg-video-glide: /usr/lib/xorg/modules/drivers/glide_drv.so

ok, it is about glide compatible graphics cards. I don’t have that, so lets uninstall the offending file.

apt-get remove xserver-xorg-video-glide

and redo the configure part

Epia:~# Xorg -configure
X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.32-5-686 i686 Debian
Current Operating System: Linux Epia 2.6.32-5-686 #1 SMP Thu Oct 14 17:15:16 UTC 2010 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686 root=UUID=db2e97b9-f466-4526-9c09-812d92ea625c ro quiet
Build Date: 20 September 2010  03:40:46PM
xorg-server 2:1.7.7-7 (Julien Cristau <jcristau@debian.org>)
Current version of pixman: 0.16.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Oct 20 20:44:18 2010
List of video drivers:
mach64
[...]
vesa
vmware: Please ignore above "FATAL: Module vmwgfx not found."
(++) Using config file: "/root/xorg.conf.new"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Xorg detected your mouse at device /dev/input/mice.
Please check your config if the mouse is still not
operational, as by default Xorg tries to autodetect
the protocol.

Xorg has configured a multihead system, please check your config.

Your xorg.conf file is /root/xorg.conf.new

To test the server, run 'X -config /root/xorg.conf.new'

So it succeeded in making a multiheaded config file! and we have a long configuration file located in xorg.conf.new.

I don’t currently have a /etc/X11/xorg.conf, so I just copy the new one to that location.

Since we have a crashed X server, I reboot again.
It didn’t work the first time around

Epia:~$ less /var/log/Xorg.0.log | grep EE
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(II) Loading extension MIT-SCREEN-SAVER
(EE) CIRRUS(0): No valid MMIO address in PCI config space
(EE) CIRRUS(0): I2C initialization failed

and

Epia:~$ tail /var/log/Xorg.0.log
Fatal server error:
Inconsistent depth 24 pixmap format.  Exiting

Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

It was kind of optimistic not to check the xorg.conf before trying, but autoconfiguration has come a long way (but not long enough…)
The Xorg.0.log tells me that the second graphics card is detected and the module cirrus-alpine is loaded.

Googling a bit and guessing a bit let me to the following command

Epia:~# less /var/log/Xorg.0.log | grep -i depth
(--) CIRRUS(0): Depth 24, (==) framebuffer bpp 24
(==) CHROME(1): Depth 24, (--) framebuffer bpp 32
Inconsistent depth 24 pixmap format.  Exiting

It is all about the 32 bit color depth is actually 24 bit plus something extra. Basically, the cirrus card is too old. So, what to do about it?

To test if I’m right, I force the colordepth to 16 for both cards.

Adding

DefaultDepth 16

to both screens section makes X.org start. The secondary monitor is complaining saying “OUT OF RANGE”, so we still need some tweaking 🙂

This error

(EE) CIRRUS(0): I2C initialization failed

probably means that I have old hardware. My guess is that the I2C that is used to autodetect resolution, frequencies and such is not support by the graphics card. I ought to junk the card.

If I am to use the PC normally with the extra card in the machine, I must separate the cards. I will try to have one monitor on :0 and the other on :1

Splitting the monitors

Now we stop doing xinerama style “two monitors one desktop”.

I found this guide http://linuxgazette.net/124/smith.html and will try to follow it. I won’t do the multimous+keyboard thingy.

The autogenerate xorg.conf had a “serverlayout like this

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

I change it to

Section "ServerLayout"
    Identifier     "MainMonitor"
    Screen      0  "MainScreen" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
    Identifier     "SecMonitor"
    Screen      0  "SecScreen" 0 0
#       no input devices :-)
#       InputDevice    "Mouse0" "CorePointer"
#       InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

to test

X -novtswitch -sharevts -nolisten tcp -layout MainLayout :0 &
X -novtswitch -sharevts -nolisten tcp -layout SecLayout :2 &

I get a blank screen on primary and nothing on secondary. Looks odd. I had expected to have the tiled patchwork, but no.

We continue with modifications to gdm.conf
I add/change

[servers]
0=Standard
1=Standard
2=SecLogin

[server-SecLogin]
name=Secondary login
command=/usr/X11R6/bin/X -nolisten tcp -novtswitch -sharevts -layout SecLayout
flexible=true

Well it works. on vt7 I have the usual autologin of my main user, on vt8 I have a (standard) login prompt and on vt9 I get a “could not start X”. So it works – mostly.

I didn’t mention it, but I change the screen sections to something more usefull. For the secondary monitor:

Section "Screen"
    Identifier "SecScreen"
    Device     "CirrusCard"
    Monitor    "AsusWideMonitor"
    DefaultDepth    24
    SubSection "Display"
        Virtual   1360 768
        Depth     24
    EndSubSection
EndSection

It is a wide screen monitor.
running the command above

Epia:/etc/gdm# X -novtswitch -sharevts -nolisten tcp -layout SecLayout :2
X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.32-5-686 i686 Debian
Current Operating System: Linux Epia 2.6.32-5-686 #1 SMP Thu Oct 14 17:15:16 UTC 2010 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686 root=UUID=db2e97b9-f466-4526-9c09-812d92ea625c ro quiet
Build Date: 20 September 2010  03:40:46PM
xorg-server 2:1.7.7-7 (Julien Cristau <jcristau@debian.org>)
Current version of pixman: 0.16.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.2.log", Time: Wed Oct 20 23:16:17 2010
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) CIRRUS(0): No valid MMIO address in PCI config space
(EE) CIRRUS(0): I2C initialization failed
(EE) CIRRUS(0): Virtual width (1360) is too large for the hardware (max 2048)
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found

Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
Please also check the log file at "/var/log/Xorg.2.log" for additional information.

This is odd

(EE) CIRRUS(0): Virtual width (1360) is too large for the hardware (max 2048)

Is 1360 > 2048? It boils down to that I wrote

Virtual 1360 768

instead of

Mode "1360x768"

Først I attach the monitor to a different graphics card and use xrandr to query it

VGA1 connected (normal left inverted right x axis y axis)
1360x768       60.0 +
1280x720       75.0     60.0
1024x768       75.1     70.1     60.0
832x624        74.6
800x600        72.2     75.0     60.3     56.2
640x480        72.8     75.0     66.7     60.0
720x400        70.1

I try to generate the modelines
http://xtiming.sourceforge.net/cgi-bin/xtiming.pl

and add the line

Modeline "1360x768@60" 84.50 1360 1392 1712 1744 768 783 791 807

In the log

(II) CIRRUS(0): Not using mode "1360x768@60" (insufficient memory for mode)

I am running in circles here. When the graphics cards accepts a resolution 640×480, the monitor says “OUT OF RANGE”. Any tweaking with other values result in X not starting.

I have tried to give X all the info I could find on the monitor.

Section "Monitor"
    Identifier   "AsusWideMonitor"
    VendorName   "Asus"
    ModelName    "VW161D"

    HorizSync 30.0-82.0
    VertRefresh 56.0-76.0
#   Modeline "1360x768@60" 84.50 1360 1392 1712 1744 768 783 791 807
#   Modeline "720x400@85" 32.47 720 752 872 904 400 407 413 421
#   Modeline "640x480@60" 24.11 640 672 760 792 480 490 495 505
EndSection

It doesn’t work and is not going to work. I will find another PCI graphics card, perhaps an nvidia so I can experiment with CUDA.

Advertisements

Written by moozing

October 22, 2010 at 09:00

Posted in Tech

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: