Archive for the ‘Linux’ Category

Ubuntu: Getting 1920×1200 working on an nVidia GeForce FX5500

Sunday, March 15th, 2009

I’m currently building a new computer as a server that will eventually live out in my garage hooked up to a small 1024×768 LCD monitor, but most of the time it will be accessed by VNC, so I just bought the cheapest PCIe video card that I could find for it, an nVidia GeForce FX5500. However, while I am building it, I have it hooked up to a 24″ Acer LCD monitor which is running at 1920×1200.

The computer is running Ubunto 9.04 (Jaunty) Alpha 6, and the restricted nVidia drivers (v173), but the when I run nvidia-settings, the highest resolution that it offered me was 1920×1080, and that was interlaced, which looked terrible! What’s worse, all of the 16:9 ratio’s looked really bad, and I was forced to use one of the lower 4:3 ratios to get it to display properly

Although I am running Jaunty, the fix that I found is fairly generic, and so should work on just about any Linux distro

I checked out the logfile (/var/log/xorg.0.log) to see what it was saying, and it was reporting that the maximum pixel clock for my monitor was 135MHz, which I found really strange because when I hook up my other computer to the same monitor, it reports the maximum pixel clock as 330MHz. Since the nvidia settings thought the pixel clock was limited to 135MHz, it was limiting my resolution options to those that had a lower pixel clock than that. A quick look at google provided some options to at to the xorg.conf file in /etc/X11:

First, I added the line in red to the Monitor section:

Section “Monitor”
Identifier “Monitor0″
VendorName “Unknown”
ModelName “Acer AL2416W”
HorizSync 24.0 – 80.0
VertRefresh 49.0 – 75.0
Option “ModeValidation” “NoMaxPClkCheck;NoEdidMaxPClkCheck”
EndSection

This just tells the video card to ignore the reported Pixel Clock settings.

Secondly, I added the lines in Red to my Screen section

Section “Screen”
Identifier “Screen0″
Device “Device0″
Monitor “Monitor0″
DefaultDepth 24
Option “TwinView” “0″
Option “metamodes” “CRT-0: 1920×1200 +0+0″
SubSection “Display”
Depth 24
Modes “1920×1200″ “1600×1200″ “1280×1024″ “1024×768″ “800×600″ “640×480″
EndSubSection
EndSection

These lines tell the video card to use 1920×1200 as the default resolution

Then I just logged out, and logged in again and viola! perfect stable 1920×1200! I’ll probably have to fix this again when I hook up the small monitor, but that’s easy!

Using the MF322 Telsta NextG card in Ubuntu

Sunday, December 21st, 2008

This is something that i’ve battled with for a little while now, there are several scripts available on the net but I could never get any of them to work. Unfortunately, the MF332 is one of the oldest NextG cards that Telstra use, and it was never officially supported under linux, so information is sparse.

Anyway, i now have 2 methods of getting this card to connect to the internet under Ubuntu:

Method 1: Using pppd

I downloaded the following scripts from the net but I could never get them to connect. After watching what was happening using miniterm in KPPP, I realised that the card needed to be reset most of the time before it would accept any commands. So all I did was added an “ATZ” command to the following script and it works! I’m using this under Ubunto 8.10, but this method will also work under older variants of Ubuntu, and probably other distros as well.

First, create a file “/etc/ppp/peers/ppp0″ and add the following:

connect “/usr/sbin/chat -v -f /etc/chatscripts/ppp0″
/dev/ttyUSB0
# might also try 115200 for the speed
460800
user “User@telstra.pcpack”
defaultroute

persist

usepeerdns

Next, create a file “/etc/chatscripts/ppp0″, and add the following:

ABORT BUSY
ABORT ‘NO CARRIER’
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
“” “ATZ”
“” “AT+CPIN?”
READY-AT+CPIN=XXXX-OK “AT&F”
OK “ATE1″
OK “AT+CGDCONT=1,\042IP\042,\042telstra.pcpack\042″
SAY “Calling Telstra NextG\n”
TIMEOUT 60
OK “ATD*99#”
CONNECT \c

where XXXX is the PIN number for your SIM card. If you don’t have a PIN number, any old 4-digit number will do

To connect, just type

sudo pppd call ppp0

and to disconnect, just type

sudo killall pppd

Method 2: Using NetworkManager

Ubuntu 8.10 included NetworkManager 0.7, which features automatic detection and usage of 3G modems. Unfortunately, the good old MF332 seems to have been forgotten in all of this, but after a bit of tinkering, I managed to find a few things out and get it going. My solution if far from ideal however, so if you have any hints to make this better, please let me know.

When you first plug the card in, Network Manager will recognise it and create a nerw connection under the “Mobile Broadband” tab called “Auto Mobile Broadband (CDMA) connection” You need to edit this connection (or create a new one if you wish), and change the number to “*99#” (ignore the quotes), then press OK.

I identified 3 separate problems with trying to get my MF332 going using NetworkManager

1) I found that I had to disable the PIN on the SIM card. The only way I know how to do that is by using the Telstra Turbo Card Manager in Windows XP, under options-> security settings. This only needs to be done once

2) The second problem is that sometimes (but not always), after plugging the modem in, it needs to be reset, otherwise it just sits there sending back a short string every second or 2. I’ve just been using the miniterm in KPPP to reset it, but I suspect that simply typing “echo ATZ >> /dev/ttyUSB0″ will do it too, although I am yet to confirm this

3) The third problem is that sometimes (but again not always) it would connect successfully, but I could not get anywhere on the web. It turns out that the dns server addresses were not being updated in /etc/resolv.conf. Unfortunately, NetworkManager overwrites this file, so you can’t just set and forget. If you manage to connect, but can’t reach any websites, you either need to try disconnecting/reconnecting to see if the dns servers got added (cat /etc/resolv.conf) or manually enter “nameserver 203.50.2.71″ and “nameserver 139.130.4.4″ to /etc/resolv.conf each time.

I will do some more investigation into this to see if I can automate, but at least it’s working for now. I’m typing this message now while using my MF332 modem.

Getting Suspend/Hibernate working in Ubuntu 8.04

Sunday, October 12th, 2008

For some reason, I could not get Suspend or Hibernate to work out of the box on my Ubunto 8.04 installation on my old Sony Vaio laptop. A quick search of google reveals that this is a common problem, and the most common solution is to use a 3rd party application called uswsusp to do it. It’s pretty easy to get this going, here is what you need to do,

First, install uswsusp:

sudo apt-get install uswsusp

And by typing the below command you check if the suspend function works now….

sudo s2ram

Same goes for hibernation

sudo s2disk

If that all works, you can now replace the ubuntu default commands with the new uswsusp commands

First step is to back up the standard ubuntu commands

sudo cp /usr/lib/hal/scripts/linux/hal-system-power-suspend /usr/lib/hal/scripts/linux/hal-system-power-suspend.bak

sudo cp /usr/lib/hal/scripts/linux/hal-system-power-hibernate /usr/lib/hal/scripts/linux/hal-system-power-hibernate.bak

Now, edit the suspend command file “hal-system-power-suspend” using vi or gedit, and replace the contents with

#!/bin/sh
/sbin/s2ram –force

Now, edit the hibernate command file “hal-system-power-hibernate” and replace the contents with

#!/bin/sh
/sbin/s2disk

And that’s it, hibernate and suspend should be working as they should!

Installing Ubuntu 8.04

Sunday, June 1st, 2008

I have a little Sony Vaio VGN-T17GP laptop that I use for travelling, I bought it off ebay about a year ago for $1000 specifically to use when we go on holidays, as it only weighs 1.2kg, and it is very small, measuring just 272mm by 205mm. It has a 1.1GHz Pentium M processor, 1GB of RAM, a 40GB hard drive, a DVD burner, Wi-Fi, 2 USB ports, a PCMCIA port, a fire wire port, and the standard modem and Ethernet connections. To top it all off, the battery will last nearly 8 hours in low power mode. But it’s a few years old now, and it’s not the fastest laptop in the world, and so I decided that I would try to install Ubuntu 8.04 on it to speed it up a bit. Although I used to be an expert Unix user in a past life, it’s been years since I’d even looked at a Unix machine, and I’d only ever had limited exposure to Linux, so I’m approaching this installation almost as a newbie.

I did a Google search to see if anyone had done a Linux install onto a Sony Viao laptop like mine, but couldn’t find any references, so I decided to give it a go on my own

Installation

I downloaded the live CD from the Ubuntu website, burnt the .iso image to CD, then put the CD into my laptop and rebooted. Installation was very straight forward. I followed the guided setup to repartition my hard drive to include a Linux boot partition and a swap partition, answered a few other questions such as what country I live in, what sort of keyboard layout I use, what timezone I am in etc, and then the installation began, and in about 30 minutes, I had a fresh installation of Linux on my computer, ready to go! Microsoft take note! Installation does not have to be difficult!

Wireless (Wi-Fi) Networking

First job was to get the Wi-Fi configured to hook into my home network. I run WPA personal security on my home network instead of WPA2 personal because I have 3 access points at home, and one of them doesn’t support WPA2. So, I tried to get it to connect to my network using WPA2 Personal, but it just would not connect. I turned off security on one of my access points and was able to connect right away. I then set that access point to WPA2 Personal security, and was also able to connect straight away, but when I set the access point back to WPA personal, It just refused to connect. I played around with it for a while, and then found that if I manually set the encryption to “TKIP” instead of “Automatic”, it worked just fine!

Muted Audio

Next problem was that I had next to no sound. I couldn’t hear anything over the speakers, and only very very faint sound through the headphones. I did a quick Google search and found this blog post, which described how the default installation leaves a lot of inputs turned on, even if they are not physically present. So I just followed the instructions to turn off the extra unused inputs, and presto, sound worked just fine!

Installing Applications

One thing that deserves a mention is the Synaptic Package Manager, it makes package installation and updates just so simple and straight forward, just brilliant

Installing Google Applications

There are 2 applications from Google that I use every day, and not being able to use them on Linux would be a showstopper for me, but I was not disappointed.

The first app, Picasa2, offered me several methods, and I probably chose the most complex, but also probably the best. All I had to do was follow the instructions to use the Google linux repositories and then install the application through the synaptic package manager

I thought I would be able to install my second Google App, Google Earth, the same way, it I couldn’t find it. Instead, I went to the Google Earth page, pressed the download link, and it must have detected that I was running Linux, because it automatically offered me a file called GoogleEarthLinux.bin. I just saved this to my desktop, opened a terminal session, changed to my desktop directory, and run “sh GoogleEarthLinux.bin”, and it installed Google Earth for me. Brilliant!

Suspend and Hibernate

I found that I could get Suspend to work, but most of the time, I prefer to use Hibernate, but try as I might, I couldn’t not get it to work, seems to be a very common problem. I did some looking around on Google again, and found this blog post about using another application called “uswsusp” to take care of it. I followed the instructions on that page, and I now have hiberbation working as it should!

Things left to do

I just have a couple of things left that I need to get working. The first is to get the AT&T Network Client configured so that I can connect into my work network and read my email. I have got it installed, but I can’t get it to connect. The windows version of the client has a lot more configurable items, some of which must be configured before it will connect, but I haven;t yet found how to configure those items on the Linux version, still working on it

The next thing that I have to do is get my Telstra NextG wireless network card (MF332) working so that I can connect whereever I am. I found a few guides on the net and have tried a few different methods, but have not had any success yet, I will post again when I do