Get Basic 2D NVIDIA Working on Debian Linux for Optiquest Q22wb Monitor

I have an Optiquest Q22wb monitor, a wide screen monitor with a 1680×1050 resolution. I installed Debian 4.0 (Etch) on my system, and the installation kept going to a 1600×1200 resolution. Entering 1680×1050 into my xorg.conf file made no difference.

After some research, I realized that the problem was that I was using the VESA driver as my “Generic Video Card” in xorg.conf. I had looked into installing the full nvidia driver that seemed to match my video card, but that was complicated, so I reverted to the VESA driver.

Finally, I found the NvidiaGraphicsDrivers page on the Debian Wiki: http://wiki.debian.org/NvidiaGraphicsDrivers. Here I found that Debian comes with a basic, free 2D Nvidia driver named “nv”.

I replaced the “vesa” setting in xorg.conf with “nv”, logged out and re-logged in, and my screen went immediately to the 1680×1050 resolution I had specified as my default in xorg.conf!

There was still one problem: when the monitor autoadjusted, it put the top menu bar out of sight. If I manually adjust the vertical size, I can bring the menu tabs into view.

My temporary solution is to move the menu bar to the right side of my screen. This is easy to do if you’re using the XFCE window manager (which I just switched to).

So, using the “nv” driver instead of “vesa” has given me my 1680×1050 resolution. Images now look normal instead of being horizontally stretched. Now, if only I could get the letters in applications to look clear!

Fix Debian Etch Flash Problem by Deleting swf-player

A very strange solution to a problem that has been ongoing on my new Debian Etch installation: I was not able to view any Flash content in my web browsers. I followed the instructions that came up in my browser about installing the necessary plugin. After I did that, Flash content still didn’t work. Instead, every Flash area on a browser page showed this message:

“This SWF file is known to trigger bugs in the swfdec decoder. Playback is cancelled.”

A search for this issue returns many pages, such as Debian bug report #415236. It looks like the problem is resolved in later versions of swfdec, but these later versions are not part of the standard Etch package list.

Among all the pages I browsed, one person talked about seeing the Flash problem go away after he removed some swf-related Debian packages. So, I decided to experiment along these lines. Though it seemed unlikely that this would help, I removed the swf-player package:

quadcore:/home/kevin# apt-get remove swf-player
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  swf-player
0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded.
Need to get 0B of archives.
After unpacking 184kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 77731 files and directories currently installed.)
Removing swf-player ...

Then, I closed and relaunched Firefox, went to a web page that includes Flash, and to my utter surprise: it worked! I went to another site that uses Flash, and that worked too!

The problem seems solved, as a result of removing the sfw-player package.

Setting up an HP Network Printer on Debian or Ubuntu

I’ve been running Debian 4.0 on my laptop (dual-boot with Windows XP). I had made a few attempts to connect the computer with my HP Photosmart 2610 printer, which is connected to our network. But nothing seemed to work.

Today I decided to try again. A search on Google for “debian network hp printer” turned up a page titled HP on Ubuntu on the LXer Linux news and forums site.

The answer to getting an HP network printer to work under Ubuntu (or Debian 4.0, in my case)? As user root, in a terminal window run:

hp-setup

Or, the way Ubuntu users will find more familiar: open a terminal under your regular login ID and run:

sudo hp-setup

Yup, it’s that simple! A series of input windows will pop up. In my case, my network printer was found by hp-setup immediately. I was able to simply accept the defaults and click through the input windows. The test page printed fine, proving the installation was working.

Once I deleted my previous nonfunctional printer configuration attempt and made the new installation my default printer, everything worked fine!

BlogBridge on Debian or Ubuntu Needs Sun Java

I was unable to get my BlogBridge installation to work on my Debian Linux PC. When I executed the

blogbridge.sh

command to launch BlogBridge, I received many Java-related errors.

Research on this led me to the discovery that Debian 4.0 (Etch) includes the GNU version of Java, while BlogBridge requires Sun’s Java 5.

Getting Sun Java5 onto Debian 4.0 (Etch)

A search for “java5″ or “sun-java” using apt-cache produced no results — quite a surprise!

The solution is: Sun’s Java5 is not available in the standard Debian Etch package list. To get it, you need to add access to the “non-free” packages to your /etc/apt/sources.list file.

In my case (working from the United States), this was accomplished by adding the following lines to my /etc/apt/sources.list file:

#non-free: for sun-java5
deb http://ftp.us.debian.org/debian/ etch main non-free
deb-src http://ftp.us.debian.org/debian/ etch main non-free

After saving the edits, I executed:

apt-get update

to update the packages my local Debian system was aware of.

Using apt-get to get Sun Java5

With the non-free packages now available, I was able to bring Sun Java5 onto my system:

apt-get install sun-java5-jre
apt-get install sun-java5-jdk

With Sun Java5 installed, BlogBridge runs!

With Sun Java5 installed, I returned to my BlogBridge directory and excecuted:

./blogbridge.sh

Almost immediately, I saw BlogBridge starting up! I now have BlogBridge installed and running on my Debian 4.0 (Etch) system.

The Coming Age of Parallel Programming on Windows

Microsoft’s “Parallel Extensions to the .NET FX CTP” announcement was a bit of a surprise to me. At OSCON in July, I found the presentations given by Simon Peyton-Jones (Microsoft Research) on Haskell and transactional memory to be highly interesting. I attended OSCON to participate in the launch of the Threading Building Blocks open source project, for which I serve as “Community Manager” (working for O’Reilly Media). One of the things that surprised me about OSCON was the amount of attention that was given to multicore and the parallel computing future.

Simon Peyton-Jones talked mostly about Haskell, so I assumed that Microsoft’s approach to parallel computing was going to involve Haskell. In this sense, I was initially surprised to hear about ParallelFX. “What happened to Haskell?” I wondered. But when you read the ParallelFX CTP announcement post, you see:

ParallelFX runs on .NET FX 3.5, and relies on features available in C# 3.0 and VB 9.0

and when you go to the Wikipedia C# page, you see that C# 3.0:

includes new features inspired by functional programming languages such as Haskell and ML

So, now it begins to make more sense. Indeed, at the end of his post, Somasegar calls the ParallelFX Community Technology Preview

another great example of close, ongoing collaboration between product teams and Microsoft Research.

Dawn of the age

Microsoft’s Herb Sutter wrote an interesting post titled “The Concurrency Land Rush: 2007-20??” a few weeks ago. He talks about waves of technological advancement including two phases:

  • A land rush phase during which vendors try to stake out their turf. The market sees an explosive proliferation of products trying to enable mainstream developers to work in the new paradigm and at the same time to differentiate themselves from each other. This phase always takes multiple years, and multiple major releases of many products, consumed at first mainly by early adopters and then, as products mature, broadly across the marketplace.
  • A shakeout phase as, eventually, the market sifts through the products, selects major winners, and realigns itself around them.

This makes a lot of sense. Indeed, when you think about the history of products such as automobiles, home computers, etc., it’s clear that this is exactly what happens. With operating systems and software, it happens too, though it seems to me that the virtual nature of software provides an opening for new innovation even after the marketplace reaches a mature, or even “saturated” state, that is not there for hard items we can pick up or touch. As an example of this, I’d cite Linux.

How long before the concurrency “shakeout”?

Since my main work these days is the Threading Building Blocks open source project, thinking about concurrency and multithreaded development issues is something I do every day. TBB certainly has a head start on ParallelFX, but if Herb Sutter is right then we have a very long way to go before we get anywhere near the “shakeout” phase, and many technologies that may ultimately become important have likely still not yet left the starting gate:

Expect at least dozens of major product announcements and releases across the industry, before the toolset expansion phase is fully underway and approaching some maturity. We the industry have undertaken to bring concurrency to the mainstream, and as with OO and GUIs it will take multiple years, and multiple major releases, across the industry on all platforms.

Everyone’s thinking…

With Intel’s converting its multiplatform Threading Building Blocks product into an open source project last July, and Microsoft’s release of the ParallelFX CTP (Community Technology Preview), it’s clear that the key participants are very much aware of and focused on the need for more convenient methods for developing multithreaded applications that will run on the multicore platforms that will soon be ubiquitous in offices and homes.

It’s interesting to me that many people doubt that there will be a “wash-out” where applications that don’t take advantage of multicore processors are driven out of the marketplace by competing applications that full utilize multiple cores. For example, see the comments to my “Poll: How Soon Will Multithreaded Apps Dominate?” post.

It’s true that apps that are primarily interactive (such as chat applications) needn’t be multithreaded. But the history of computer technology suggests that all available hardware power will be taken advantage of by savvy software developers in a relatively short timeframe — such that the software developers eagerly await the next round of hardware advances, so that owners of lower-end systems can run their software with decent performance.

A nice video series on parallel programming

If you want to learn a bit more about what all this concurrency discussion is about, why it’s suddenly becoming a prominent topic of conversation and research, there’s a nice series of videos at the Devx.com go-parallel site. The videos are chalk-board talks, most of them given by Intel’s James Reinders, technology evangelist, VP, and author of the O’Reilly book Intel Threading Building Blocks. Enjoy!