Resuming Pidgin

March 31st, 2008

I noticed that there were some options for Gaim in the bottom of /etc/hibernate/common.conf. Obviously, since Gaim isn’t even in the Portage tree any more, these are a bit outdated. I did some research and found someone who had been successful at getting Pidgin to work on resume. Apparently the requirements still stand - Pidgin must be compiled with dbus support, and the purple-remote must be installed (I think this is default with the current stable Pidgin package).

In addition, in order to provide similar functionality to that available for Gaim, you need to add a file called pidgin to /usr/share/hibernate/scriptlets.d/. The contents of the file can be found in this post on the tuxonice mailing lists. I tested it out, and it seems to work. I made one small modification - I commented the first and third lines in the block below:

pidgin scriptlet:

if [ -n “$PIDGIN_LOGIN_MESSAGE” ]; then
purple_remote_cmd=”$purple_remote_cmd&message=$PIDGIN_LOGIN_MESSAGE”
fi

This way, I can use the following configuration in /etc/hibernate/common.conf to set an empty status message on resume:

from /etc/hibernate/common.conf

### pidgin
## You must have dbus support compiled into Pidgin and the purple-remote installed
LogoutPidgin yes
PidginRestoreStatus yes
PidginLogoutMessage Hibernating
PidginLoginMessage

Dual-head with XRandR

March 27th, 2008

I decided last quarter that I wanted to be able to present from my laptop without rebooting into Windows. It’s nice to be able to use my own equipment for that sort of thing, and especially from it was developed in.

Anyway, I never really made an effort to get this to work before, so I didn’t know much about what I was in for. It appears that there are four basic methodologies for getting a dual-head configuration to work. I’ll detail those here. First, let me outline my relevant hardware configuration: ATI Mobility Radeon 9000, 14.1″ laptop LCD capable of displaying up to 1400×1050 resolution, and supplying a signal to a standard VGA port and an S-video port. I was originally using the radeon driver, but in my exploration, I found that the ati driver is a wrapper providing additional functionality, which uses the radeon driver when it needs to.

  1. By hand, with xorg.conf

    This method involves editing xorg.conf by hand, configuring each Monitor and Screen and playing with Modes, Virtual lines, and adding Devices and positioning information as needed. I got this to work, but KDE never cooperated, either creating a second desktop and another instance of kdm, or stretching itself in some bizarre way. I gave up on getting them to cooperate when I found out about…

  2. Compiling in support for Xinerama

    Xinerama is actually designed to work with multiple monitors effectively. This was the first method that I got to work correctly, and all it took was adding the ‘Option “Xinerama” “Enabled”‘ line to the Extensions section. And compiling most of KDE with the xinerama use flag. Only once I got it working did I discover that using it disables DRI, so I couldn’t present anything involving 3D animations. It was around this time when I found out that Xinerama has been deprecated in favor of…

  3. Enabling MergedFB

    Apparently, some time ago it was determined that X display drivers would support the MergedFB directive, including an additional directive for MergedNonRectangular, which allows for a pair of displays of unequal resolution. This was convenient, and also supported DRI, but unfortunately, it only worked for a brief time. I changed something in the configuration, and couldn’t get it to work again. In searching for a reason for this, I happened upon some documentation that suggested that MergedFB would also be deprecated in the near future. Its replacement would be…

  4. XRandR

    This final method allows X to finally support dynamic resizing of the desktop - that is, as long as your video driver is sufficiently up-to-date. Originally, I was using the x11-drivers/xf86-video-ati-6.6.3 package which, upon review of the changelog, does not support XRandR. Support was added in as of version 6.7, and the current version is 6.8.0. However, it’s been masked for x86, and apparently it isn’t stable with my configuration, because it crashed X. I reverted to version 6.7, and then was able to successfully startx and query with the xrandr command.

  5. In short, I can project now! There is one drawback - apparently because I had to set Virtual to greater than 2048 2048, I can’t use DRI with this configuration. I’m working on a fix to that. I’ve posted my working xorg.conf here.

    By the way, thanks to Greg for helping me with this.

EHCI and USB1.1 and kernels, oh my!

March 20th, 2008

So I mentioned that my laptop runs Gentoo Linux. I try to keep it up-to-date, but usually this means that things break. Frequently. This is just one of the latest issues I’ve encountered.

I use the tuxonice sources (regular kernel sources pre-patched with support for TuxOnIce, Linux’s somewhat more advanced hibernation functionality). The current stable version in Portage is 2.6.23-tuxonice-r10. This is the first version in which Gentoo acknowledged the namechange from Software Suspend 2. Anyway, since I was upgrading, I opted to reconfigure my kernel from scratch. For the most part, this is easy, except I usually get one or two things wrong. Never anything that prevents me from booting, but just some annoying bits. This time, there were two things - I compiled without support for the fuse module (supports mounting Filesystems in USErspace), so I couldn’t mount my Windows partition. Annoying, but I knew how to fix it, and the error was self-explanatory.

The other misconfiguration was USB. Previously, I was able to use my USB2 flash drive with no problem, despite the fact that both of my available ports are only 1.1. However, after reconfiguring, I could no longer use the drive. The big annoying yellow/orange activity light flashed repeatedly and quickly rather than remaining solid and flashing during actual activity. In addition, I found output similar to the following in dmesg repeating over and over again:

dmesg output:

CONNECT
hub 4-0:1.0: port 4, status 0501, change 0001, 480 Mb/s
hub 4-0:1.0: debounce: port 4: total 100ms stable 100ms status 0×501
ehci_hcd 0000:00:1d.7: port 4 high speed
ehci_hcd 0000:00:1d.7: GetStatus port 4 status 001005 POWER sig=se0 PE
CONNECT
usb 4-4: new high speed USB device using ehci_hcd and address 2
ehci_hcd 0000:00:1d.7: devpath 4 ep0in 3strikes
ehci_hcd 0000:00:1d.7: devpath 4 ep0in 3strikes
ehci_hcd 0000:00:1d.7: devpath 4 ep0in 3strikes
ehci_hcd 0000:00:1d.7: GetStatus port 4 status 001002 POWER sig=se0 CSC
hub 4-0:1.0: state 7 ports 6 chg 0000 evt 0010
hub 4-0:1.0: state 7 ports 6 chg 0000 evt 0010
ehci_hcd 0000:00:1d.7: GetStatus port 4 status 001803 POWER sig=j CSC

I googled around and found this message on the Linux Kernel Mailing List. EHCI provides USB2 functionality. Apparently, since I had compiled in support for EHCI, and since I plugged a USB2 device, EHCI took over and was attempting to handle the device, even though the device was not plugged into a USB2 port. The repeating dmesg output and flashing activity light represented EHCI repeatedly connecting and disconnecting the drive. I removed EHCI support, recompiled and reinstalled the kernel, and suddenly my flash drives operated normally again!

I don’t know if this behavior is intended - that if EHCI support is available, it will take over when managing a USB1.1 device, regardless of the version of the port involved. There may be some other obscure option I haven’t set, or this might be a known bug in the kernel. For now, though, since there’s no reason for me to even have EHCI support at all, my solution works.

Now to explore tuxoniceui_fbsplash difficulties…

Impressive…most impressive.

March 4th, 2008

But Wordpress is not a Jedi yet.  Not quite.  It’s quite a bit better than the last time I tried to implement it.  For the most part, it was easy - the separation of style and function is superb.  There were a few things that were frustrating about it, like the fact that it’s somewhat unclear what each part of Kubrick does, and where it is or is not implemented.

Which leads to my biggest complaint: the search form.  The form appears to be implemented both in searchform.php and in wp-includes/widgets.php, inside the wp_widget_search function.  Unfortunately, this means that in order for the search widget to be styled in the same way as the search form in searchform.php, a file outside the theme must be edited, deviating from the separation.  This means too that I can’t simply back up or package my own theme without a patch to the base installation.  I suppose I could write my own search widget, but as I don’t know the first thing about this, I can’t do anything about it right now.

Suggestion for the Wordpress devs: find some way around this.  Perhaps you require themes to implement the search form in some standard way, then implement this as the default form in the search widget.  Perhaps you can keep two separate forms, but both should be maintainable as a part of the theme.

Outside of this one complaint, it feels like Wordpress is a very well-polished piece of blog software.  I look forward to using it and experimenting with various parts of its functionality.  I’m going to categorize any future posts on the subject in ‘wordpress’.

Signing off…

Welcome to the Random show…

March 3rd, 2008

This post was made at the end of what was possibly the most difficult quarter in the history of RIT. Turns out being a grad student requires a lot of things not required of undergrads - like adding about eight hours to each day and treating grad group members like undergrads.

I intend to use this blog as a place to post cool things I find in my travels through the Internet, as well as problems I’m running in circles trying to solve. If you’ve got some pointers, you can make fun of me (like Dave does), or you can offer helpful suggestions.