*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: 1 [2]
Print
Author Topic: USB2VGA USB Dongle  (Read 25451 times)

#15 Re: USB2VGA USB Dongle

BoBraxton
Senior Contributor
**
Posts: 110

Burke-Kibwezi Partnership


July 25, 2008, 01:54:51 AM

What projector(s) handle the stated resolution? 1200 X 900
Logged

#16 Re: USB2VGA USB Dongle

electropriest
Contributor
*
Posts: 75

i'm an XO-R-US kid.


July 25, 2008, 07:45:08 AM

virtually none. most consumer models hand, at best, 800x600.

your resolution will drop down to 8x6, and everything becomes huge and awkward looking... but the activities work fine. i have used firefox without complaints... and store my presentations in google documents for convenience.

i have been working (here and there) about getting the driver compiled for the xubuntu distros floating around, because as they are compiled, the modules needed are not installed.
Logged

#17 USB2VGA Dongle Working

anthill
Contributor
*
Posts: 55


November 23, 2009, 03:53:14 PM

The USB2VGA dongles can be made to work on the XO-1, but it does take some Linux geekitude.  Which is a shame, but better than impossible.  If you can use the command line and edit text files, this should be possible.  But don't blame me if you break your laptop.

This is how I spent an afternoon getting my XO to drive a projector Grin:

1) I started by installing Teapot's excellent Ubuntu 8.10 distribution.  This replaces Sugar with the XFCE desktop, and adds the GDM desktop manager (key to later steps).  Don't enable "aggressive power management" unless you want to show me how to fix these instructions.

2) Then I bought the StarTech USB2VGA2 adapter from my local online retailer for about $75.  Its maximum resolution is (apparently) 1920x1200 x 16bit color.  The dongle bundles a USB chip & graphics chip: the PLX Netchip Net2280 and SiS315.

3) Next step is getting the drivers working.  Your XO needs two drivers: one for the Linux kernel and one for X Windows.  The programmer who wrote both has some help, but nothing XO-specific.

a) The Linux Kernel driver I built using mavrothal's excellent guide, drawing from the official OLPC forum.  Small note: in 'make menuconfig', you have to look in the USB driver section, not with the graphics cards, that would be too sensible.

If you are using Teapot's 8.10 Ubuntu distribution, you can save a lot of time by using the kernel driver I built:  sisusbvga.ko (if you have some web space, please mirror this file.  It should work with the official OLPC Build 802 as well)

Before going any further, test if this driver file works with your kernel by plugging in the dongle, opening a terminal, and typing
Code:
# sudo insmod sisusbvga.ko

If this works, the blue LED on the dongle should turn on, and sisusbvga should be in lsmod 's output. Congratulations!  Before moving on, clean up the kernel module:
Code:
# sudo rmmod sisusbvga

Now you should copy the driver file to the right place in /lib/modules so it will auto-load.  You can make the proper directory, copy the driver, and update the kernel modules directory with:  (using tab-autocomplete for the long kernel number of course)
Code:
# sudo mkdir -p /lib/modules/2.6.25-20080925.1.olpc.f10b654367d7065/kernel/drivers/usb/misc/sisusbvga/
# sudo cp sisusbvga.ko /lib/modules/2.6.25-20080925.1.olpc.f10b654367d7065/kernel/drivers/usb/misc/sisusbvga/
# sudo depmod

Finally you should give the USB dongle one of the XO's text consoles.  I like F4 (squared circle) because it resembles F8 (you'll see later). Create a file named sisusbvga in /etc/modprobe.d/ by typing:
Code:
# sudo echo "options sisusbvga first=4 last=4" > /etc/modprobe.d/sisusbvga

Test by plugging in the dongle, the light should turn on automagically as the driver is loaded, and you may see a penguin if your projector is plugged in.

b) Next!  The X Windows driver is available in an Ubuntu package: xserver-xorg-video-sisusb.  Install it.  With a package manager.

4) Almost there - time to configure X-windows to use the new driver.  Sadly, you cannot get both the XO's onboard LCD and the external projector working at the same time.  That's how the XRandR 1.2 crumbles.  But, you can work around the problem by setting up two X Sessions to allow you to switch between LCD and projector.  It's as good as it gets.

Make a backup of your /etc/X11/xorg.conf file first!
Code:
# cd /etc/X11
# sudo cp xorg.conf xorg.conf.bak

Then, edit xorg.conf with a text editor, and add this Screen definition at the end.
Code:
### SISUSBVGA ###

Section "Device"
 Identifier "Device[SISUSBVGA]"
 VendorName "StarTech" # Value does not matter
 BoardName "USB2VGA2" # Value does not matter
 Driver "sisusb"
 Option "DisconnectTimeout" "5"  # If unplugged, X server will wait 5s
EndSection

Section "Monitor"
 Identifier "Monitor[SISUSBVGA]"
 VendorName "Some Projector" # value does not matter
 ModelName "Unknown" # value does not matter
 HorizSync 30-85 # since autodetect broken, force 1280x1024
 VertRefresh 60,75 # since autodetect broken, force 60 or 75Hz refresh
EndSection

Section "Screen"
 Identifier "Screen[SISUSBVGA]"
 Device "Device[SISUSBVGA]"
 Monitor "Monitor[SISUSBVGA]"
 DefaultDepth 16
 SubSection "Display"
  Depth 16
  Modes   "800x600" # Encourage GDM to use a projector-friendly default resolution
  Virtual 1280 1024 # Force the driver to populate mode list up to 1280x1024
 EndSubSection
 SubSection "Display"
  Depth 24
  Modes   "800x600"
  Virtual 1280 1024
 EndSubSection
 SubSection "Display"
  Depth 8
  Modes   "800x600"
  Virtual 1280 1024
 EndSubSection
EndSection

Notice that I've only mentioned 800x600 resolution, so as to be less likely to overdrive your projector.  All screen resolutions are filled in by the sisusb driver, but only up to the monitor's HorizSync and the Virtual screen size (resolutions greater than that are forbidden).  HorizSync of 85Hz is just enough for a Virtual (maximum) size of 1280x1024.  You can fine tune screen sizes later with xRandR.

Still in the xorg.conf file, find the ServerLayout definitions at the beginning.  After the Default Layout, add a second layout for the dongle referencing the Screen name you just added.
Code:
Section "ServerLayout"
Identifier     "SisUSB"  # Alternate layout for projector on USB
Screen      0  "Screen[SISUSBVGA]" # Onboard LCD not used

InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection

If you can figure out how to get one layout with two screens working, you are a genius. As far as I can tell, you must have two layouts, one screen each.

5) To use these server layouts without command-line hacking, set up GDM to allow switching between them. Before editing, backup the file:
Code:
# cd /etc/gdm
# sudo cp gdm.conf-custom gdm.conf-custom.bak

Then, edit gdm.conf-custom , adding this to the end of the file:
Code:
[server-SisUSB]
name=USB VGA Only
command=/usr/X11R6/bin/X -br -audit 0 -layout SisUSB
chooser=false
handled=true
flexible=true
priority=0

Finally, one more tweak:  In the Ubuntu Settings menu, go to Login Window and uncheck the "Disable multiple logins for a single user".  This will let you start both the onboard LCD and external USB dongle X sessions using the same login name.

6) Now reboot your computer so that GDM will reload its configuration file.  You shouldn't notice any difference, and GDM shouldn't give you any option to use the "USB VGA Only" layout.  What a rip-off!

But wait - login as usual, then select "Quit" from the Ubuntu menu.  Select "Switch User", and you should be asked to choose which X server to start: "Standard Server", or "USB VGA Only".  Moment of truth!

7) Plug in the USB dongle, make sure the light is on, plug in the projector, cross your fingers, pick "USB VGA Only", and click OK.

After a few seconds, a second X server will start (eating some memory), your projector should show the GDM login screen, and your XO's built-in LCD will either shut off or become garbled.  If your monitor complains about being "Out of Range", maybe the default 800x600 is too much for it?

Login as usual, ignoring the warnings about already being logged in.  Once logged into XFCE, go to the Ubuntu menu > Settings Manager > Display and pick your favorite screen resolution.  This resolution is saved between sessions, so beware: if you plug into a wimpy low-res projector some day you might need to tinker more.

So, there you go!  You can't take any already opened programs with you (easily), but you can run anything you like on your fresh USB VGA session (within memory limits).

To switch back to programs you had running on the onboard LCD, hold and press Ctrl-Alt-F7 (large circle).  To switch back to the USB VGA session, it's Ctrl-Alt-F8 (larger circle).  Onboard LCD consoles are Ctrl-Alt-F1,F2,F3,F5, or F6.  The USB VGA dongle has one console, Ctrl-Alt-F4 (for what it's worth).

Logging out of the USB VGA session will return you to your normal onboard LCD session, as will pulling out the USB dongle.

Whew!  Let me know if this works for you...
« Last Edit: November 28, 2009, 08:44:47 PM by anthill » Logged

#18 Re: USB2VGA USB Dongle

anthill
Contributor
*
Posts: 55


November 24, 2009, 02:50:57 PM






« Last Edit: December 01, 2009, 01:39:52 PM by anthill » Logged

#19 Re: USB2VGA USB Dongle

alunix
New

Posts: 1


November 21, 2010, 06:32:53 AM

Hi , Thanks for following that, i m a  student but it becomes boring .
electropriest have said " these all seem so use the same sis chipset "

You mean : Bus 001 Device 006: ID 0711:5100 Magic Control Technology Corp. ? (# lsusb)

STARTECH, TRITTON, LINDY, MANHATTAN usb-vga graphic cards . DONT WORK IN LINUX ? they only can make work "grille-pain" ? ...
 I mean they are compatible  windoxs machines with wintel inside ?
I m mad : http://ahltino.e-monsite.com/forum-lire-298146-1.html
Or not http://forum.hardware.fr/hfr/VideoSon/Traitement-Video/tritton-manhattan-startech-sujet_131453_1.htm#t1691368
« Last Edit: November 21, 2010, 06:42:44 AM by alunix » Logged
Pages: 1 [2]
Print
Jump to:  

Members
Total Members: 2406
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 43
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 15
Total: 15