13.06.2011

Update to cpufreq

Today I've released an update to cpufreq which should fix the issue that the upstart script didn't set the governor on system boot. In previous versions, the script looked up the power supply status in some obscure path on the /sys filesystem, including hardware addresses. With the release of 11.04, this path didn't exist on my system anymore. Instead, a much simpler path appeared: /sys/class/power_supply/AC/online, which seems to be independent of the hardware. The new script now checks this location and sets the governor accordingly.

Unfortunately, I seem to have overestimated the time I can spend on my projects here. I haven't forgotten any of Your comments and I will try to answer them as soon as possible, but this might take more time that I previously thought. Sorry for that.

10.05.2011

Signs of life

I finally found some time to work on my Linux again!
I upgraded to the new Ubuntu 11.04 (Natty) and was reminded once more to never change a running system...
If You consider upgrading, let me tell You: My ClickPad (the touchpad) works better now (multitouch support), but that's about it.
The new Unity desktop is... well let's just say I hate it. It may be useful for the netbook users, it may be nice for people who have never seen anything else, but for me it takes away any efficiency a desktop environment ever provided me with.
So I stuck with Gnome 2 for a few days before reading that it was possible to install Gnome 3 from a PPA. My second mistake. The new Gnome is not half as finished as it may seem. As for now, it slows me down approximately by the same amount that Unity did. Window switching using the mouse takes about twice the time it did before, as does opening Pidgin from the tray. Favorite applications (the ones I put directly into the panel in Gnome 2) also take about twice the time to click. When I open the "Applications" tab in the main menu, I'm being hit in the face by a page with around 90 icons on it (totally useless if You want to find an application), until I select a category. Hotkey support is kinda broken, I cannot make my screen rotate when turning the display and key combos including the "Windows"-key don't seem to work at all.
And last but not least, gnubiff doesn't work as a panel app since there's no support for panel apps anymore. After an hour of testing, compiling and searching the internet I finally found a version of mail-notification which had SSL support.

If You own an HP TouchSmart tm2-1090eg (You will probably have the same problem on similar laptops), there's another great feature of Ubuntu 11.04: Almost guaranteed Kernel Oops during boot! The radeon module tries to dereference a NULL pointer in 3 out of 4 boot cycles, which often leads to a complete system hang. At least it's possible to get the system to boot eventually if You just keep rebooting until it works.

But enough ranting about the new Ubuntu. Here's some good news:
I ported my packages (namely cpufreq, tablet-mode and video-switcher to Natty and fixed a bug in tablet-mode on the fly! It (once more) didn't read the display identifier (e.g. LVDS1) from the config file but instead always fell back to the default (LVDS1). If You upgrade to Natty, You will

I'm not sure wether I will have time to look into the suspend/resume problem Nicolò mentioned in his comment about my last post, but I think I will manage to look into video-switcher in general. I think about including an upstart script which can cycle through the video cards once on each boot (I had the problem that both video cards were turned off sometimes, but I'm not sure if this persists in 11.04) and I started working on a GUI for the program.

I look forward to post some (hopefully good) news again soon!

11.03.2011

Trouble with chromium and an easy-to-install PDF reader plugin (ambiguity inteded)

I recently switched from Firefox to Chromium due to it's speed. I was really happy with my choice until today, when Chromium stopped working out of the blue.
I installed some updates in the background, was working on a project where I had a website opened and when I closed and reopened Chromium... nothing!
Chromium couldn't load any web site. My first thought was of course "there must be something wrong with the network connection or settings". There wasn't. The really nasty thing was that Chromium did not only stop loading web pages - it couldn't even display its own preferences, downloads and the bookmark manager!
My second thought - Google's Your friend! There were a lot of people complaining about issues just similar to the one I saw. The problem was, they all used windows. Their best solution ("run an anti-virus-scan") was kind of the wrong approach for me and the debug log neither told me anything useful. All seemed lost and I had already accepted my fate of having to use Firefox until a new update for Chromium came out, when suddenly a miracle happened.
I could have sworn this would never happen, yet it did. A crash saved the day! Now here's something off topic: Ever since I started using Ubuntu's home directory encryption feature, it broke from time to time. Nothing big, though. While using the system just normally, the encrypted file system would somehow be unmounted, leaving me with an empty home directory. My desktop background disappeared, my shells started taking me to the root directory and I had to log out and back in. This time, I wanted to know what went wrong, so I called dmesg with a surprising result...
Code:
chromium-browse[<PID>]: segfault at 4 ip 00000004 sp bfa74c2c error 14 in libpdf.so[b1e85000+118a000]
Turns out, my PDF reader plugin was incompatible with my new chromium version. Deleting the libpdf.so from /usr/lib/chromium-browser/ solved the problem.

And this is part 2 of the article.
One of Chromium's disadvantages with Google Chrome is the lack of a PDF plugin. Luckily, both programs are easily available for linux. And more luckily, it's pretty easy to steal Chrome's PDF plugin and install it for Chromium. Here's how You do it (make sure to update the plugin every time You update Chromium to avoid the mess I wrote about above!):
  1. Get the latest version of Chrome for Your architecture as a Debian package from http://www.google.com/chrome (make sure to open the site with Linux!).
  2. Open the package with the archive program (example for i386):
    Code:
    $ file-roller google-chrome-stable_current_i386.deb
  3. Extract the file opt/google/chrome/libpdf.so to some location
  4. Put the file into the chromium directory
    Code:
    $ sudo mv libpdf.so /usr/lib/chromium-browser/
    $ sudo chown root:root /usr/lib/chromium-browser/libpdf.so
That's it! You're done!

19.02.2011

Release Party!

I proudly present: video-swicher, a tool to switch betweeen the integrated and the dedicated video card on laptops that have switchable graphics cards. As far as I know, this the the first and (up to now) only tool for this job!
The package is easy to use. It comes with an upstart job that can disable the unused video card on system boot (configurable via a configuration file in /etc/default) and a binary to change the active card. It can only be run by root (or via sudo) since it needs to write into a file on /sys which is owned by root and it needs to shutdown any running display manager.
Up to now there's only one available package, video-switcher which provides the upstart job and the binary. A second package providing a GUI will follow within the next days.
Grab the package by the usual means (available in my PPA) and tell me what You think!
  1. Install
    Code:
    $ sudo apt-get install video-switcher
  2. Use
    Code:
    $ sudo video-switcher [int|ded]
That's it! You're done!

P.S.: You might ask Yourself: How come there's version 1.0.3 available if this is the release announcement? Well, I uploaded the package, found some bugs, deleted it and fixed them. When I tried to upload the fixed version as 1.0.0 again, the system rejected the code claiming that there was already a version 1.0.0 that differed. So I had to make it version 1.0.3.

17.02.2011

The end is near!

I'm about to finish work on latest package called video-switcher! I managed to write a command-line application that is able to change the video card. It has to restart the X server (closing Your session), but as far as I know, there's no getting around that.
There's only one problem left to fix. When switching back to the on-board Intel video card on my tm2-1090eg, the display often gets into a weird state where it's either showing just garbage or nothing at all. I was able to circumvent this by turning the screen off and on again. However, vbetool, the program I use for doing so, sometimes hangs up using 100% of the processor. At that point, my program hangs, too, and never gets to restart the X server. Apparently this is a known bug which hasn't been fixed yet. I'm still working on this and I hope to have a fix ready in the next few days. If You have any idea that might help, I'd be glad to hear about it!
I'll keep You posted!

P.S.: After fixing the problem it might still take some time to write a graphical user interface for the command line application. This shouldn't take more than a day, though.

14.02.2011

Yet another bugfix release (for tablet-mode)

I'm sorry! I broke it again! Shame on me!
As You might have noticed, upon upgrading from an older version of tablet-mode the upstart job disappears magically and the automatic screen rotation stops working. I failed to notice the postrm script during the last bugfix. This nasty little thing (which I wrote myself, shame even more!) deletes the upstart job when the package is removed. This is neither necessary nor useful, as it is also called when the package is upgraded, effectively breaking the automatic screen rotation.
You problably won't be surprised when I tell You what You need to do. Remove and reinstall. Just as in the last article. Make sure to grab the newest version (1.5.3), upgrading from there should finally work as expected.
I'm really sorry.

08.02.2011

Bugfix for tablet-mode

As usual, there's a bugfix for tablet-mode shortly after there was a new version with a new feature. I'm sorry, but I messed up some things again. If You find Yourself with a broken package (something's not working), You might want to purge the package and re-install the latest version (this should be 1.5.1 or higher!). Unfortunately, a simple update from an earlier version might not fix everything, as the configuration files (in /etc) are not re-installed correctly. In order to purge and reinstall the package, do the following (as root).
Code:
$ apt-get purge tablet-mode
$ apt-get update
$ apt-get install tablet-mode
You should check Your /etc/tablet-mode/tablet-mode.conf to make sure that all entries are correct.

That's it! You're done!