Fishpool

To content | To menu | To search

Tag - Fedora

Entries feed - Comments feed

Wednesday 21 May 2008

Stop distracting wireless led blinking

While there's lots to like about my current laptop, one thing that had been quite annoying was the wireless indicator led. For a long time, it didn't function at all, because iwl4965 didn't contain support for driving it. Recently (effectively starting with Fedora 9 for me), that support came in, but now it's not annoying because you can't tell whether wireless is enabled, rather because the led is blinking all the time, which is a distraction.

I liked the behavior of my old laptop's ipw2200 much better: blink while searching/associating with a network, and then stay on constantly. Happily, Erich Schubert just pointed out how to fix the iwl4965 blinking behavior. That script is (I think) for Debian/Ubuntu, and a slightly different kind is needed on Fedora. I'm not sure this is the best way to go about it, but at least it works for me: put the following in /etc/NetworkManager/dispatcher.d/iwl-no-blink

#!/bin/sh
if [ "$0" = "wlan0" ]; then
    for dir in /sys/class/leds/iwl-phy*X; do
        echo none > $dir/trigger
    done
fi

Sunday 30 September 2007

Fedora 8 is looking good

Once again, I couldn't resist the urge to stay on the bleeding edge, so I went ahead and updated my home machine from F7 to F8 test 2. Encouraged by the results, I then (again) did the unthinkable and went through the same process on my laptop, which I depend on for getting stuff done. Crazy. Well, that's the way I like to play the game. And I wasn't quite THAT crazy - I didn't upgrade everything, just the parts that I was really happy about. Besides, I've set the laptop up with a whole-system snapshot LVM backup so that I can back up a day if things start to look bad.

They haven't. Apart from a few minor glitches (such as the Rawhide NetworkManager 0.7 really not being at all ready, dealt with by using the F8t2 NM 0.6.5 instead), I really like all the improvements in the usual suspects - GNOME 2.20 is a brilliant incremental update, OpenOffice 2.3 is a slight improvement on the already-improved 2.2 (but damn, are those release notes bad or what), the Power Manager is getting really good at predicting battery life, and (drumroll, please) Evolution has regained its stability! That is major. The "it seems to forgot to include an attachment you mention in the text" feature is a neat little improvement, too, but really, not having e-d-s crash on network events (such as resume in a new WLAN) is the real satisfaction-improvement for me.

One negative about F8: it doesn't include Seahorse 1.0 (as of yet, anyway), so GNOME Keyring integration was a bit lacking. That was easy enough to fix with a rebuilt package, and after switching the old pam_keyring to gnome-keyring-pam, I now have a very good package for dealing with my hundred-and-fourtyseven different daily passwords, too. Well, almost -- still can't really get rid of Revelation and some manual password management, and Epiphany doesn't yet integrate to Keyring. But it's getting there, for sure.

Sunday 23 September 2007

Non-root libgphoto2 access

I can be a total bitch to make a digital camera that does not look like a flash drive accessible to a normal user under Fedora 7. It sure was for me. Gphoto2 works, but only for the root user, and the net is full of instructions for messing with usbfs mount group, special udev rules, special HAL rules, and so forth. The problem is, nearly all of that discussion is obsolete or at least conflicts between different distributions.

For Fedora, two tricks are necessary: First of all, udev needs to be told the USB devices which should be user-accessible, and second, the PAM console permissions map is missing a class of devices useful for this purpose. It is unfortunate that otherwise such a usable operating system needs this kind of tweaking, but it does.

The first is achieved by creating a special udev rule file such as  /etc/udev/rules.d/52-canon.rules:

SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="306e", SYMLINK+="camera-%k" 

Every camera will have different vendor/product codes, of course. To make this change effective, reboot or restart udev with 'sudo killall udevd; sudo /sbin/start_udev'. Second trick is to change console permissions with a file such as /etc/security/console.perms.d/52-camera.perms:

# device classes -- these are shell-style globs
<usbcamera>=/dev/camera*
# permission definitions
<console> 0600 <usbcamera>

This is a "play-by-the-book" type of solution. If you're less interested in keeping some devices inaccessible from a normal account, a simpler permission scheme will make all USB devices available. In this latter case, no udev changes are needed, only a file in /etc/security/console.perms.d/usb.perms:

<usbdevices>=/dev/bus/usb/*/*
<console> 0600 <usbdevices>

Tuesday 21 August 2007

Acer Crystal Eye and GStreamer

The Crystal Eye webcam in new Acer laptops, my TravelMate 6292 included, works with the linux-uvc driver, as I noted before. To use it in GStreamer applications, you need to have the v4l2src component, which recently moved from the gstreamer-plugins-bad collection to gstreamer-plugins-good. In Fedora 7, you must have g-p-g version 0.10.6, which was just released to updates-testing (in a few days in updates, I would expect).

If you don't want to build linux-uvc yourself (it's very easy), you may want to enable the drpixel yum repo that has it pre-built for Fedora kernels.

rpm -ivh http://download.tuxfamily.org/rpm/drpixel/fedora/7/i386/repodata/repoview/drpixel-release-0-1-2.html
yum --enablerepo=updates-testing --enablerepo=drpixel install gstreamer-plugins-good kmod-uvc

To test it, run:

gst-launch v4l2src queue-size=2 !  ffmpegcolorspace ! ximagesink

Wednesday 1 August 2007

Sound on Acer Travelmate 6292 under Linux

I know I said I'd wait until the end of my vacation to tinker with audio on this laptop, but I couldn't help it -- I wanted to watch DVDs, and movies without sound aren't all that great an experience. So, I had to dig in and see what the solution is.

Not all that easy, it turns out. Fedora 7's latest update kernel still has no support for the Realtek ALC268 sound codec, despite supporting a number of other codecs in Santa Rosa-based laptops. The latest development version of ALSA does have support for a couple of laptops with the 268 chip, but not the TM 6292. Another patch does exist that gets closer, and I made a version on top of that one that provides rudimentary support.

That is, the speakers work now, and so does the headphone jack. However, plugging in the headphones doesn't mute the speakers, and there is only one volume control for both of them. Actually, there are three (called Headphone, PCM, and Front), but only two of them do anything, and they do the same thing (control the volume of both speakers and headphones). Microphone input doesn't work at all. However, all those details are way beyond what I want to know about audio hardware control, and I'm satisfied enough to simply get some sound out of the machine for now. Some other enterprising soul may fill in the blanks.

Patch filed at ALSA's bug tracker. If you're using the 2.6.22.1-33.fc7 kernel (the latest update Fedora 7 kernel as of this moment), you can download a replacement snd-hda-intel.ko kernel module that should enable sound for this machine. Install with

rm /lib/modules/2.6.22.1-33.fc7/kernel/sound/pci/hda/snd-hda-intel.ko
cp snd-hda-intel.ko /lib/modules/2.6.22.1-33.fc7/extra/
depmod -ae
kill $(lsof -t /dev/snd/*)
modprobe -r snd-hda-intel
modprobe snd-hda-intel

Wednesday 18 July 2007

Acer TravelMate 6292 and Fedora 7 Linux

As I mentioned in my previous note, my previous laptop destroyed its fan last week. Since it had started to show its age in other respects as well and was deemed not worth repairing, I got a new one yesterday -- an Acer TravelMate 6292. This is a Core 2 Duo / Santa Rosa chipset based model, with some pretty cutting-edge technology inside. I'll write down the details later when typing is easier, but for anyone who might be considering one to use with Linux: yes, it does work, quite well in fact, but a bit of tweaking is required due to its very new components.

  • Fedora 7 LiveCD didn't like to boot, possibly due to a missing driver (it didn't like my previous laptop's external Firewire CD drive either). It might be possible to work around by changing BIOS settings, but I borrowed a USB CD drive instead.

  • Otherwise, the LiveCD install experience (including resizing and moving the Windows partition out of the way) was a very smooth one. I hadn't done this before, and was positively surprised. I'm certain Microsoft hasn't made their install this smooth, and I doubt Apple has, either. Much recommended, if you're even a little bit curious.

  • Network-based update post-install no problem using a wired network. All in all, the install took about 1 hour to move Windows partition, 20 minutes to install Fedora, and 30 minutes for it to load updates afterwards (this was surprisingly slow for some reason).

  • Wireless (Intel Wireless 4965 A/G/N adapter) driver (iwlwifi) was preinstalled, but the required firmware wasn't (the package only included firmware for the previous model, 3945). No problem, just install iwlwifi-4965-ucode from ATrpms.

  • Things which worked without any effort at all: battery monitoring, CPU frequency control, temperature monitoring, wired Ethernet, Bluetooth, docking station, and many other things I take for granted. In fact, the machine was entirely functional save for the missing wireless adapter microcode straight off the LiveCD, and all that I did for it was to improve performance past the "functional" stage.

  • Display was a bit fuzzy, and 3D acceleration didn't work. This was because the preinstalled Xorg Intel driver v 2.0 includes only basic support for GMA X3100. Both problems disappear by installing a new kernel (for updated 3D/DRI driver) and Xorg 1.3.0/Intel 2.1.0 (for 2D etc), ie by running this command as root:
    yum --enablerepo=updates-testing update kernel\* Xorg-X11-drv-i810 Xorg-X11-server-Xorg
    
  • Both suspend-to-ram (S3) and hibernate-to-disk work fine, once the usb drivers are forced out of the kernel prior to suspend. Create /etc/pm/config.d/unload_modules with one line:

    SUSPEND_MODULES="ehci_hcd ohci_hcd uhci_hcd"
    
  • Update: The Crystal Eye webcam (USB ID 064e:a101) works using the linux-uvc driver, which needs to be installed from source (download, extract, make, make install). Make sure you configure each application to use V4L2 instead of the old V4L API. For example with Ekiga, choose V4L2 instead of V4L in the configuration druid or in the Video Devices Preferences.
  • Something still to do about audio, apparently common to many Santa Rosa laptops and the ALSA Intel HD Audio driver, at least ones which use a Realtek codec. Notes from Ubuntu might guide you along - me, I'll try again after my vacations. Perhaps someone else will bother to fix this one. :) Update: a modified driver now provides basic sound output.

  • Haven't tried to use the fingerprint reader (USB ID 147e:2016) yet, the biometrics libraries required look a bit overwhelming to install.

Monday 18 June 2007

Update on Fedora 7

A few weeks ago I mentioned having upgraded to Fedora 7, and linked to a couple of bugs that were bothering me. No longer; as far as I can tell, my laptop is now stabler than it has ever been, plus way more functional. It's like I got a new computer all together ;) In particular, the crash when enabling an external screen was just fixed yesterday by Keith Packard. Thanks, Keith!

About fonts again

Heh, the Safari/Windows font smoothing thing seems to have stirred somewhat of a storm-in-a-teacup-blogosphere again. So lets comment on it again; this time, with a few more comparisons from my favorite free operating system:

Font rendering; the Windows emulation way (FreeType on high contrast setting):

The Apple emulation way (FreeType on preserve shapes setting):

The ClearType way (FreeType with subpixel decimation):

And finally my favorite, subpixel rendering with lower hinting strength:

Best of both worlds - more contrast than Mac OS X, prettier shapes than Windows, and word spacing which matches closely with what would be printed. Those closed operating systems look worse by the second.

All four settings available from the same GNOME font dialog.

Tuesday 12 June 2007

Font rendering Mac OS X vs Windows vs Linux

A topic which I've run tests with before (long time before), apparently has come back with Apple's Safari for Windows release. Jeff Atwood finds Mac OS X fonts wonky - well, they're certainly soft. Apple has never been too keen on strong hinting, perhaps because it messes inter-glyph metrics in favor of contrast. Windows is wonky in its own way - ClearType has good contrast, but letter spacing is sometimes a bit annoying.

Just for kicks, here's what Fedora 7 with FreeType autohinting and subpixel rendering (equivalent of ClearType) looks like. This is just one of the modes, but the one I personally prefer:


Comparing at 200% rendering to Jeff's examples; Safari/Windows, IE7/Windows, and Firefox/Fedora

I guess it's up to everyone's preferences, but I think Fedora wins this one. Spacing isn't perfect here either (in particular "b est" looks a bit ugly), but overall, contrast is excellent and paragraph spacing is very close to what it would be without hinting.

Wednesday 23 May 2007

Fedora 7 nice step forward again

I installed Fedora 7 Test on my home PC a couple of weeks ago, and encouraged by its smoothness, and wanting a clean upgrade to OpenOffice.org 2.2 and Gnome 2.18, rolled it on my laptop, too. Pretty nice! Apart from those upgrades, I got:

These might seem like minor items, but all of them improve daily usability, and I much more prefer regular small improvements to huge changes, anyway. OpenOffice.org 2.2 actually is a relatively major upgrade, with support for dual screen mode in Impress (finally), and improvements in the already-good PDF export functionality.

Only two bugs that annoy me (and I'm easily annoyed), both new, but then again, many others went away:

Absolutely no problems doing a yum upgrade, but I had two things going for me, so y'all take your own chances: I've done this many times before, and I've used LVM-managed volumes for a long time. If you haven't, or don't, upgrade using Anaconda or risk not being able to boot afterwards.

- page 1 of 2