Adding USB SVGA: Difference between revisions

From OLPC
Jump to navigation Jump to search
 
(42 intermediate revisions by 12 users not shown)
Line 1: Line 1:
Using recent Operating Systems, it is easy to make a USB2VGA adapter work with your XO. Using USB2VGA adapters has some limitations (see below for details).
See [[Remote display]] for other ways to connect a second display to an XO.


== Adding an USB-SVGA adapter ==
= Selecting the right USB-SVGA adapter =


Short version: The devices tested and known to work are
It is possible to make use of the USB connectors on the XO to plug in an USB-VGA adapter. Note that Linux supports some of these chips with the '''sisusbvga''' driver for the kernel side and '''sisusb''' module for the Xorg side. The hardware we used is branded as blue box and detected as :


<pre>
Bus 004 Device 005: ID 0711:0900 Magic Control Technology Corp. SVGA Adapter
</pre>

This driver supports cards based on the Net2280/SiS315 chipset, according to [http://www.winischhofer.eu/linuxsisusbvga.shtml the author's page here]. Some devices reported to work [http://www.nslu2-linux.org/wiki/HowTo/AddVGAAdapter according to the NSLU2 wiki]

* [http://www.sitecom.com/product.php?productcode=CN-105&productid=292 Sitecom CN-105]
* [http://www.sweex.com/product.asp?pid=460 Sweex KB100050]
* [http://www.startech.com/Product/ItemDetail.aspx?productid=USB2VGA&c=UK Startech.com USB2VGA]
* [http://www.startech.com/Product/ItemDetail.aspx?productid=USB2VGA&c=UK Startech.com USB2VGA]
* [http://www.startech.com/Product/ItemDetail.aspx?productid=USB2VGA2&c=UK Startech.com USB2VGA2]


While in general, this feature works with USB-SVGA adapters based on the SIS Net2280/SiS315 chipset, which uses the 'sisusbvga'(kernel) and 'sisusb'(xorg) drivers, '''only those two models have been reported to work'''. Other devices from Startech.com are available, with similar model names, but you should not expect them to work.
'''Important notice :''' unless you compiled the sisusbvga module for your kernel, the module can possibly not be fully powered on, do not think the XO is not powerful enough to handle it, just insert the module to make sure it gets powered on.


For more details, see [http://www.winischhofer.eu/linuxsisusbvga.shtml the author's page here]. Some devices reported to work [http://www.nslu2-linux.org/wiki/HowTo/AddVGAAdapter according to the NSLU2 wiki]
=== Compiling the kernel module ===


Using lsusb, we have seen these identifiers on devices that work:
You will need to follow the instructions about rebuilding your kernel at [[Rebuilding OLPC kernel]].


Bus 004 Device 005: ID 0711:0900 Magic Control Technology Corp. SVGA Adapter
Modify the olpc_defconfig to include the SiS USB-SVGA driver :


= On XO OS 10.1.3 and newer =
<pre>
diff --git a/arch/i386/configs/olpc_defconfig b/arch/i386/configs/olpc_defconfig
index 8439431..74abf3b 100644
--- a/arch/i386/configs/olpc_defconfig
+++ b/arch/i386/configs/olpc_defconfig
@@ -215,7 +215,6 @@ CONFIG_NR_QUICK=1
# CONFIG_MATH_EMULATION is not set
# CONFIG_MTRR is not set
# CONFIG_SECCOMP is not set
-# CONFIG_VGA_NOPROBE is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
@@ -1711,7 +1710,8 @@ CONFIG_USB_SERIAL_PL2303=m
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
-# CONFIG_USB_SISUSBVGA is not set
+CONFIG_USB_SISUSBVGA=m
+CONFIG_USB_SISUSBVGA_CON=y
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
</pre>


Just plug the USB2VGA device to the XO, and start it up (or restart it if it is on). The desktop will only appear on the external display. The LCD of the XO will not be operational.
Note that we actually chose to have support for the console on the driver, which is not mandatory but can be convenient when testing.


= On XO OS 10.1.1 and 10.1.2=
Now recompile your kernel using this olpc_defconfig. The newly generated kernel RPM package will include this driver.


You will need to install some required modules from the main repositories
=== Including the driver in the OLPC development image ===


yum install xorg-x11-drv-sisusb
Now that you compiled the kernel it would be good to have it included into a testing image. Assuming that you use pilgrim, apply the following patch to get the xorg module installed as well as the kernel module not being removed by the installer script :


And the RPM containing the required auto-configuration scripts
<pre>
diff --git a/streams.d/olpc-development.stream b/streams.d/olpc-development.stream
index 58fdd0b..5a8c608 100755
--- a/streams.d/olpc-development.stream
+++ b/streams.d/olpc-development.stream
@@ -70,6 +70,7 @@ xorg-x11-drv-evdev
xorg-x11-drv-keyboard
xorg-x11-drv-mouse
xorg-x11-drv-cirrus
+xorg-x11-drv-sisusb
xorg-x11-utils
xorg-x11-xinit
xorg-x11-xauth
@@ -535,7 +536,7 @@ EOF
mkdir -p $INSTALL_ROOT/etc/sysconfig/modules
cat <<EOF > $INSTALL_ROOT/etc/sysconfig/modules/olpc-1.modules
#!/bin/sh
-module_list="i8042 i2c-dev sdhci dcon_bl gxfb_dcon psmouse ovcamchip cafe_ccic cafe-nand battery-class olpc-battery mousedev evdev atkbd leds-olpc"
+module_list="i8042 i2c-dev sdhci dcon_bl gxfb_dcon psmouse ovcamchip cafe_ccic cafe-nand battery-class olpc-battery mousedev evdev atkbd leds-olpc sisusb"
for i in \$module_list ; do
modprobe \$i >/dev/null 2>&1
done
@@ -1315,6 +1316,10 @@ EOF
lib/modules/*/kernel/net/ieee80211/ieee80211*.ko \
lib/firmware/*.bin | \
cpio -O boot/olpcrd -o -A -c
+ # add the sisusb driver
+ echo " - Adding sisusb SVGA adapter driver"
+ ls lib/modules/*/kernel/drivers/usb/misc/sisusbvga/sisusbvga.ko | \
+ cpio -O boot/olpcrd -o -A -c
case $VARIANT in
ext3|devel_ext3)
# the piix ide drivers are only needed for emulation
</pre>


wget http://dev.laptop.org/~martin/public_rpms/f11/olpc-utils-1.0.31-1.fc11.i586.rpm


rpm -Uvh olpc-utils-1.0.31-1.fc11.i586.rpm
=== Compiling the xorg module ===


Connect the USB SVGA adapter, and restart your XO.
The package '''xorg-x11-drv-sisusb''' is outdated and therefore will cause ABI mismatch between this particular module and the Xorg server. As I could not recompile this module, I used an Ubuntu package to get the '''sisusb_drv.so''' file.


= On XO OS 8.2.1 and earlier =
<pre>
mkdir -p extract/
wget http://fr.archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-video-sisusb/xserver-xorg-video-sisusb_0.8.1-9_i386.deb
dpkg -x xserver-xorg-video-sisusb_0.8.1-9_i386.deb extract/
scp extract/usr/lib/xorg/modules/drivers/sisusb_drv.so olpc@laptop:/usr/lib/xorg/modules/drivers/
</pre>


The process is more complex as you will have to compile kernel and xorg modules. See [[Adding_USB_SVGA/Fedora_9_and_earlier]]
Now that the module is copied to the laptop, we can start with the Xorg configuration file.


= Limitations and quirks =
=== Configuring the Xorg ===


* '''No mirroring, external display only'''. When you are using the USB VGA device, we disable the internal LCD screen. This is for two reasons
Add a monitor section for your projector :
** Performance is bad when trying to drive the 2 screen simultaneously. This is in part because the internal display is very differentrom a conventional screen.
** On XO-1, the OS releases based on Fedora 11 (the 10.1.x series) cannot run both the internal video card and a SiS USB device.
* '''Sometimes changes are not shown on screen immediately'''. Move the pointer to get the external display updated. There is a bug in the SiSUSBVGA driver that "forgets" to update the screen. We are investigating.
* When using the USB SVGA device, power saving mode is ''disabled'' so you battery will drain faster.
* Performance is slower.
* Some activities (for example Pippy) do not work or display correctly on the "smaller" screen.
* There may be a visible difference in color temperature
* Earlier than 10.1.3 the kernel module may be missing in some OS/XO model combinations -- compile the kernel and modprobe sisusbvga.


= Pictures =
<pre>
Section "Monitor"
Identifier "Monitor1"
ModelName "Monitor Model"
Option "DPMS"
EndSection
</pre>

and a device section for the SiS USB-SVGA device :

<pre>
Section "Device"
Identifier "Card1"
Driver "sisusb"
EndSection
</pre>

Kill your existing Xorg server and restart it with '''olpc-dm'''.

=== Binaries ===

If you wish to get started quickly, here is a binary:

[http://anthill.hailmail.net/sisusb/sisusbvga.ko http://anthill.hailmail.net/sisusb/sisusbvga.ko]

This was compiled for Build 802, kernel 2.6.25-20080925.1.olpc.f10b654367d7065 and works with the X.org sisusb drivers distributed in Ubuntu 8.10

You can install this module with

<pre>
# mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/misc/sisusbvga/
# cp sisusbvga.ko /lib/modules/`uname -r`/kernel/drivers/usb/misc/sisusbvga/
# depmod
</pre>

Then you will have to find a matching set of sisusb drivers for X Windows.

=== Pictures ===


Here are some pictures of the OLPC working with the USB-SVGA adapter.
Here are some pictures of the OLPC working with the USB-SVGA adapter.



<gallery>
<gallery>
Line 156: Line 59:
Image:Dsc01040.jpg|thumb|Caption3
Image:Dsc01040.jpg|thumb|Caption3
Image:Dsc01041.jpg|thumb|Caption4
Image:Dsc01041.jpg|thumb|Caption4
Image:Image477.jpg|thumb|Caption5
Image:Image473.jpg|thumb|Caption6
Image:Image475.jpg|thumb|Caption7
</gallery>
</gallery>

== Other Resources ==

* See [[Remote display]] for other ways to connect a second display to an XO.
* For alternate linux distributions, see this [http://www.olpcnews.com/forum/index.php?topic=1066.msg30956#msg30956 thread]
* Experimental: [[DisplayLink]]



[[category:hardware]]
[[category:hardware]]

Latest revision as of 02:26, 26 October 2011

Using recent Operating Systems, it is easy to make a USB2VGA adapter work with your XO. Using USB2VGA adapters has some limitations (see below for details).

Selecting the right USB-SVGA adapter

Short version: The devices tested and known to work are

While in general, this feature works with USB-SVGA adapters based on the SIS Net2280/SiS315 chipset, which uses the 'sisusbvga'(kernel) and 'sisusb'(xorg) drivers, only those two models have been reported to work. Other devices from Startech.com are available, with similar model names, but you should not expect them to work.

For more details, see the author's page here. Some devices reported to work according to the NSLU2 wiki

Using lsusb, we have seen these identifiers on devices that work:

 Bus 004 Device 005: ID 0711:0900 Magic Control Technology Corp. SVGA Adapter

On XO OS 10.1.3 and newer

Just plug the USB2VGA device to the XO, and start it up (or restart it if it is on). The desktop will only appear on the external display. The LCD of the XO will not be operational.

On XO OS 10.1.1 and 10.1.2

You will need to install some required modules from the main repositories

yum install xorg-x11-drv-sisusb

And the RPM containing the required auto-configuration scripts

wget http://dev.laptop.org/~martin/public_rpms/f11/olpc-utils-1.0.31-1.fc11.i586.rpm
rpm -Uvh olpc-utils-1.0.31-1.fc11.i586.rpm

Connect the USB SVGA adapter, and restart your XO.

On XO OS 8.2.1 and earlier

The process is more complex as you will have to compile kernel and xorg modules. See Adding_USB_SVGA/Fedora_9_and_earlier

Limitations and quirks

  • No mirroring, external display only. When you are using the USB VGA device, we disable the internal LCD screen. This is for two reasons
    • Performance is bad when trying to drive the 2 screen simultaneously. This is in part because the internal display is very differentrom a conventional screen.
    • On XO-1, the OS releases based on Fedora 11 (the 10.1.x series) cannot run both the internal video card and a SiS USB device.
  • Sometimes changes are not shown on screen immediately. Move the pointer to get the external display updated. There is a bug in the SiSUSBVGA driver that "forgets" to update the screen. We are investigating.
  • When using the USB SVGA device, power saving mode is disabled so you battery will drain faster.
  • Performance is slower.
  • Some activities (for example Pippy) do not work or display correctly on the "smaller" screen.
  • There may be a visible difference in color temperature
  • Earlier than 10.1.3 the kernel module may be missing in some OS/XO model combinations -- compile the kernel and modprobe sisusbvga.

Pictures

Here are some pictures of the OLPC working with the USB-SVGA adapter.

Other Resources