Version 1.1
IMPORTANT NOTICE: Installing this driver requires an advanced Linux knowledge and may require to patch and recompile the Linux kernel. Please do not install this software if you don't know exactly what you are doing!
Notice to Wyse customers: the VTBook drivers for Linux-based Wyse thin clients are distributed by Wyse together with a specific patch for their systems. Please ask your Wyse contacts for more information about VTBook drivers.
The tested versions are:
Please report problems with other distributions.
To install the driver, please follow these steps:
1.1 Unpack the tar file:
tar -xzvf VTBookLinuxDriver_X.Y.tgz
1.2 Change directory into VTBook folder:
cd VTBook
If your kernel version is 2.6.22 or later you don't need any kernel patch, you must just add the following option to your boot command line:
pci=cbmemsize=128M
This option allow the kernel to reserve enough pci resources for the VTBook needs.
If you have a kernel older than 2.6.22 you need to patch it in order to get a correct resource allocation.
We recommend to do the fix yourself if your distribution is not in the list of tested systems for which we provide a binary patch.
If you have one of the following distributions, we provide directly the binary patch:
or
all binary files are provided and you can proceed to step 2.2.
If your distribution is not in the list, please proceed to step 2.3.
Please note that this step applies ONLY to the tested systems listed in point 2.1.
Check your kernel version by typing:
uname -r
From now on, where you find $KERNEL_VERSION you will replace the string you got here.
2.2.1 Replace kernel files
You can now directly proceed to step 3.
This fix does not need to rebuild the entire kernel but only one single module: you will have to patch, build and install the CardBus kernel module.
After plugging VTBook, we get the following messages in system log (check it by typing dmesg into shell); if you don't see the "Failed" strings like these, you don't need patch.
cs: cb_alloc(bus 6): vendor 0x1023, device 0x9960
PCI: Failed to allocate resource 0(22000000-213fffff) for 06:00.0
PCI: Failed to allocate resource 2(22000000-213fffff) for 06:00.0
PCI: Failed to allocate resource 3(21400000-213fffff) for 06:00.0
PCI: Enabling device 06:00.0 (0000 -> 0002)
cs: cb_free(bus 6)
We can check the bad allocation status using lspci utility:
Region 0: [virtual] Memory at 22000000 (32-bit, non-prefetchable)
Region 1: Memory at 21000000 (32-bit, non-prefetchable) [size=4M]
Region 2: [virtual] Memory at 22000000 (32-bit, non-prefetchable)
Region 3: [virtual] Memory at 21400000 (32-bit, non-prefetchable)
You can see that only register map is properly assigned.
Linux usually reserves only 4MB of prefetchable memory and 4MB of non-prefetchable memory on a single cardbus bridge. These values are not enough for VTBook. Kernel 2.6.0 introduced a dynamic size policy: 1/8 of bridge space is reserved to each device from a maximum of 4MB to a minimum of 16KB.
Edit the setup-bus.c file in linux-2.6.y/drivers/pci/.
Locate the following definition: #define CARDBUS_MEM_SIZE (32*1024*1024)
Replace it with the following: #define CARDBUS_MEM_SIZE (128*1024*1024)To test the patch you need to recompile the kernel (run make and then make install in the /usr/src/linux directory). Setup your LILO or GRUB boot loader for the new kernel and reboot the system (read http://www.kernelnewbies.org/faq/ for more info about recompiling your kernel).
After install and reload, we can check the correct allocation status using lspci again:
Region 0: Memory at 40000000 (32-bit, non-prefetchable) [disabled] [size=32M]
Region 1: Memory at 44000000 (32-bit, non-prefetchable) [disabled] [size=4M]
Region 2: Memory at 42000000 (32-bit, non-prefetchable) [disabled] [size=32M]
Region 3: Memory at 44400000 (32-bit, non-prefetchable) [disabled] [size=32K]
All resources are listed as non-prefetchable; This report is the correct one. Be sure to get it.
Go to step 3 to install the driver
The source code is available in linux-2.x.y/drivers/pcmcia/yenta_socket.c (born from the fusion of files pci_socket.c e yenta.c).
We need to disable this dynamic policy and set a fixed value of 128MB or another value large enough to include all needed maps (32MB+32MB+4MB+32K).
Fix kernel module
Locate the file yenta_socket.c by typing: locate yenta_socket.c and open it with a text editor. Find the costant BRIDGE_SIZE_MAX and change it from its value to 128*1024*1024. This value can be fine tuned. We are sure that this value works on all machines.
If your version of yenta code has the following code, be sure to have the fixed value align = size = BRIDGE_SIZE_MAX; by typing:
#if 0
if (size > avail/8) {
size=(avail+1)/8;
/* round size down to next power of 2 */
i = 0;
while ((size /= 2) != 0)
i++;
size = 1 << i;
}
if (size < BRIDGE_SIZE_MIN)
size = BRIDGE_SIZE_MIN;
align = size;
#endif
Kernel module build
A custom version for yenta_socket kernel module is needed. See linux kernel build faq for details. We need to recompile a kernel module, so be sure to execute make modules.
New compiled kernel module should be installed in /lib/modules and then be loaded/unloaded to be used. Some 2.6.0 kernel builds does not allow modules unload, so reboot is required.
After install and reload, we can check the correct allocation status using lspci again:
Region 0: Memory at 40000000 (32-bit, non-prefetchable) [disabled] [size=32M]
Region 1: Memory at 44000000 (32-bit, non-prefetchable) [disabled] [size=4M]
Region 2: Memory at 42000000 (32-bit, non-prefetchable) [disabled] [size=32M]
Region 3: Memory at 44400000 (32-bit, non-prefetchable) [disabled] [size=32K]
All resources are listed as non-prefetchable; This report is the correct one. Be sure to get it.
Go to step 3 to install the driver
Warning: if your primary card has a Trident chipset, please report to us. It may require a fixed version of VTBook driver.
Replace the current trident_drv 2d driver with the copy provided by typing:
cp /usr/X11R6/lib/modules/drivers/trident_drv.o trident_drv.o.old
cp trident_drv.o /usr/X11R6/lib/modules/drivers/
cp /usr/X11R6/lib/modules/drivers/trident_drv.so trident_drv.so.old
cp trident_drv.so /usr/X11R6/lib/modules/drivers/
XFree driver architecture support binary compatibility on drivers. So driver for XFree 4.3.0 should work also with 4.4.0. Anyway, we have not tested this version yet, so, if you are using it, please report to us.
Check XF86Config file. Use man XF86Config for details. A sample XF86Config file is provided for reference.
Check the xorg.conf example included in this package to see how to configure X.
Remember to include all the options in the VTBook device section and to add the Xinerama "on" in the ServerLayout section (to get an extended desktop)
In particular for the VTBook device section add these options :
VideoRam 32768
Driver "trident"
VendorName "Villagetronic"
BoardName "VTBook"
BusID "PCI:7:0:0" <- this parameter must match your configuration (PCI:bus:slot:function). Run lspci to get your values. Option "Int10" "off"
Option "SetMClk" "133.039MHz"
Option "Display" "DVI" <- only for DVI displays, the line should be commented for VGA displays.
Reboot the system and run X.
Warning: on some systems the PCI memory apertures are not enabled when the VTBook driver starts.
To check if this is the case, run
lspci -v
if you see the flag "disabled" like the following, you need to make a further fix
Region 0: Memory at xxxxxxxx (32-bit, non-prefetchable) [disabled] [size=32M]
Region 1: Memory at yyyyyyyy (32-bit, non-prefetchable) [disabled] [size=4M]
Region 2: Memory at zzzzzzzz (32-bit, non-prefetchable) [disabled] [size=32M]
To fix this problem just type:
setpci -s bus:slot.func COMMAND=02
where bus:slot.func must be replaced with the VTBook bus, slot and function. You can get these values running lspci. You should get 0000:bus:slot.function as header of the VTBook entry.
If you run lspci -v after this command, you shouldn't see anymore the disabled flag in each memory line.
The setpci command can be added to a boot script (for example you can add it at the end of the start procedure in the /etc/init.d/pcmcia script)
This fix will be included in the driver in the future
Don't forget to let us know how you use VTBook in your Linux configuration and which is your wish list for driver features.
Version 1.1:
Version 1.0:
Village Tronic website: www.villagetronic.com
VTBook information: product page
Tech support and development: support@villagetronic.com