Sunday, May 20, 2007

Feisty Fawn

Got the Fawn today. No problems so far. On restart, it kept my external monitor also, which normally I was having to cycle via the laptop.

The upgrade process was simple, but annoying. Don't believe the 1.5 hour estimate, since that is based on you sitting in front of your computer and answering each of the popup questions. Don't get me wrong, I'm not bagging on the super-simple upgrade process. Just that I was wanting to get back on to work on some code for EPUC... And I kept checking in every 30 minutes and having to answer a very simplistic question. But, it is nice that I had the chance to answer the questions! Windows upgrades are never this nice.

So, just do what I did and start in the morning, check-in periodically, and go for a walk! Do some healthy stuff and then pull up a chair at your other computer :)

You know, now that I think about it this computer can do more stuff than my Win XP desktop could do... better audio support, better dvd support, and a much better file system interface. Things that are still troubling me are the trouble I had setting up Eclipse, and some other dev tools. I think that will be my next step down the road of enlightenment... Upgrading Eclipse and NOT using the standard included Eclipse due to silly GDK stuff.

Friday, May 18, 2007

DVD Player fun and games

And then there was light... but the light wouldn't play the dvd due to some issues.

My Inspiron 630m just doesn't want to play nice with the world, I suppose. No biggie, I've got my sound, widescreen external monitor, usb keyboard and mouse all working, so I can get this working.

The issue was a few fold:
  • Totem Player (and mplayer) weren't able to access /dev/dvd
    • /dev/dvd was a shortcut with "root root" permissions, that pointed to a device with "root cdrom" permissions... hmm... the learning from the audio issue!
    • I added my user to the cdrom group, just to be sure
  • Next, Totem read the obligatory warning from the DVD, then spouted an error!
    • I researched the error and found that the DVD was likely encrypted and required the libdvdcss2 and w32codecs packages installed
    • I tried "sudo apt-get install libdvdcss2 w32codecs", but got an error saying the package wasn't available.. hmm
    • I googled for a bit and found
      http://ubuntu.wordpress.com/2005/12/04/libdvdcss2-and-w32codecs-for-ubuntu/
    • But then... I got an error saying another package had a conflict. I had to remove mplayer and the reported package, but then I could install the packages successfully
I plugged in a DVD, Donovan's Reef, and it played Beautifully!!! I was so excited! It was playing! Then I realized my mistake... now I can play DVDs on my linux box... so now I have to fight my wife for my linux box... ah shucks!

Multiple Monitors... continued

Alright... my expedition continued... for way too long. I finally have a working external monitor, but due to the screen resolution differences between my video card and my monitor, I've had to settle for 1024x768 resolution and no side-by-side monitor configuration. No idea, why Xinerama doesn't play nice with this monitor, but I have a feeling it is the reasonably old laptop video card.

The laptop will start up correctly and will display the login screen correctly. I can use the Fn key to switch to ext monitor only. But when I switch to dual monitor mode, the external monitor clones the laptop screen and appears VERY fuzzy and in an incorrect resolution! When in laptop monitor mode, I can close the screen and the external monitor mode will activate after ~10-15s.

So really, all I've accomplished is getting a bigger screen with less real estate. Not my original intention, since what I really wanted was more screen real estate for developing in Eclipse. Really too bad. The problem, though, is that my monitor only supports high-end resolutions (1680x1050@60, 1280x720@60, and 1024x768@75 are the only valid resolutions!). The Intel graphics card does up to 1280x800@60... and 1024x768@60 is the one it has in common with the monitor.

I saw a bunch of posts saying that I could get multiple resolutions working, and that i could get an extended desktop working... but I've had very little success. I'll post to the Ubuntu forums... hopefully will get more detail there. Oh, and one more unfortunate detail... I have to switch modes around on every startup to get things configured correctly.

On a more successful note, I plugged in a Belkin USB Keyboard and Mouse and they worked like plug-n-play should! I was so impressed (after the monitor snafu for the past few days) that I decided to make a complete workstation... now I have a reasonably good workstation, audio setup... Next step is the DVD playing capability!

Anyway, here's the summary of my setup:

Dell Inspiron 630m

Ubuntu Edgy (upgraded via package manager from Dapper LTS)

Video: execute "lspci" from command line (lspci - List all PCI Devices)
jatal@hack-o-matic:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
Monitor:
Sceptre X20 hooked via VGA out on laptop
Configuration:
/etc/X11/xconf.org file (X Win configuration file):
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
FontPath "/usr/share/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
Identifier "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
Driver "i810"
BusID "PCI:0:2:0"
Screen 0
Option "DDCMode" "True"
Option "MonitorLayout" "LFP,LFP"
EndSection

Section "Device"
Identifier "Second Device"
Driver "i810"
BusID "PCI:0:2:1"
Screen 1
Option "DDCMode" "True"
Option "MonitorLayout" "LFP,LFP"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 28-51
VertRefresh 43-60
EndSection

Section "Monitor"
Identifier "Second Monitor"
Option "DPMS"
HorizSync 28-51
VertRefresh 43-85
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 8
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection

Section "Screen"
Identifier "Second Screen"
Device "Second Device"
Monitor "Second Monitor"
DefaultDepth 24
SubSection "Display"
Depth 8
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
Screen "Second Screen" RightOf "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
Option "Xinerama" "true"
Option "Clone" "false"
EndSection

Section "ServerFlags"
Option "Xinerama" "true"
Option "Clone" "false"
EndSection

Section "DRI"
Mode 0666
EndSection




Wednesday, May 2, 2007

Can you see this? Multiple Monitors

Admittedly, this isn't the first time that I had to figure this out. But before, I had three guys in a little room who had all dealt with the issue before... and their advice: "Copy my config file verbatim, change nothing, if you're monitors are backwards, physically switch them... don't mess with the voodoo magic if you get it reversely-correct!"

And now, due to personal career growth ambition I'm no longer in the little room... and regrettably, not with the three guys... so I need to figure it out for myself... and the details go here!

I'll try to do a better job of tracking the steps...

Oh, and a quick "raise the troops" for internet radio station di.fm (sky.fm). This station rocks and is in danger for public access! Support Internet Radio!!!

And back to the configuration fun and games (but at least I'm listening to music pumped by my newly enabled sound card! So it can be done!):

Okay, so I finally found a site with all my system's specs (and it wasn't dell, those cheap salespersons!): http://www.disgruntledgoat.com/content/useful/gentoo_on_nspiron630m.php which explains installation of gentoo linux and might also provide helpful information for us.
--> The point: My graphics card is apparently Intel i915PM with GMA900 graphics

Aside: I remember when first building this machine I had to install some new driver for the video card to enable the better resolutions... I can't remember, so post a comment if you know what I'm partially remembering (blame the beer!)

So I backed up my xorg.conf file like the smart website suggested, then moved forward with the edit. I then executed the reconfiguration step, and immediately hit a "question"... I need to select a video card driver, and mine isn't listed. I opted for the i810 option, and viola! it worked ( I think)... the description for my card initialized to "IntelCorporation Mobile 915GM...."

I clicked OK through a couple more screens and then "trusted" the Video card's bus identifier promt (OK). I specified the system should share 128 Mb of RAM, since the card shares RAM with the OS.

I then went ahead and enabled X to handle some operations.. we'll see if it causes bad things to happen. Autodetected keyboard layout... set the XKB rule to xorg (was the default)... Took keyboard mode pc104... left keyboard variant blank... left Keyboard options as "lv3:ralt_switch" (no idea)... Mouse protocol ImPS/2... Yes for emulate 3-button mouse... left default X.0rg server modules... wrote default "Files" section to XOrg file... auto-detected monitor (came up with Generic Monitor - quite original)... selected a few resolutions since I know I'll be using multiple monitors... monitor size of 14"... then, I said I wanted to write some "File" section... and the utility exited with output:

xserver-xorg postinst warning: overwriting possibly-customised configuration file; backup in /etc/X11/xorg.conf.{timestampHere}

No idea if it worked, so I'll just reboot and see if I need to restore from backup. Well, logout/in seemed to work, so now for the reboot... And then... the nasty happened! Got a DOS-like message: "Failed to start the X server......" OUCH!

So, now for recovery:

I viewed the log file, and it said something about bad modes being present... so I'm chicken and will be promptly restoring the backup copy of xorg.conf file!

login to the text prompt
cd /etc/X11
sudo cp xorg.conf_backup xorg.conf

Then restart from prompt:

sudo shutdown -r now

Btw, I have some experience with Unix (HP-UX mostly, and some Solaris, with a touch of Linux). So some of this is pulling from the depths of memory while administrating the computers for the OSU Research Forests... but I digress.

And now, when everything starts back up... X does too! Hmm... what to do next... Maybe I'll skip the reconfigure and go straight for the... err... multiple monitors! yes!

...More fun and games coming soon! Under construction....

Can you hear this? From Zero to Sound!

Hey, thanks for reading the blog. This is going to be a spot for me to write down my diary of working with Linux. I've been a Windows user and I really don't enjoy Apples (though I fully admit I haven't been able to buy one due to price, so I'm not tearing them down). And now, I'm moving to Linux for my home computer OS... well, not totally. I'm a gamer, so I need the windows PC... but I'm also a smalltime hacker (not a cracker) and Linux has all the tools I need to develop software that is actually usable and pretty (as opposed to just pretty).

So, Linux... the Road to Enlightenment has begun with the first step... about 7 months ago I got a job at a great Corvallis Startup (CleverSet), as opposed to another Corvallis Startup which shall not be named due to its evil leader spoiling all the fun we were having... but I digress. So yeah, Linux. I got an Ubuntu Live CD (Dapper Drake) from my cousin and was able to install linux as a dual boot on a low power windows xp home machine. Worked like a charm, zero problems!

But then I moved to a Dell Inspiron 630m (thanks D) to help with development on a website (eatpoopucat.com) and then things got "not so pretty". Don't get me wrong; The OS worked great, but there were little things like sound card and multiple monitors that weren't working... and still aren't... but now, I want to get the damn things working! So I started googling for the solutions... and still haven't got too far... so I realize the need for "yet another linux noob site"... since I'm the linux noob!

So, the first post to the blog will be the diatribe of my efforts to get my sound card working. I've got Edgy (Ubuntu 6.10) installed now... I started from a Dapper live cd (Ubuntu 6.06 CD that is bootable and loads OS into memory).

Note: at this point, if you are lost, the best way to start is to go to ubuntu.com and request a live cd be delivered to your place of residence. You pop it in your CD drive, reboot, and !presto! Linux will load!

The other way to get a live CD is to download an ISO from Ubuntu and burn a CD from the ISO image. I *highly* recommend ISO Recorder because it is so simple, and often you're burning from Windows if you're burning a Live CD. Anyway, one problem I had is that ISO Recorder hung after it finished burning the Live CD. But, that is life in XP (and sometimes Ubuntu too, so don't get too cocky!)

So, summary of my effort so far (since my mission here is to remember what the hell I did so nobody else can forget):
  1. What sound card do I have? I found a helpful site that seemed to describe the same problem I was experiencing. So I tried out alsamixer (sudo alsamixer) and unmuted everything. Still, the volume control on my desktop was muted! Then, I execued "modinfo snd-hda-intel" and yes, I have the module loaded (lots of output, I guess). I changed the permission on several directories... I reloaded modules... I did all this SH@T and then............................................. I added my user to the "audio" group.....................
Okay, then when I logged in... I got the beautiful Ubuntu login noise! This happened less than 1 minute ago, so I'm totally pumped! And here is the site where I went to find this solution: http://www.hants.lug.org.uk/cgi-bin/wiki.pl?LinuxHints/DebianTips.

Btw, Debian (as I understand) is the source of Ubuntu... but Debian releases are a bit slow... though they totally rock according to my friends who know much more about Linux than me. Me, I'm just a hacker... smalltime, but sometimes I swear I see into the computer and feel the bits flipping while I'm coding... but I digress. So, now the sound is working and I'm all happy inside. Time to upgrade this Dapper to Feisty Fawn!