Apt-Get Tipps

TuxArena put up a nice summary of some useful apt-get commands.

I have to correct them in one point: For dpkg -L to work, the package needs to be installed already.

I also have a few extra ones:

  • apt-cache search (search packages)
  • apt-cache show (show full package description)
  • apt-cache policy (show available package versions)
  • apt-cache depends (show package dependencies)
  • dpkg -P (remove package completely, that means also configuration etc.)
  • dpkg-reconfigure --priority=low (reconfigure package, show all options)

Free CrossOver - Today Only!

You can download full versions of CrossOver Linux and Mac for free from their webpage today!

Ubuntu 8.10 No-Go for Dual Head

Don't upgrade your Ubuntu to 8.10 if you want to use a dual head setup. There second screen will reguarly turn off for a second while there is an edid ddc scan shown in the Xorg.log. (The bug is not really fixed or fix not in main repository yet. Or I've found a different one. -> It's still not working!)

And the whole system will stutter during that time. That makes video playback very annoyingly slow and usage an external monitor impossible. I'll let you know when I find a fix.

Ubuntu Getting Slower

After upgrading to Ubuntu 8.10 (release candidate), I've recently noticed stuttering in video playback. That might very well also be related to my using the intel 2.5.0 xorg driver. But Phoronix now made a correct examination and found out Ubuntu is getting slower and slower since 7.04.

Complexity or just bad programming? Is it related to the kernels gettings worse and if so, is that related to the Ubuntu patches or the vanilla kernel? I'm curious for hopefully following explanations.

Mode Setting with IntelFB

Let me begin by stating that the intelfb driver is very old already. And there are issues. Mode setting with "non-CRT" devices usually fails:

intelfb: Non-CRT device is enabled ( LVDS port ). Disabling mode switching.
intelfb: Video mode must be programmed at boot time.

So you need to set the mode very counter-intuitively via the vga kernel commandline. To do that, you need to know the mode. Especially on 64-bit systems the only way to find it out is sudo hwinfo --vbe.

Now you can use a kernel command line like video=intelfb:mode=1280x800 vga=0x0362 and the system should boot with the chosen resolution. Even if you're using a laptop like I am.

This will not work with a kernel earlier than 2.6.28-rc1 from my experience, but maybe you're lucky. If nothing happens, try the newest kernel. And of course feel free to comment in any case. And I think this works only if the intelfb module is compiled-in, not if it's compiled as a module, as it usually is in distribution kernels.

Trouble Uninstalling a Package?

Sometimes you're trying to install or uninstall a package, but the process aborts, because the installation script fails. I think there was an option in apt-get or dpkg to override this behavior, but for now there's a very simple workaround that will usually help:

Insert a line "exit 0" into the script causing the error. (It then exits "without an error" right away.) At least in init scripts during deinstallation this should not cause too much damage. In my example, the packet tspc failed during upgrade from hardy to intrepid (release candidate).

There were a few packets that didn't upgrade cleanly, about 5 I think. But now everything works pretty well.

Encyclopedia of Life

A website mapping (or trying to) all life on our cosy little planet Earth. Why go to other planets to find life if you need not go father than your backyard? Out now: eol.org.

Also check out this interview with the founder.

Flash 10 in Ubuntu 64 Bit

There's a nice little script that does the entire installation automatically. Worked great for me. Make sure you check the contents of the script, it's not a lot. And when you run a script as super-user you should always do that. Then do sudo bash flash10_en.sh.

Automatic Monitor Brightness Control

Why isn't there a software that controls your monitor's brightness level automatically. E.g. if you have a webcam, you could use it to detect the current amount of light in the room. If you don't have a webcam, you could use the current time.

Canon Printer Problem "pstocanonij write error,32" Solved

I just had the error message

"pstocanonij write error,32."

when trying to print something with the Original Canon Printer Driver and my MP610. It turned out I needed to cancel the job. I printed a test page and then I printed the same thing again and it worked just fine. Sometimes it hangs up and I have to turn if off and on again.

But I still have no idea why he's cleaning his inks several times a day currently...

Update:

The error comes up more and more often now and I haven't found a real fix yet. It might be related to certain settings. The printer prints one page and then stops printing.

FIX:

You can either use a different driver (e.g. the gutenprint one), or it may be an incorrect page border setting. In my experience, changing the page border settings back to their original settings (31,75mm) fixed the problems. You may have to reboot your computer and turn the printer off and on again for it to work again.


FIX2:
It might also be that your /tmp directory is full. This happens especially when you're using the special tmpfs on that directory, as some distributions automatically do. Or, of course, if you're main partition is out of space.

Mixed Static and Shared Library Linking with GCC

If you want to link some libraries statically and other dynamically you can use these switches:

-Wl,-Bstatic -lsomelibstatically -Wl,-Bdynamic -lotherlibshared

If you just want to compile it all statically, use LDFLAGS="-static".

Dillo 2.0 for AMD64

I've compiled Dillo 2.0 for Ubuntu amd64 (or "intel64") and packed with upx. It should work with other amd64 distributions as well. It does not need fltk 2.0, it's statically linked. Ssl support is missing. It didn't find my ssl library. The required libraries are:

  linux-vdso.so.1 => (0x00007fffde5fe000)

  libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x0000003e44800000)
  libpng12.so.0 => /usr/lib/libpng12.so.0 (0x0000003e40c00000)
  libz.so.1 => /usr/lib/libz.so.1 (0x0000003e3dc00000)
  libX11.so.6 => /usr/lib/libX11.so.6 (0x0000003e3f800000)
  libXi.so.6 => /usr/lib/libXi.so.6 (0x0000003e41c00000)
  libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x0000003e44000000)
  libXft.so.2 => /usr/lib/libXft.so.2 (0x0000003e46400000)
  libpthread.so.0 => /lib/libpthread.so.0 (0x0000003e3d800000)
  libXext.so.6 => /usr/lib/libXext.so.6 (0x0000003e3fc00000)
  libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6dd6242000)
  libm.so.6 => /lib/libm.so.6 (0x0000003e3d400000)
  libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f6dd6033000)
  libc.so.6 => /lib/libc.so.6 (0x0000003e3cc00000)
  /lib64/ld-linux-x86-64.so.2 (0x0000003e3ba00000)
  libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0000003e41000000)
  libXrender.so.1 => /usr/lib/libXrender.so.1 (0x0000003e41400000)
  libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x0000003e3ec00000)
  libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000003e3f000000)
  libdl.so.2 => /lib/libdl.so.2 (0x0000003e3d000000)
  libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000003e40400000)
  libXau.so.6 => /usr/lib/libXau.so.6 (0x0000003e3f400000)
  libexpat.so.1 => /usr/lib/libexpat.so.1 (0x0000003e40000000)
  libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0000003e3e800000)


Enjoy! ;-)

Dillo Browser 2.0 Out Now!

Well, if browsers were only about pure speed and size, I guess dillo would always win. It's probably the most minimalist browser for X. And it's blazingly fast. It Opens extremely fast, it loads webpages in amazing speed. And now version 2.0 is out. Unfortunately there are no amd64 packages available, so I had to go and do it myself again. I will put them in a seperate post.

Javascript innovations - How will Opera react?

Until now it seemed Opera was the most innovative Browser out there: Tabs, Browser Sync, "Magic" Input bar, ... Opera had it first, or did it better.

Now Firefox came with their JIT Javascript engine and Chrome added a multi-threaded approach to that and I ask myself: How will Opera react?

In my experience Opera has been pretty good with most webpages and was faster, especially with many web pages at the same time. But it does get laggy then. And especially (Google's) web applications such as Gmail and Google Reader respond pretty slowly in Opera.

I've set up the email account, because I was bothered how long things took in Gmail. And using Firefox was not better, using both is really annoying.

I wish Opera was available with Chrome's innovative new features... Hopefully they're already working on it. And Opera Browser for the Web 2.0.

The Knotify4 Wake-Up Problem

Martin Kretz released an alternative backend for phonon that fixes the knotify4 high wake-up problem.

Broadcom Wireless Drivers - wl vs. b43 - Performance Comparison

I've compared the performance of both drivers with a simple iperf test over a few meters:

Broadcom Proprietary Driver:

TCP

------------------------------------------------------------
TCP window size: 85.3 KByte (default)  
------------------------------------------------------------
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 46362
[ 4] 0.0-10.2 sec 24.6 MBytes 20.2 Mbits/sec  
[ 5] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 46363
[ 5] 0.0-10.2 sec 24.6 MBytes 20.2 Mbits/sec
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 46365
[ 4] 0.0-10.2 sec 24.0 MBytes 19.8 Mbits/sec

UDP
------------------------------------------------------------
Receiving 1470 byte datagrams
UDP buffer size: 375 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 35141[ 3] 0.0-10.0 sec 24.2 MBytes 20.2 Mbits/sec 1.364 ms 0/17239 (0%)[ 3] 0.0-10.0 sec 1 datagrams received out-of-order[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 38437[ 4] 0.0-10.0 sec 27.2 MBytes 22.8 Mbits/sec 1.837 ms 0/19418 (0%)[ 4] 0.0-10.0 sec 1 datagrams received out-of-order[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 45356[ 3] 0.0-10.0 sec 28.8 MBytes 24.1 Mbits/sec 1.319 ms 0/20555 (0%)[ 3] 0.0-10.0 sec 1 datagrams received out-of-order
B43 Open Source Driver

TCP
------------------------------------------------------------
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42345
[ 4] 0.0-10.1 sec 19.6 MBytes 16.4 Mbits/sec
[ 5] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42346
[ 5] 0.0-10.2 sec 23.1 MBytes 19.0 Mbits/sec
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42347
[ 4] 0.0-10.2 sec 21.7 MBytes 17.8 Mbits/sec

UDP

------------------------------------------------------------
Receiving 1470 byte datagrams
UDP buffer size: 375 KByte (default)
------------------------------------------------------------

[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 57459
[ 3] 0.0-10.1 sec 14.0 MBytes 11.7 Mbits/sec 0.438 ms 152/10171 (1.5%)
[ 3] 0.0-10.1 sec 1 datagrams received out-of-order
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 55062
[ 4] 0.0-10.0 sec 15.7 MBytes 13.1 Mbits/sec 1.372 ms 205/11373 (1.8%)
[ 4] 0.0-10.0 sec 1 datagrams received out-of-order
[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 49861
[ 3] 0.0-10.1 sec 23.4 MBytes 19.5 Mbits/sec 3.724 ms 292/17017 (1.7%)
[ 3] 0.0-10.1 sec 1 datagrams received out-of-order
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42069
[ 4] 0.0-10.0 sec 21.5 MBytes 18.0 Mbits/sec 1.370 ms 239/15544 (1.5%)
[ 4] 0.0-10.0 sec 1 datagrams received out-of-order

As you can see, the proprietary driver is slightly faster in TCP mode. And somehow they're both really slow in UDP mode. That's something I'd like to find out more about.

Update: That was my fault. For some reason iperf restricts UDP tests to 1 Mbit/s. Now the results are more appropriate. The result is that the proprietary driver has a more stable connection speed.

But I think that's really not worth installing a proprietary driver. Broadcom really would better integrate the changes into the open source driver. Their driver is still relying on the deprecated wireless system anyway.

Update2: Further tests showed that, at least after a while of usage, the proprietary driver creates high network latencies. Ping times to the router went up from 2 ms to an average of 160ms (peaks of 500ms !).

Broadcom Proprietary Drivers with Linux 2.6.27

I've found a way to get the drivers to compile... I just downloaded the intrepid restricted modules package source from Ubuntu.

Then unpack, go to ubuntu-intrepid-lrm/ubuntu-restricted/broadcom
and make -C /lib/modules/`uname -r`/build M=`pwd`

They only work with TKIP for me, at least not with WPA2. (The open source b43 drivers does.)

Broadcom's Unfree Driver

Broadcom put up some partially binary drivers for their wireless chips. Well, better late and little I guess. They don't compile with 2.6.27 yet, though. Please post hints in the comments.

Automated Linux Kernel Testing

I'm currently always using the current git kernel. And my thought is: Why isn't there some tool available to automatically tell the developers how many users are currently runnig the kernel, on what platform, how many segfaults, crashes, etc. the test systems had. That would make it much easier to know bugs are there... And it could all run automatically in the background, or at least semi-automatically.

Perfect Slide Shows in Linux with Digikam's Advanced Slide Show Plugin

I've always been jealous of Picasa's Slideshows under Windows. They don't work well in Linux' Wine version unfortunately. Until today. I wrote an email to the developer of the great kde screensaver "smooth slide saver" that I've mentioned just the day before yesterday.

And he told me about a digikam plugin with similar features. It was pretty hard to find. Even after looking up screenshots of it being used. It's called digikam advanced slideshow plugin. And it's part of the kipi-plugins package.

You need to install the packages digikam kipi-plugins. Then you start digikam. Don't select the normal boring slideshow that's normally used. Instead select a couple pictures in an album, go to Extras (in the menu), select (Advanced) Slideshow, right underneath Find Duplicates. And enjoy! :)

And the great thing: Digikam and with it the (opengl) advanced slideshow plugin support the comments I put into the pictures with Picasa. That means I can do the perfect slideshows under Linux now, even much better than Picasa'a Windows slideshows, with all my comments. And all open source! Cool.