I built a computer several years ago, and until recently it was chugging along just fine. It was a little slow, and a little short on RAM, but it suited my needs just fine.
After taking a Windows 7 update, I noticed that my sound was no longer working correctly. Rather than emitting a normal sound, it would just emit static until the end of the sound when it sounded vaguely like it should.
Assuming a sound driver problem, I scoured the internet for a driver for the onboard CM-1801 chip for Windows 7 and came up empty handed. Apparently, the company that makes these audio chips are know for providing very little support. This chip was from the Windows XP and Vista era, but it was never officially supported on Windows 7.
I next queried some of my friends to see if anyone had an old sound card for which I could find Windows 7 drivers. I got a few cards in response, one of them didn't work, and the other had no Windows 7 support (Creative Labs Sound Blaster 5.1)
Then someone told me to just get a USB sound card. A what? I never heard of such a thing. A quick search on NewEgg.com led me to the solution. USB dongles that look much like a memory stick, but that have 1/8" jacks on the opposite end to connect headphones and microphones!
$13 and a week later, it showed up. I plugged it in, Windows 7 installed the driver, and my glorious sound was back! Now, if you are a Dolby Pro 5.1 or higher power audio user, you may be out of luck, but simple stereo is all I need from my computer.
As I overcome various hurdles, I wanted a way to keep track of the problem and solution so that I can either point others to my solutions when they ask, or so that I can refer back when I ultimately forget the solution...
Wednesday, August 3, 2011
Thursday, July 14, 2011
Configuring DNS in Ubuntu
My company recently added a primary and secondary DNS server, but I was unable to resolve any of the server names to IP addresses after configuring the name servers.
The file /etc/resolv.conf contains the following
Which seemed perfectly reasonable, yet running a nslookup resulted in:
I instead tried a reverse lookup using nslookup, specifying the IP of the server I wished to connect to, which returned my first clue
It appears that the domainname was required in my lookup. So I searched for servername.domainname.com and got the IP address as I would have expected.
This led me to the man page for resolv.conf, which identified the domain configuration option, and the following contents for resolv.conf
Now running nslookup servername returns the IP for the computer.
The file /etc/resolv.conf contains the following
nameserver 192.168.1.164
nameserver 192.168.1.48
Which seemed perfectly reasonable, yet running a nslookup resulted in:
** server can't find mycomputer: NXDOMAIN
I instead tried a reverse lookup using nslookup, specifying the IP of the server I wished to connect to, which returned my first clue
servername.domainname.com
It appears that the domainname was required in my lookup. So I searched for servername.domainname.com and got the IP address as I would have expected.
This led me to the man page for resolv.conf, which identified the domain configuration option, and the following contents for resolv.conf
domain rocsoft.com
nameserver 192.9.200.164
nameserver 192.9.200.48
Now running nslookup servername returns the IP for the computer.
Wednesday, June 15, 2011
I love KDE's new addition: Activities
As a developer I find myself desiring a way to segment the many applications I end up running which clutter both my task bar and my screen. I've tried using virtual desktops, where you have N screens on which you can place applications, with only one showing at any point in time. I've always found the management of the application on the screens and the switching to screens less than seamless.
Perhaps it's because I'm a gmail fan that I like what the developers of KDE have implemented in Activities. Activities are tags on a window, like Googles tags on an email message. You define your activities and associate your applications with a tag. When you switch to a new activity, only the applications with that tag are shown. Smartly, only the applications appropriate for the current activity are shown in the task bar also, further reducing clutter. Additionally, only desktop widgets for the proper activity are displayed
For example, I have a Development activity that includes Eclipse, DB-Visualizer, Chrome, and a terminal window. I also have a Overhead activity that includes LibreOffice, Kontact and Chrome. When I activite my Development activity, I only see Eclipse, DB-Vis and Chrome. When I activate my Overhead activity, I only see Kontact, Office and Chrome.
I found it best to use with the addition of a panel that lists my activities. So I just click on Development to see my development toolset. Email notification? Click on the Overhead activity and development windows disappear and I see my email. After processing the email, I just click back to Development and pick up where I left off.
Here's how it looks, and know in your heart that I'm running Eclipse, DB Vis, Kontact, Kopete, Chrome, Firefox, KRDC, Amarok and Terminal. This is my "clean" activity.

So my activities are "Escalation" (things related to dealing with customer problems, "Development" (things related to developing new features or fixing bugs), "Overhead" (things like email, time tracking) and "Desktop" (a clean area for clearing my mind).
KDE also provides some template activities like Photos, Newspaper, Search and Launch.
Perhaps it's because I'm a gmail fan that I like what the developers of KDE have implemented in Activities. Activities are tags on a window, like Googles tags on an email message. You define your activities and associate your applications with a tag. When you switch to a new activity, only the applications with that tag are shown. Smartly, only the applications appropriate for the current activity are shown in the task bar also, further reducing clutter. Additionally, only desktop widgets for the proper activity are displayed
For example, I have a Development activity that includes Eclipse, DB-Visualizer, Chrome, and a terminal window. I also have a Overhead activity that includes LibreOffice, Kontact and Chrome. When I activite my Development activity, I only see Eclipse, DB-Vis and Chrome. When I activate my Overhead activity, I only see Kontact, Office and Chrome.
I found it best to use with the addition of a panel that lists my activities. So I just click on Development to see my development toolset. Email notification? Click on the Overhead activity and development windows disappear and I see my email. After processing the email, I just click back to Development and pick up where I left off.
Here's how it looks, and know in your heart that I'm running Eclipse, DB Vis, Kontact, Kopete, Chrome, Firefox, KRDC, Amarok and Terminal. This is my "clean" activity.

So my activities are "Escalation" (things related to dealing with customer problems, "Development" (things related to developing new features or fixing bugs), "Overhead" (things like email, time tracking) and "Desktop" (a clean area for clearing my mind).
KDE also provides some template activities like Photos, Newspaper, Search and Launch.
Monday, June 6, 2011
The bat of 2011 - part 2
I periodically opened the door a crack to get a glimpse of our visitor having his way with our bedroom. Zoom, zip, swoop, then finally a landing. He landed first on the curtains near the open window, looked around a bit, then climbed down to the floor.
Bats are actually kinda cute when they're crawling. He was turning his head left and right, looking for the Exit sign, but not finding one. So he started flying again.
He landed a second time beneath the curtains on the floor and crawled along the baseboard. I was ready to jump in with my shoe box to catch him, when I saw him jump/fall into the heat/ac register on the floor. The openings are quite literally an inch square and he just plopped right in like they were sized just for him.
I rushed into the room and put a big piece of cardboard over the register, then ran down to the basement to close the vent off. Now he was trapped in the ductwork. I tossed around in my head what my next move would be, but ultimately decided to return to sleep since I had to wake up at 5:30am to teach a Spinning class.
So having had naughty Mr. Bat trapped, I carried on with my day. I came home tonight and rigged up an intricate system of levers and pulleys to trap Mr. Bat. Actually I made a little tightly contained chute leading from the vent to the window.
At about 9:30, Mr. Bat showed his ingenuity by escaping and terrorizing Anne and the kids. This time I trapped him in William's room. I peeked in and there was no activity. Poor dude was probably tired. Anyway, I found him on the back of a curtain. I carefully lowered the upper pane of the window and coaxed him out!
I hope that's the end of the saga, as the Bat Man (batproofer) is coming over tomorrow to figure out how they're getting in and seal it up for us.
Keep your fingers crossed that he can fix it and that the bat that I let out was the same bat that got in last night. (the other possibility being a second bat)
Bats are actually kinda cute when they're crawling. He was turning his head left and right, looking for the Exit sign, but not finding one. So he started flying again.
He landed a second time beneath the curtains on the floor and crawled along the baseboard. I was ready to jump in with my shoe box to catch him, when I saw him jump/fall into the heat/ac register on the floor. The openings are quite literally an inch square and he just plopped right in like they were sized just for him.
I rushed into the room and put a big piece of cardboard over the register, then ran down to the basement to close the vent off. Now he was trapped in the ductwork. I tossed around in my head what my next move would be, but ultimately decided to return to sleep since I had to wake up at 5:30am to teach a Spinning class.
So having had naughty Mr. Bat trapped, I carried on with my day. I came home tonight and rigged up an intricate system of levers and pulleys to trap Mr. Bat. Actually I made a little tightly contained chute leading from the vent to the window.
At about 9:30, Mr. Bat showed his ingenuity by escaping and terrorizing Anne and the kids. This time I trapped him in William's room. I peeked in and there was no activity. Poor dude was probably tired. Anyway, I found him on the back of a curtain. I carefully lowered the upper pane of the window and coaxed him out!
I hope that's the end of the saga, as the Bat Man (batproofer) is coming over tomorrow to figure out how they're getting in and seal it up for us.
Keep your fingers crossed that he can fix it and that the bat that I let out was the same bat that got in last night. (the other possibility being a second bat)
The bat of 2011 - part 1
I pray that it's the only one this summer.
As I lay in bed, resting soundly, I was awakened by a small bump. Anne frequently opens the window but not the blind, so I just assumed it was the blind blowing in the wind and bumping against the window frame. Then I heard the flutter of a wing and knew the terrible truth that would prevent me from getting a good nights sleep. A bat had broken through our perimeter defenses.
I opened my eyes and my worst fears were realized. A bat doing laps around the bedroom ceiling. I leaned over and tapped Anne. Startled, she yelled "WHAT?!" There's a bat in here. "WOOOOOO", and the sheets were pulled over her head. She apparently believes the myth about bats getting caught in womens hair.
So we both laid there waiting for each other to make a move. Finally I said "lets proceed in a calm and orderly fashion to the door", and we made our move. Thankfully, we were able to close the bedroom door behind us with the bat trapped in the room.
I peeked in, opening the door a crack to verify that the little jerk was still doing laps looking for an exit strategy. This went on for about 5 minutes.
Read on! Part 2
As I lay in bed, resting soundly, I was awakened by a small bump. Anne frequently opens the window but not the blind, so I just assumed it was the blind blowing in the wind and bumping against the window frame. Then I heard the flutter of a wing and knew the terrible truth that would prevent me from getting a good nights sleep. A bat had broken through our perimeter defenses.
I opened my eyes and my worst fears were realized. A bat doing laps around the bedroom ceiling. I leaned over and tapped Anne. Startled, she yelled "WHAT?!" There's a bat in here. "WOOOOOO", and the sheets were pulled over her head. She apparently believes the myth about bats getting caught in womens hair.
So we both laid there waiting for each other to make a move. Finally I said "lets proceed in a calm and orderly fashion to the door", and we made our move. Thankfully, we were able to close the bedroom door behind us with the bat trapped in the room.
I peeked in, opening the door a crack to verify that the little jerk was still doing laps looking for an exit strategy. This went on for about 5 minutes.
Read on! Part 2
Thursday, January 13, 2011
cd command with two arguments to do directory substitution
At some place I've worked in the past I had the ability to issue a CD command with two parameters. Extensive googling for this resulted in nothing, so I wrote this bash function to do it.
Using 'cd' in this mode will replace the first occurrence of the first parameter with the second parameter. The simplest use case is changing from classes to src directory when in a deep directory structure:
$ pwd
/home/rcs/project/src/com/xyz/custom/some/really/deep/path
$ cd src classes
$ pwd
/home/rcs/project/classes/com/xyz/custom/some/really/deep/path
It's not bullet proof, but it's decreased the achyness in my typing fingers!
EDIT - I found a few bugs with the function; namely I could not change dir to a directory that contained spaces. Once I made a change to correct this problem, I could no longer issue 'cd' to return to my home directory.
Here are my change to correct these problems:
Using 'cd' in this mode will replace the first occurrence of the first parameter with the second parameter. The simplest use case is changing from classes to src directory when in a deep directory structure:
$ pwd
/home/rcs/project/src/com/xyz/custom/some/really/deep/path
$ cd src classes
$ pwd
/home/rcs/project/classes/com/xyz/custom/some/really/deep/path
function cd {
if [ -z $2 ]
then
builtin cd $1
else
builtin cd `echo $PWD | sed s/$1/$2/`
fi
}
It's not bullet proof, but it's decreased the achyness in my typing fingers!
EDIT - I found a few bugs with the function; namely I could not change dir to a directory that contained spaces. Once I made a change to correct this problem, I could no longer issue 'cd' to return to my home directory.
Here are my change to correct these problems:
function cd {
if [ -z "$2" ]
then
if [ -z "$1" ]
then
builtin cd
else
builtin cd "$*"
fi
else
builtin cd `echo $PWD | sed s/$1/$2/`
fi
}
Tuesday, January 11, 2011
KDE Kontact using 100% CPU
I observed a problem with Kontact maximising one of my four cores periodically. After extensive Googling, it seemed that I alone was having this problem, and so began my analysis.
Since it wasn't happening continuously, I figured it was a periodic event and the most likely periodic event was a POP3 mail check. I disabled "interval mail checking", but that didn't resolve the issue. It would still periodically consume 100% of one of the CPU cores.
On a whim, I decided to use the telnet command to connect to my POP server. After authenticating and issuing the list command, I observed a LONG LONG pause. I waited nearly 5 minutes before I got the response back, 19k messages and hundreds of megabytes!
At every interval mail check (set at 5 minutes), I was asking the POP server to count the number of messages and number of bytes in those messages. To resolve it, I added an automatic archival of messages older than 6 months on my mail server, dramatically lowering my inbox size, resulting in a minimal delay when checking for new mail, and no noticeable CPU usage!
As to why Kontact was using 100% CPU while simply waiting for a response from the POP3 server, that is still unresolved.
Since it wasn't happening continuously, I figured it was a periodic event and the most likely periodic event was a POP3 mail check. I disabled "interval mail checking", but that didn't resolve the issue. It would still periodically consume 100% of one of the CPU cores.
On a whim, I decided to use the telnet command to connect to my POP server. After authenticating and issuing the list command, I observed a LONG LONG pause. I waited nearly 5 minutes before I got the response back, 19k messages and hundreds of megabytes!
At every interval mail check (set at 5 minutes), I was asking the POP server to count the number of messages and number of bytes in those messages. To resolve it, I added an automatic archival of messages older than 6 months on my mail server, dramatically lowering my inbox size, resulting in a minimal delay when checking for new mail, and no noticeable CPU usage!
As to why Kontact was using 100% CPU while simply waiting for a response from the POP3 server, that is still unresolved.
Subscribe to:
Posts (Atom)