Monthly archives: July, 2007

A week configuring Ubuntu with 2 screens on an Acer Travelmate laptop

[Disclaimer: This is not a normal post in my usual style. It’s just a technical reference text. I’ve spent the whole week trying to figure out how configure my laptop and an external screen. Eventually, I got it running! So I’d like to share my config here and in some ubuntu forums]

I installed Ubuntu Feisty in my Acer Travelmate 3000 (actually 3004). The first problem I faced was the panoramic resolution of the laptop screen, 1280×800. Ubuntu tried to display 1280×1024 and the aspect ratio was squeezed. Then I looked at internet and found a recipe with 915resolution (something like “915resolution 49 1280 800 24″). Later I tried to tweak the X server configuration file, xorg.conf, to get 2 screens running (the laptop one, and an external flat panel with 1280×1024). I read on Internet several posts about people trying to configure similar hardware, and all the problems they got: nothing running at all, some screen clipping, etc. Actually I had the same problems… but finally I realized where the problem was, and I got it working! Some details as follows:

Restarting gnome and checking log
First at all, you should go to tty1 with Control+Alt+F1 and do all the editing with the root user (in this case, the best option is using “sudo -s”). To restart the gnome, the command is “/etc/init.d/gdm restart”. I ran this several times, with different configurations, and then read carefully the log file (“/var/log/Xorg.0.log”) to try to understand the errors.

915resolution
This program hacks the Bios, showing different resolutions to the X server. The most common recipe seen on Internet is to overwrite mode 49 with 1280×800 and 24 bits (normally editing the /etc/default/915resolution). But this just desconfigure some modes that (in my case) are needed for the second screen!! Don’t blindy follow Internet recipes!! So, you have to choose carefully which is the best option. Look at the original options (with “915resolution -l”), and try to overwrite an unused mode, and look at the results again with “915resolution -l”. Be sure you get all the resolutions that you need. Moreover, verify in the Xorg.0.log that the needed resolutions are operative.
In my case, I’ve chosen mode 45, 1280×800 and 32 bits. This leaves the other resolution that I need (1280×1024) unchanged. So, my /etc/default/915resolution is:

MODE=45
XRESO=1280
YRESO=800
BIT=32

etc/X11/xorg.conf
If you get the previous step working, you just need minor tweak on the X server configuration file. Just add another Device (with Screen 1), another Monitor, and another Screen. Attention: X server considers pipe A (or Screen 0) as the external one, and pipe B (Screen 1) as the built-in screen. That confused me firstly. Another thing you should add is the horizontal and vertical refresh rate for both monitors… it didn’t work if I left it empty. So finally, the interesting part of this file is:

Section "Device"
	Identifier	"915-0"
	Driver		"i810"
	BusID		"PCI:0:2:0"
    Screen      0
EndSection

Section "Device"
	Identifier	"915-1"
	Driver		"i810"
	BusID		"PCI:0:2:0"
    Screen      1
EndSection

Section "Monitor"
	Identifier	"M-0"
	Option		"DPMS"
    Option "MonitorLayout" "CRT,LFP"
    Option "Display" "CRT"
    HorizSync	30-83
	VertRefresh	56-75
EndSection

Section "Monitor"
	Identifier	"M-1"
	Option		"DPMS"
    Option  "Display" "LFP"
    HorizSync	28-64
	VertRefresh	43-60
EndSection

Section "Screen"
	Identifier	"S-0"
	Device		"915-0"
	Monitor		"M-0"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1280x1024" 
	EndSubSection

    SubSection "Display"
		Depth		32
		Modes		"1280x1024" 
	EndSubSection

EndSection

Section "Screen"
	Identifier	"S-1"
	Device		"915-1"
	Monitor		"M-1"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1280x800" "1280x1024" 
	EndSubSection
    SubSection "Display"
		Depth		32
		Modes		"1280x800" "1280x1024" 
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"S-0"
	Screen		"S-1" Below "S-0"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice     "stylus"	"SendCoreEvents"
	InputDevice     "cursor"	"SendCoreEvents"
	InputDevice     "eraser"	"SendCoreEvents"
EndSection

I hope this helps people to enjoy 2 screens!!


Helping your online reading

Recently I was asked about different issues regarding NLP, due to my PhD studies in that field, and I’ve started reading again about this…

Natural Language Processing is a part of the Artificial Intelligence which studies how a computer could understand natural human languages, like English. There are a lot of subjects in NLP, but in my personal case I used syntactic analyzers to detect the parts of the phrases and the relations between them. For example, to discover if a noun is modified with the surrounding words (“the blue car in the parking lot“). This information were used in a Information Retrieval system (which is something like Google or Yahoo search), to help the system to “understand” what the user is asking for. It was an interesting application of syntactic analyzers.

Visual FormattingAnother amazing use for syntactic analyzers is Visual Text Formatting.

I found an interesting article about “Visual-Syntactic Text Formatting” and a commercial website with some examples. Basically the idea is to use the syntactic information (obtained from NLP tools) to format the text in a way that is easier to read. The result seems quite effective. Surprising idea!