[ltp] ultrabase x2 warm-docking?

Eric Jorgensen linux-thinkpad@www.bm-soft.com
Fri, 19 Apr 2002 15:36:59 -0600


On 19 Apr 2002 14:10:49 -0700
Karl Klashinsky <klash@cisco.com> wrote:

> Your setup is very similar to mine: x21 w/ ultrabay/dvd/floppy,
> RH-7.2+Ximian Desktop.  I have also been experimenting with the
> dock/undock ability, and getting similar problems.  I'm still running
> the original RedHat-shipped kernel.  I was hoping a kernel upgrade and
> custom config would help solve some prob's, but, based on your report,
> probably not.

	Well, I have some ideas. The ide-cd driver is a module, maybe i should unload
it at suspend and reload it at resume if scandvd returns 0 (success)? *shrug*.
It's possible tpctl has something that will help. 

> Specific comments:
> 
> On Fri, 2002-04-19 at 13:25, Eric Jorgensen wrote:
> > 
> > 	I've got an X21 (2662-67U), and I've also acquired for it the Ultrabase
> > 	X2 Media Slice, and the 6x/24x ultrabay 2000 dvd drive. I've got the
> > 	latest bios and embedded controller program flashed. Well, latest as of
> > 	mid-February. 
> 
> I haven't upgraded the original/FCS bios, etc.  Is there a reason to do
> so?

	I was chasing an issue with a pcmcia smartmedia reader in Win2k, and just
wanted to make sure i was current. I never did resolve it. 

	Issue turned out to be, when inserting IDE pcmcia cards that do not have their
own driver into the pcmcia slot, the driver that windows loads is the driver for
the CMD pci ide controller in the thinkpad dock (which is very different from
the secondary ide port in the ultrabase), and it tries to initialize the device
as pci, which of course doesn't work. 

	The problem is, ide pcmcia cards typically don't have specific drivers, because
the operating system's drivers should be perfectly capable of driving them. So
the fix has to come from IBM. 

	IBM had a fix for this issue for a different model thinkpad, and so far I
haven't been able to convince them that it's a real live issue with this one.
It's mostly a moot point, I never use the win2k partition anymore unless there's
something i need to do that really needs windows.  

> > 	I'm running debian/woody on it, with a 2.4.17 kernel I built myself. I'm
> > 	using the xserver from the gatos project. I haven't yet attempted to do
> > 	anything with tpctl, haven't even built the thinkpad specific modules
> > 	yet. I'm in the process of learning what it can do for me. 
> 
> ... what is the gatos proj, what does its xserver bring?  Spare an URL?

	GATOS is a project that aims to support video features on ati graphics chips in
linux. Their initial push was to get the tv tuner and tv output functions of
All-In-Wonder cards working, which they've done. They've also been working on
xvideo support for ati chips, which allows programs such as dvd players to
access the hardware colorspace converter to make the YUV to RGB conversion, and
to access the hardware bilinear scaler to scale the video window. 

	They call this project ati.2, you can look at all of it at
http://gatos.sourceforge.net
 
> > 	When i boot up with the ultrabase, everything works great. I'm able to
> > 	watch DVDs easily with VLC (recommended - www.videolan.com). Floppy
> > 	drive works too. 
> 
> Is "www.videolan.com" right?  I get no such site...

	Sorry, my fault. www.videolan.org - the front page of their website is covered
in shots of their booths at various trade shows, makes them look, you know,
commercial.  
> > 	Somebody's website explaining how to use linux on an x20 or x21 advised
> > 	that all one needed to do was suspend the notebook before docking or
> > 	undocking. also included source for a program "scandvd" to rescan the
> > 	2nd ide port when the notebook wakes up. 
> 
> The procedure I found via google was a tad more detailed.  For undock:
> 
>         1. Use "modprobe -r" to remove modules related to ultrabay,
>            notably, cdrom and ide-cd, maybe floppy.  Note that this
>            implies that you should configure these guys as
>            kernel-loadable, not compiled in.
>         2. Suspend the machine.
>         3. Detach the ultrabay.
>         4. Resume the machine.
>         5. Run scandvd.
> 
> The procedure to re-dock is similar:
> 
>         1. Suspend the machine.
>         2. Dock/connect.
>         3. Resume.
>         4. Run scandvd.
>         5. Use modprobe to reload relevant modules (note: I believe that
>            this step isn't necessary if your module autoload setup is
>            properly configured).
> 
> > 	Problem is, it doesn't work that way. 
> 
> Ditto.


	Great, so, my next plan of action isn't gonna work. Back to the drawing board. 
 

> > 	If i suspend and resume with the ultrabase in place, everything still
> > 	seems to work. 
> 
> Ditto.
> 
> > 	If i suspend, remove the ultrabase, resume, and run "scandvd", scandvd
> > complains that it couldn't talk to the 2nd ide port. It would appear that
> > when the ultrabase is not present, the 2nd ide port is disabled / powered
> > off. 
> 
> From what I read on the google-found page, this is the output that you
> should get when you run scandvd after the undock.  From my prior
> experiences with a tp600e w/ full dock (i.e., dock had PCI slots, etc),
> you have literally "extra buses" that only show up when connected to the
> dock.
> 
> If you're experiences are similar to mine, everything is pretty well
> "peachy" at this point.  Your undocked x20 works fine, etc.


	Yeah, the thinkpad docks have a full PCI bus, the ultrabase does not. 
 

> > 	If i then suspend, install the ultrabase, resume, and run "scandvd"
> > 	again, it happily informs me of my DVD drive, but it doesn't actually
> > 	work. 
> > 
> > 	If i then run vlc, and try to play a dvd, vlc just locks up, and can't
> > 	be killed. I have to reboot to notebook to get rid of the process. 
> 
> Ditto.  In my case, I try to do something as simple as a "mount" command
> (with a simple cd-rom in the drive), and it hangs the "mount" command. 
> Note that I've experimented with skipping step (5) of the re-dock
> procedure.  The "mount" still hangs, and an lsmod shows the necessary
> modules loaded.  However, I end up with an error message in
> /var/log/messages.  Unfortunately, I no longer have a "messages" file
> around that still contains the error message, but it's related to the
> IDE subsystem.


	Figures. 

	Maybe something about the ide drivers changed since the scandvd program was
written?  

> > 	What bothers me is that google turns up very little when i search for
> > 	"linux" and "ultrabase". It's as though not many people ever use them. I
> > 	admit the retail price is absurd, but some guy on eBay was getting rid
> > 	of a large number of them at $120/ea, so i grabbed one. And then found a
> > 	used dvd drive for $60. If I'd had to pay the, what, $540 total retail
> > 	cost of these things, I'd never have bought them. 
> 
> My machine is company-owned, so it came with the whole nine yards (lucky
> me! 8*).
> 
> Anyway, most of above comes into the category of "me, too".  I haven't
> had a chance to do much futzin' about for more than a month, but now
> you've got me curious in revisiting this.  I'll keep the alias
> up-to-date with anything I find in my experimentation, would be great if
> you could please do the same?


	Of course - I'm looking forward to being able to whip out my ultrabase, dock,
and watch a DVD. There's got to be a way . . . .

 - Eric

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html