Archive for the ‘Linux’ Category

Install NVIDIA Display Drivers: Ubuntu 10.04, Sony VAIO F Series July 26th, 2010

Mike

I recently bought a Sony VAIO F Series laptop (VPCF11Z1E, to be precise). It has a GeForce GT 330M installed and I decided I wanted to dual boot with Ubuntu 10.04. I thought that enabling the 3D acceleration would be as simple as turning on the restricted driver, but I was sadly mistaken. Here’s how to get it working.

Head over to the download section on NVIDIA's web site and obtain the appropriate driver. Place it somewhere you can easily find it; the Downloads folder in my home area worked fine for me. The way I got the driver installed was to (broadly speaking) following the instructions found in a post on the Ubuntu Forums, specifically TheRawGod's post (thanks :) ).

First I blacklisted some drivers. To do this open a terminal and use the following commands. Note that I like to use vim (Vi–IMproved) but you will need to install this (sudo aptitude install vim). If you want something really straightforward, just use nano. I also tend to kick off with a sudo su so I can just do everything as root.


sudo su
cd /etc/modprobe.d/
vim blacklist.conf

Add the following to the end of the file:


blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv

Drivers to blacklist

Drivers to blacklist

Once completed, save the file. The next step is to update GRUB so it will prevent the nouveau driver from loading automatically at startup. To do this, perform the following:


cd /etc/default
vim grub

Now add GRUB_CMDLINE_LINUX=”nouveau.modeset=0″ at the bottom of the file.

Disable nouveau driver

Disable nouveau driver

Save the file and invoke update grub. Reboot and you should be presented with a horrible looking low-res login (which is good, for now!).

Next you will need to install the NVIDIA driver you downloaded earlier. Press Ctrl-Alt-F1 to bring up a Teletype terminal and login. Then run the following commands (replace the location for that of your download) to get the driver installed.


sudo su
service gdm stop
cd /home/mike/Downloads
sh NVIDIA-Linux-{driver version}.run

Follow the on–screen prompts to install the NVIDIA driver (just accept the defaults and always choose to continue). If you are told that you have an X server running and have definitely stopped gdm, try the following:


rm /tmp/.X0-lock

Once the driver is installed, there is a final step to make sure the Sony display panel is properly recognised by NVIDIA's driver. Run the following commands:


cd /etc/X11
vim xorg.conf

Add the following lines to the bottom of the file, immediately before the “Display” SubSection:


Option "ConnectedMonitor" "DFP-0"
Option "CustomEDID" "DFP-0: /proc/acpi/video/NGFX/LCD/EDID"

Note that I originally added this to the end of the “Device” Section, but a subsequent reinstall of the NVIDIA driver after a kernel update caused it to be placed in the section referenced above.

Edited Screen Section

Edited Screen Section

Please remember that you will need to be root or use sudo to execute most of the above commands. I also found that after a kernel update, it is necessary to repeat the driver install from the point where I stop the Gnome Display Manager (run Ubuntu in low–graphics mode one time only, switch to a Teletype terminal, stop the Display Manager and reinstall the driver).

Continue reading...


 

Windows XP AHCI Mode Install Hangs January 10th, 2010

Mike

Recently I decided to reinstall Windows XP Pro on my home desktop. Yes, I know, Windows 7 is out and far superior but I have some music software that only runs well on XP as well as having already paid for XP… just bear with me!

I won't go overboard, but here are the relevant technical details: ASUS P5B Deluxe motherboard with Intel ICH8R onboard SATA controller and 3 x 250GB SATA HDDs. I used to have two of these in RAID 0 (yes, I have backups) but I decided that the performance benefits vs. just sensibly placing things on different drives wasn't worth the extra risk. So, for my reinstall I would be moving from RAID mode in the BIOS to AHCI mode.

I backed up everything, flashed the BIOS with the latest version (good time to do it when I am reinstalling anyway), set all my settings and flipped the ICH8R to AHCI mode. As I expected, my old XP install no longer booted as it was configured for RAID mode with the appropriate driver. Linux coped fine, though :) . I popped in the XP Pro SP2 CD, hit a key when prompted and watched the message: Setup is inspecting your computer's hardware configuration. After that, nothing. No chance to hit F6 or anything. Just a black screen. I even left it for ages in case it would finally realise it couldn't read the disks yet. No joy. Hmmm.

Basically, there seemed to be some issue with the fact that the setup CD could understand that there was an operating system installed but not properly read it and it was getting stuck. OK, no bother, whack in a Linux live CD and nuke the disks. In case you are interested, I like using badblocks in write mode but anything that destroys the partitions would do I expect.

Right, attempt number 2 (well actually a much higher number, but if you are reading this you don't need to follow my mistakes!): this time I get to the F6 prompt, add the AHCI driver from a floppy (drive hanging out of the side of the PC – why would I have a floppy drive on a modern PC?) and Windows sees the disks. Great! Actually, no. This time it sees 1 x 250GB disk and a 500GB disk that it cannot access (the old RAID array). Having selected AHCI in the BIOS and the AHCI driver this did surprise me. No problem, back in the BIOS and enable RAID then into the RAID BIOS and delete the array. Back in the BIOS again, enable AHCI.

Attempt number 3 and we have success! 3 x 250GB disks detected (after using the F6 option to add the driver) and I install Windows XP.

So in summary, if you want to reinstall Windows XP and go from one SATA controller mode to another, my tips would be:

  • Break any RAID arrays in the RAID BIOS
  • Delete any existing partitions on your disks
  • Make the BIOS changes you require
  • Boot to the setup CD and slipstream the correct driver

Simple when you know how! As an aside, I was installing from a SATA DVD drive and that caused no issues (I saw some people report that this is a problem). I know this wasn't part of the problem because I even had another 'donor' machine next to my desktop at one point so I could try installing from an IDE optical drive…

Continue reading...


 

Joining FLAC files March 31st, 2009

Mike

I just bought myself a shiny new portable audio player (I was about to write MP3 player but realised I didn’t buy it to play MP3s primarily so that would have been somewhat redundant). I went for a Cowon iAudio 7 (Silver, 16GB). There were a few reasons for this:

  1. Up to 60 hours of battery life (claimed)
  2. 16GB flash memory
  3. Reasonable price (less than £120 inc. postage at time of purchase)
  4. Generally good reports of sound quality
  5. Ability to play many audio formats (particularly FLAC).

Why are those things a big deal? Well, battery life is because I see this as a very sensible alternative to buying a CD changer for my new car (probably cheaper and I can take it to my next car). Sound quality is important because anyone that knows me also knows I’m an audiophile. Finally, the killer feature is the ability to play many formats, in particular FLAC. Being an audiophile, I’m moving towards ripping CDs as FLAC instead of MP3.

However, I’d read there was one gotcha – a lack of support for gapless playback. The solution? Well, rather obviously, rip mix CDs as one file (I don’t care about skipping tracks in the car). Hang on, surely there’s a way to combine FLAC files automatically, I thought (since I’m not going to want to rip/store only one file on my HDD). The answer is the rather useful shntool. A very simple command line tool (available for Linux and Windows – I like it already :) ) that will stick together a bunch of audio files and spit out a WAV (or, with a bit of work and very simple scripting, another compressed audio file).

I’ve used it on Windows only so far and simply stuck it in a directory that I added to the PATH environment variable. I did the same for the FLAC tools. The really neat part of this is that shntool can read a list of files to stitch from a text file. So, if you rip with something like CDex and create a playlist, you can then feed shntool the playlist to stick the files in order. Brilliant! Then run the WAV through the FLAC encoder again and you have one big file. If you’re feeling adventurous, shntool supports supplying a choice of encoder and parameters to do the whole thing in one go. So far I’ve been lazy, so all I do is something like this:


shntool join -F playlist.m3u
flac -o mixname.flac -8 joined.wav

Continue reading...