Monday, 28 July 2008

TwinView with a Dell E248WFP

So I received my Dell 24 inch LCD finally, after being told they were out of stock for a while... The colour is certainly more vibrant than my new Precision M6300 laptop screen, but I don't know if it's a good vibrant...

My setup is two X screens side by side. The laptop is on the right, and the LCD in the centre. You can use the real nVidia twinview, which should require xinerama support where available, but I didn't like the second display not having it's own gnome panels.

Both displays are 1920x1200. I used nvidia-xconfig and some manual tweaking to get it right. Note I backed up my xorg.conf file first to xorg.conf-20080728 so that I could run nvidia-xconfig multiple times from the same starting point:

sudo nvidia-xconfig -c /etc/X11/xorg.conf-20080728 -o /etc/X11/xorg.conf --separate-x-screens --no-constant-dpi --use-edid --use-edid-dpi --damage-events --render-accel

Now, this default setup creates an xorg.conf file that places the login screen on the primary display - the laptop. Annoying if you have the LCD in the centre. Simply swapping "Screen 0" and Screen 1" in the ServerLayout doesn't work, as the first screen will still be assigned to the laptop. You must force which screen is the primary screen by using UseDisplayDevice. In each "Screen" section, add:
    Option         "UseDisplayDevice" "DFP-0"

for the laptop LCD (or DFP), and
     Option         "UseDisplayDevice" "DFP-2"

for the external LCD. You may find yours is DFP-1. I use the DVI so perhaps DFP-1 is for the VGA.

Take note of the Identifiers for the two screens, and change the serverlayout to show:
    Screen      0  "DefaultScreen (2nd)"
Screen 1 "DefaultScreen" RightOf "DefaultScreen (2nd)"


Then restart X. The 0th screen is the "primary" screen, which will have your log-in window and all your usual panels and applets. The 1st screen has a default blank Gnome installation (if you use Gnome), but with the same background.

You could rename the Identifiers to make them a bit more readable.

The resultant xorg.conf file is on pastebin.

poRblems:
So far, the EDID DPI detection doesn't work, so applications that support the DPI and resize themselves aren't doing so for me, depending on the screen. Emacs does look a bit wierd on a 24 inch monitor, when the DPI is set for a 17 inch LCD!

Saturday, 26 July 2008

hibernate a Dell Precision M6300 with nvidia-drivers

This is not a howto, just a collection of information that helped me.
$ uptime
22:05:42 up 9 days, 46 min, 1 user, load average: 1.78, 1.41, 0.91
Unfortunately, that will go back to 0, as I have to reboot for a new kernel!

So it appears there is some difficulty getting Nvidia's proprietary drivers to hibernate nicely. Had I known I might have stuck with an ATI video card for my next laptop (enter the Nvidia vs ATI flamewar. Of course, the whole argument is pointless, because everyone makes ultimatums like "I will never buy <brandname> again", based on one or two experiences, often with known old or buggy hardware.)

I have tried in the past to hibernate this laptop, but not succeeded. Common problems include:
  • Suspend ok, but resume locks up
  • Suspend locks up
  • Corrupted video, etc
Recently I decided to have another go. To my surprise, it worked without much hassle! Firstly, the specs:
  • Dell Precision M6300 (laptop!)
  • 64-bit Intel core-2 duo
  • nVidia Quadro FX 1600M with 256Mb RAM
  • 17" WUXGA 1920 X 1200 LCD
lspci identifies the video card as: 01:00.0 VGA compatible controller: nVidia Corporation Device 040d (rev a1) with the id: 10de:040d.

Now for the software. I use gentoo, but you'll be able to glean the relevant version number from these names:
  • tuxonice-sources-2.6.25-r3 and tuxonice-sources-2.6.26*
  • v86d-0.1.5.2 (Note: so far hibernate is incompatible with fbcondecor)
  • hibernate-script-1.99
  • nvidia-drivers-173.14.09
  • gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)
Instructions for installing and configuring are all over the web. Google is your friend! Two useful links:
Note1: I think the results are quite version specific, so try a number of combinations before you give up (yes, it's time consuming)
Note2: I use the filewriter, because I don't use swap <boast Who needs it with 4Gb RAM?!/> Look at my kernel config for more details.
Note3: Make sure you can suspend successfully without the nvidia kernel module installed first, otherwise this info will be of little use to you!

Also, my config files:
[Note these will be paste-binned soon]
Problems:
  • on resume, GL actions all have a delay of a few seconds before operating. eg. a GL screensaver will show nothing for 3 seconds before starting. You can fix this by stopping X, reloading the nvidia module, and restarting X.
*2.6.26 works much better with resuming - no great pauses, however Intel Wireless WiFi 4965AGN (IWL4965) doesn't work...

I think that's all you'll need to replicate my setup. Let me know your success / failure with other versions / distros!

Wednesday, 11 June 2008

8bit paintball

This is damn funny! Especially since my state has just legalised paintball (no-one has set it up yet though - I'm waiting...)



And now for the gratuitous ad. which I nicely didn't remove:

See more funny videos at CollegeHumor

For those RSS and syndicate followers, try this link!

Gentoo Linux Live USB key

From live CD image, to bootable USB key in only a few minutes! I didn't believe my friend when he told me how easy this is, and yet he was right!

Here's what I did, you may need to tweak it a bit for your setup (especially your usb device - it could be /dev/sd[a|b|c|...]. Firstly I used one 1Gb USB key / thumbdrive / flashdrive / whatever, because I use the live CD image. You could use the minimal CD image and use a smaller key. It appears to me as /dev/sdb.

Your PC might need to be capable of treating the USB filesystem as a CDROM, otherwise this may not work for you. Tell me about your success!

0. dd if=/dev/zero of=/dev/sdb bs=512 count=1

The reason I did this is because I had corrupted both the mbr and partition table of the usb key. fdisk simply told me "unable to seek on /dev/sdb" and wouldn't continue. Skip this step if you can fdisk ok.

1. fdisk -l; fdisk /dev/sdb; fdisk a partition!

I join these steps together, cause they're all related to creating the partition. Make one partition covering the entire device. Something like "n p 1 t 1 83 a 1 w" should do it. Note I made it bootable, and I'm not using FAT.

2. mkfs.ext2 -L liveUSB /dev/sdb

You'll notice I'm using ext2 here. Wait for the device to finish writing, then unplug and re-plug it, or mount it manually.

3. sudo mount -t iso9660 -o loop /home/iain/Desktop/livecd-i686-installer-2008.0_beta2.iso /mnt/tmp/

There are multiple ways to do this. This is the one I chose.

4. sudo rsync -avP /mnt/tmp/ /media/liveUSB

5. sudo grub-install --root-directory=/media/liveUSB --no-floppy /dev/sdb

6. reboot!


Remember to set your BIOS to boot from your USB drive. Now you have a live CD on a USB key. Much nicer than burning!

YMMV.

Edit: There are some more comprehensive and detailed howto's available with slightly different techniques:
http://www.gentoo.org/doc/en/liveusb.xml
http://gentoo-wiki.com/HOWTO_Gentoo_LiveCD_and_LiveUSB

Wednesday, 4 June 2008

GoogleEarth flight simulator

Last night I was thinking "GoogleEarth imagery would make a great backdrop for a flight simulator"...
  1. Start GoogleEarth (I have version 4.2.205.5730 on Gentoo Linux)
  2. Turn on the "terrain"
  3. Press ctrl-alt-a
  4. Choose between an F16 jet fighter, or an SR22 4 seat propeller aeroplane.
  5. Fly! The mouse works as the usual joystick controller (down=pull up; up=down, just as I like it!)
You have some other controls too: g (landing gear); up/down arrows (throttle); f (extend flaps); F (retract flaps). And yes - since you have landing gear you _can_ crash! Turn on the terrain option for a 3D view. I landed at my local airport! Not quite as smooth as my good ole Janes FA/18, but still very cool...

It may be a bit buggy - if it locks up just restart GoogleEarth, and choose from one of the default starting points.

Of course, I'm not the first to know - Google has fully documented the keyboard shortcuts!
 
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan