If you're using Ubuntu Feisty (eg. with LTSP-5) on a Compaq Evo T20, then you've probably already noticed that the NSC driver fails to load. The problem occurs only with the latest (2.8.2) version. Reverting back to v2.8.1 fixes it. Here's how to do that ...
If you try to start X with Xorg v7.2.0 and NSC driver v2.8.2, then you get the following error message in your Xorg log file (I'll put here just the tail of the log):
(...)
(II) Setting vga for screen 0.
(II) Loading sub module "vgahw"
(II) LoadModule: "vgahw"
(II) Loading /usr/lib/xorg/modules//libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
compiled for 7.2.0, module version = 0.1.0
ABI class: X.Org Video Driver, version 1.1
(WW) System lacks support for changing MTRRs
Fatal server error:
xf86MapVidMem: Could not mmap framebuffer (0x00000000,0xfe280000) (Cannot allocate memory)
The fatal error occurs at the place where usually the first NSC log entries would appear. I tried to find a fix for this with Google, but failed. If somebody knows the answer, please share it with me by dropping a comment to this post.
The only fix I know about is going back to the previous version of the NSC driver (namely v2.8.1). I'll describe how to do that. You can run the following as root supposed you've your LTSP in /opt/ltsp/i386 and you've wget installed:
cd /opt/ltsp/i386/tmp
wget 'http://archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-video-nsc/xserver-xorg-video-nsc_2.8.1-0ubuntu1_i386.deb'
mount --bind /dev /opt/ltsp/i386/dev
chroot /opt/ltsp/i386 /bin/bash
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root LC_ALL=C LTSP_HANDLE_DAEMONS=false
cd /tmp
dpkg --force-depends -r xserver-xorg-video-nsc
dpkg -i xserver-xorg-video-nsc_2.8.1-0ubuntu1_i386.deb
echo 'xserver-xorg-video-nsc hold' | dpkg --set-selections
umount /dev/pts
umount /sys
umount -lf /proc
exit
umount /opt/ltsp/i386/dev
The
dpkg --set-selections
command makes sure that a future update will not replace this older version by accident. You'll be notified during all updates of your LTSP tree that there's a newer version of xserver-xorg-video-nsc available, but it was not installed. Of course you can check from time to time whether the latest version of the driver is fixed on the Evo T20.
And you could drop a comment here if it is ...
Comments
How about rebuilding
http://packages.ubuntu.com/gutsy/x11/xserver-xorg-video-nsc
The problem is its dependency on 2:1.3.0.0 xserver-xorg-core though :/
Same problem with Geode based Starbox, I'm currently using a mix of Edgy MueKow and LTSP 4.2
http://www.cappuccinopc.com/star-466.asp
Hi. After 2 days without
After 2 days without any result I'm getting mad with the NSC driver. I built a uclibc T20 firmware image and everything is in place except this file. What I have done so far is:
- Downloaded the 2.8.2 and built it without any error againt uclibc.0.29
- Installed it and I get the same error as you
- Downloaded the 2.8.1 and it does not build at all.
Something seems to be strange here. I cannot explain how ubuntu was able to build this driver. The differences between the two versions can be viewed here: http://cgit.freedesktop.org/xorg/driver/xf86-video-nsc. Maybe anyone has a hint.
Markus
building NSC driver
I never tried to build the Xorg NSC driver on my own. You asked how the Ubuntu guys could build it and there I might be able to help. As far as I know the method described here should do exactly the same as Ubuntu did for making the Ubuntu-distributed binary versions of the packages. You could try this on the xserver-xorg-video-nsc package and see whether the driver it produces works for you. Of course you'll need an Ubuntu setup for this.
Finally I found out what the
...
io scheduler cfq registered
PCI: Fixup for MediaGX/Geode Slave Disconnect Boundary (0x41=0x9c)
gx1fb 0000:00:12.4: 2560 Kibyte of video memory at 0x40800000
fb0: GX1 frame buffer device
Real Time Clock Driver v1.12ac
...
I modded the driver to tell it only to use 2MB but this does not help further. The fix in nsc_gx1_driver.c only resulted in an signal 11.
...
pGeode->FBSize = GetVideoMemSize();
/* experimental fix */
pGeode->FBSize = 0x200000;
...
As the framebuffer size detection code is exactly the same as in 2.8.1 I'm wondering why it should work with the previous driver release.
Markus
Re: Finally I found out ...
Again, one step
The driver seems to have problems when accessing the PCI bus. The function gfx_detect_cpu() in module gfx_init.c tries to read the vendor ID of the Geode graphic PCI device with the following code:
value = gfx_pci_config_read(0x80000000);
if (value == PCI_VENDOR_DEVICE_GXM) {
...
value = gfx_pci_config_read(0x80000800);
if (value == PCI_VENDOR_DEVICE_REDCLOUD) {
...
Obviously it uses the standard PCI access through ports 0x0CF8/0x0CFC. After implementing further debug messages I got the following X result:
...
DBG:gfx_pci_config_read(0x80000000)=0 but expected PCI_VENDOR_DEVICE_GXM=69752
DBG:gfx_pci_config_read(0x80000800)=0 but expected PCI_VENDOR_DEVICE_REDCLOUD=2625547
...
Both read request result in an 0 reply and not in vendor id as expected. As I'm no PCI expert at all, I guess it is not a driver problem but a general access problem when reading the PCI configuration.
Markus
Re: Again, one step
I just checkd the different
After spending a bit more time in this I'm getting more and more confused. Every read access to the PCI or device ports results in an totally strange result. For example the total build in RAM of my T20 ist detected with about 20MB and the framebuffer address is detected with about 50MB. And with Videoram = TotalRAM - FramebufferBase = 20MB-50MB this results in -30MB (=0xFE280000).
The deeper I dig the more weired it gets.
Markus
Re: I just checked ...
changes
Looking through the ubuntu
In file included from ../src/panel/pnl_init.c:175,
from panel.c:178:
../src/panel/platform.c:197: error: conflicting types for 'protected_mode_access'
../src/panel/gx2_9211.c:174: error: previous definition of 'protected_mode_access' was here
../src/panel/platform.c: In function 'protected_mode_access':
../src/panel/platform.c:525: warning: assignment makes pointer from integer without a cast
make[2]: *** [panel.lo] Error 1
make[2]: Leaving directory `/tmp/xf86-video-nsc-2.8.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/xf86-video-nsc-2.8.1'
make: *** [all] Error 2
And that's most important thing what the version 2.8.2 is about. I hope it comes clear why I'm so worried that the 2.8.1 version could be compiled without any errors. Maybe it was done with an older X11 version and not 7.2.
This is an extract log
(II) Primary Device is: PCI 00:12:4
(--) Assigning device section with no busID to primary device
(--) Chipset 5530 found
(II) resource ranges after xf86ClaimFixedResources() call:
[0] -1 0 0x00100000 - 0x0fffffff (0xff00000) MX[B]E(B)
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B]
[4] -1 0 0x000cc000 - 0x000ccfff (0x1000) MX[B]
[5] -1 0 0x40011000 - 0x4001107f (0x80) MX[B]
[6] -1 0 0x40012000 - 0x400120ff (0x100) MX[B]
[7] -1 0 0x10010000 - 0x10010fff (0x1000) MX[B]
[8] -1 0 0x40010000 - 0x40010fff (0x1000) MX[B](B)
[9] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B]
[10] -1 0 0x00000000 - 0x000000ff (0x100) IX[B]
[11] -1 0 0x0000fb00 - 0x0000fb7f (0x80) IX[B]
[12] -1 0 0x0000f800 - 0x0000f8ff (0x100) IX[B]
(II) resource ranges after probing:
[0] -1 0 0x00100000 - 0x0fffffff (0xff00000) MX[B]E(B)
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B]
[4] -1 0 0x000cc000 - 0x000ccfff (0x1000) MX[B]
[5] -1 0 0x40011000 - 0x4001107f (0x80) MX[B]
[6] -1 0 0x40012000 - 0x400120ff (0x100) MX[B]
[7] -1 0 0x10010000 - 0x10010fff (0x1000) MX[B]
[8] -1 0 0x40010000 - 0x40010fff (0x1000) MX[B](B)
[9] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B]
[10] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B]
[11] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B]
[12] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B]
[13] -1 0 0x00000000 - 0x000000ff (0x100) IX[B]
[14] -1 0 0x0000fb00 - 0x0000fb7f (0x80) IX[B]
[15] -1 0 0x0000f800 - 0x0000f8ff (0x100) IX[B]
[16] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B]
[17] 0 0 0x000003c0 - 0x000003df (0x20) IS[B]
(II) Setting vga for screen 0.
Markus
extract for 2.8.1
(II) Primary Device is: PCI 00:12:4
(--) Chipset 5530 found
(II) resource ranges after xf86ClaimFixedResources() call:
[0] -1 0 0x00100000 - 0x0fffffff (0xff00000) MX[B]E(B)
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B]
[4] -1 0 0x000cc000 - 0x000ccfff (0x1000) MX[B]
[5] -1 0 0x40011000 - 0x4001107f (0x80) MX[B]
[6] -1 0 0x40012000 - 0x400120ff (0x100) MX[B]
[7] -1 0 0x10010000 - 0x10010fff (0x1000) MX[B]
[8] -1 0 0x40010000 - 0x40010fff (0x1000) MX[B](B)
[9] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B]
[10] -1 0 0x00000000 - 0x000000ff (0x100) IX[B]
[11] -1 0 0x0000fb00 - 0x0000fb7f (0x80) IX[B]
[12] -1 0 0x0000f800 - 0x0000f8ff (0x100) IX[B]
(II) resource ranges after probing:
[0] -1 0 0x00100000 - 0x0fffffff (0xff00000) MX[B]E(B)
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B]
[4] -1 0 0x000cc000 - 0x000ccfff (0x1000) MX[B]
[5] -1 0 0x40011000 - 0x4001107f (0x80) MX[B]
[6] -1 0 0x40012000 - 0x400120ff (0x100) MX[B]
[7] -1 0 0x10010000 - 0x10010fff (0x1000) MX[B]
[8] -1 0 0x40010000 - 0x40010fff (0x1000) MX[B](B)
[9] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B]
[10] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B]
[11] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B]
[12] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B]
[13] -1 0 0x00000000 - 0x000000ff (0x100) IX[B]
[14] -1 0 0x0000fb00 - 0x0000fb7f (0x80) IX[B]
[15] -1 0 0x0000f800 - 0x0000f8ff (0x100) IX[B]
[16] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B]
[17] 0 0 0x000003c0 - 0x000003df (0x20) IS[B]
(II) Setting vga for screen 0.
same
(--) Assigning device section with no busID to primary device
This was not part of the 2.8.1 log, only the 2.8.2 log.
Finally the breakthrough.
from io.h (remember to use #include <sys/io.h> in the corresponding modules.
unsigned char
gfx_gxm_config_read(unsigned char index)
{
unsigned char value = 0xFF;
unsigned char lock;
/* OUTB(0x22, GXM_CONFIG_CCR3);
lock = INB(0x23);
OUTB(0x22, GXM_CONFIG_CCR3);
OUTB(0x23, (unsigned char)(lock | 0x10));
OUTB(0x22, index);
value = INB(0x23);
OUTB(0x22, GXM_CONFIG_CCR3);
OUTB(0x23, lock); */
outb(GXM_CONFIG_CCR3,0x22);
lock = inb(0x23);
outb(GXM_CONFIG_CCR3,0x22);
outb( (unsigned char)(lock | 0x10),0x23);
outb( index,0x22);
value = inb(0x23);
outb(GXM_CONFIG_CCR3,0x22);
outb( lock,0x23);
return (value);
}
unsigned long
gfx_pci_config_read(unsigned long address)
{
unsigned long value = 0xFFFFFFFF;
outl(address, PCI_CONFIG_ADDR);
value = inl(PCI_CONFIG_DATA);
/* OUTD(PCI_CONFIG_ADDR, address);
value = IND(PCI_CONFIG_DATA); */
return (value);
}
I don't know if I have to fix further code lines but these two corrections help to get past the error...
Markus
Re: Finally the breakthrough
To sum it all up. X.Org has
X.Org has removed the "#define XFree86Server 1" from their build environment. Without this the precompiler gets mad and takes paths that it never was intended for. I've sent a mail to the developer and hope to get an answer soon.
Best regards.
Markus
There's a 2.8.3-2 in Ubuntu
https://bugs.launchpad.net/ubuntu/hardy/+source/xserver-xorg-video-nsc/1:2.8.3-2
Re: There's a 2.8.3-2 in Ubuntu
Xorg NSC v2.8.3-2 driver works with the Evo T20
However you need some extra tweaks if you want to use the new driver with your Ubuntu Feisty installation. There are multiple dependencies that have to be overridden, but if you do override, then it'll work in the end.
First, you've to get the new Debian package installed on your Ubuntu system. Since I use LTSP, I'll describe how to get the new NSC driver installed in an LTSP root (supposing your LTSP installation uses default locations).
cd /opt/ltsp/i386/tmp
wget 'http://archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-video-nsc/xserver-xorg-video-nsc_2.8.3-2_i386.deb'
mount --bind /dev /opt/ltsp/i386/dev
chroot /opt/ltsp/i386 /bin/bash
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root LC_ALL=C
cd /tmp
dpkg --force-depends -r xserver-xorg-video-nsc
dpkg --force-depends -i xserver-xorg-video-nsc_2.8.3-2_i386.deb
echo 'xserver-xorg-video-nsc hold' | dpkg --set-selections
mkdir -p /etc/ltsp/screen.d
cp /usr/lib/ltsp/screen.d/startx /etc/ltsp/screen.d/startx-custom
# At this point edit the /etc/ltsp/screen.d/startx-custom file
# and add a new line following the XF_ARGS initialization to set
# the ignoreABI parameter.
# Eg. XF_ARGS="$XF_ARGS -ignoreABI"
# Then edit /etc/lts.conf and specify that the startx-custom script
# should be invoked instead of whatever used to be invoked.
# Eg. SCREEN_07 = startx_custom
umount /dev/pts
umount /sys
umount -lf /proc
exit
umount /opt/ltsp/i386/dev
The "-ignoreABI" parameter is required for starting Xorg, otherwise it'll fail to load the NSC driver complaining about version differences (something like "module ABI major version (0) doesn't match the server's version (1)").
From now on if you try to upgrade your LTSP root with
apt-get
, you'll always get a warning about unmet dependencies. If that bothers you, then stick with the 2.8.1 NSC driver (as described above), until the new Ubuntu is released and you can upgrade the full LTSP root.