Dodgy SSD

22 June 2009

This morning, on the train to TAFE, I fired up my Eee 901, resuming from standby. I was greeted by some pretty morbid messages in my tty:

[ 1589.499104] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
[ 1589.499113] ata2.00: BMDMA stat 0x4
[ 1589.499125] ata2.00: cmd c8/00:20:00:00:00/00:00:00:00:00/e0 tag 0 dma 16384 in
[ 1589.499128]          res 51/84:00:00:00:00/00:00:00:00:00/e0 Emask 0x10 (ATA bus error)
[ 1589.499134] ata2.00: status: { DRDY ERR }
[ 1589.499139] ata2.00: error: { ICRC ABRT }
[ 1589.499180] ata2: soft resetting link
[ 1589.685741] ata2.00: configured for UDMA/66
[ 1589.692501] ata2.01: configured for UDMA/66
[ 1589.692524] ata2: EH complete

And the OS promptly crashed. I rebooted, and GRUB told me that it “Could not load operating system”. Great.

I did an fsck, and I saw the most number of errors I’ve seen in my life, seconded only by the time I mounted my Linux drive in Windows using the Ext2 IFS driver, and Windows crashed.

fsck found lots of orphaned files. My /lost+found directory was 2.5GB in size. /etc was only 8.0K in size. It didn’t boot.

So, I tried to reinstall by using my trusty Ubuntu 9.04 on my USB flash drive. I repartitioned /dev/sda, but the Ubuntu installer subsequently bombed out, complaining it couldn’t mount the drive.

I’m typing this from my live USB. Luckily Ubuntu 9.04 comes with OpenOffice.org 3.0, and I’ve been able to copy my fonts from my second SSD, which was unharmed, so I can work on my assignments.

I fear the SSD is stuffed.

New monitor

13 May 2009

I now have a shiny new BenQ G2220HD monitor. The resolution is 1920×1080, which means it can draw 1080p movies at their native resolution. I tried Big Buck Bunny on it, and it looks fabulous!

BenQ G2220HD

After a few minutes of use, a pixel on the right hand side went bright red, and stayed like that for a few minutes. Fortunately, pressing on it lightly made it go away. Here’s hoping it stays that way, as MSY Computers apparently tries to make it as hard as possible for you to return the device after seven days (regardless of legal requirements).

Perhaps the main reason for me getting the monitor is so I can pass my existing 17-inch HP L1740 on to Alec, who until now was stuck with a crappy Digital CRT monitor that only supports 1024×768 at 60hz, has become blurry with age, and the screen flickers off and on every few minutes.

Not only that, but multitasking will be made more awesome. At Campbelltown TAFE last year, I got to use the computers in the web design room, which were also widescreen monitors. I noticed I was far more productive being able to have a code editor and web browser on the screen at the same time, not overlapping, and at readable widths.

How to get X.Org working on an Apple eMac (ATI Radeon 7500)

20 February 2009

About 8 or so months ago, I bought an Apple eMac, which came with a DVD drive, 1GHz PowerPC processor, 1GB of RAM, and an ATI Radeon 7500 video card.

One of the first things I did was attempt to install Linux on it. Ubuntu 8.04 was my first try, and I was annoyed to find that I couldn’t get a picture with Xorg on it — just a blank screen. I also tried Debian Etch, Debian Sid, and Fedora 8, which also had the exact same symptoms.

The only Linux distro that worked was openSUSE 11, but I couldn’t stand openSUSE because it was slow, YaST was painful to use, I hated RPM, and they customised GNOME way too much.

Initially, I thought it was a refresh rate problem. I have gathered that the optimum screen mode for the eMac is 1024×768 @ 89Hz. Because Ubuntu was trying to set the mode to 1280×800 @ 60Hz by default, I added a modeline for the proper mode. However, that didn’t fix my blank screen, and I almost gave up in despair.

I also ran xrandr under a tty, and it was interesting to see that it thought my Mac had DVI hardware — DVI-0 and DVI-1. The eMac most definitely does not support DVI, so this told me the issue was a little more advanced than refresh rates.

On Saturday, while talking to the friendly folks on #gentoo-powerpc, one of them pointed me to this page (Update: the link is an equivalent page, as the original link is now gone), which contained some ConnectorTable hacks. As it turned out, the hacks worked! Both internal and external VGA worked (internal VGA was called VGA-1, and external VGA was called VGA-0), which makes me really happy.

So, to get X.Org working on your eMac, make the following changes to xorg.conf.

First you need to define the Modeline for the video mode:

Section "Monitor"
  Identifier   "Configured Monitor"
  # 1024x768 @ 89.00 Hz (GTF) hsync: 72.00 kHz; pclk: 99.07 MHz
  Modeline "1024x768"  99.07  1024 1088 1200 1376  768 769 772 809  +HSync +Vsync
EndSection

Then, tell it to use the video mode:

Section "Screen"
  Monitor    "Configured Monitor"
  # Fill in self-explanatory data here.
  SubSection "Display"
     Viewport   0 0
     Depth     24
     Modes   "1024x768"
  EndSubSection
EndSection

Fix the broken ConnectorTable:

Section "Device"
  # Fill in device information here.
  Option      "ConnectorTable" "100,1,0,1,108,2,0,1"
EndSection

After you do that, you should have a working X display. If you still get a blank screen, switch to a tty, run export DISPLAY=:0, run xrandr, and check to see that the eMac is using the correct resolution. Make sure DVI is not mentioned.

The photo by Oswald using -HSync +Vsync depicts the eMac with the picture off-centre. This is because -HSync +Vsync (the default) is wrong! Use +HSync +Vsync, and your picture will be in the centre of the screen.

Instead of the ConnectorTable hack above, one user from the Ubuntu forums points out that it is possible to get a picture by adding the following code to the Device section:

Section "Device"
  # Device information goes here.
  Option "monitor-DVI-0" "iMac"
EndSection

This is not as good a solution as setting ConnectorTable, as the external VGA monitor does not work with this set.

If you used this information to try and fix X on your eMac, please let me know in the comments so I know whether it was helpful or not! Thanks!

Bought an Eee PC

8 December 2008

Well, today, I got an ASUS Eee PC 901. I’m totally jumping on this netbook bandwagon.

For me, I’ve found that I actually don’t need all that much power. In fact, I have a ~5-year-old laptop with a 2.0 GHz Pentium 4 M processor. The Eee 901 has a 1.6 GHz Intel Atom, which is (technically) 400 MHz slower. These days, speed is much of a muchness. It is more about making power usage more efficient, and becoming more mobile.

The laptop I currently have is a 15-inch Evo N610c, which I simply find too bulky to lug around. I find that when I’m going somewhere where I want to crunch bits but don’t want to be burdened with lugging a laptop around, I take my OLPC XO-1 with me, which powers on from standby in less than a second, and can instantly connect to a wireless access point. However, this is abuse of my XO, as it is not really practical as a mobile workstation, which I often use it as one (in addition to hacking on Sugar).

So, the Eee 901 fulfils my desire for increased mobility perfectly. I’ll find invaluable the Intel 945 graphics, solid state drive, webcam, Bluetooth, WiFi (802.11n), and the ginormous 8-hour battery life. It’ll be able to do everything I can do with my current laptop, and more.

I’ve installed Ubuntu Netbook Remix (referred to me by Jeff Waugh), which is a super-slick user interface for Ubuntu designed for small screens. I’ve already tried out the Remix on my existing laptop (though running it on a 15-inch screen is a bit of a waste), and it performs well, and looks awesome.

I’m totally impressed with this laptop’s performance. I connected it up to my VGA monitor, and ran a fullscreen video at 1280×1024 — perfectly smooth playback. Also, I was quickly able to start an Ekiga video chat using the in-built webam.

The things that didn’t work out of the box in Ubuntu were the function key shortcuts (e.g. brightness/volume controls), the WiFi, and the webcam. Getting the webcam working was easy — it is simply disabled in the BIOS by default (I presume to ensure user privacy). Getting the keyboard shortcuts and WiFI was fixed in one fell swoop by installing the linux-eeepc-lean kernel from the Array.org Eee PC Ubuntu Repository, which adds hardware support for the Eee’s devices.

Linux S-video output on Mobility Radeon 7500

25 September 2008

For ages, I have been trying to get S-video output on my Mobility Radeon 7500 (driver radeon) in Linux with no success.

From some initial Googling, I nearly died when I found out I’d have to compile some GATOS driver to get some form of TV-out. Today, however, I stumbled across a set of three commands that worked for me with no such recompiling necessary:

xrandr --addmode S-video 800x600
xrandr --output S-video --mode 800x600
xrandr --output S-video --set tv_standard pal 

Those instructions only apply to RandR 1.2–powered boxes (i.e. Ubuntu 8.04 and above) — if you have an earlier version, I have no idea what to do. Upgrade.

The above code will set your TV-out to 800⨯600. For some reason, 640⨯480 does not work for me.