Fishpool

To content | To menu | To search

Tag - hardware

Entries feed - Comments feed

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>

Wednesday 29 August 2007

Working 3D on the 965GM

I took a second (third, whatever) look at how to get 3D acceleration enabled with the TravelMate, and finally found the clue to avoiding a display lockup the moment an OpenGL application was started.

Fedora 7 will not support it as-is. You'll need at least kernel 2.6.22.1 (2.6.22.4 is now in updates) and Mesa 6.5.3. I found it easiest to install Richard Hughes' "Utopia" builds of mesa-libGL and libdrm and a rebuilt fc8 xorg-x11-drv-i810. With these three packages, DRI can now be enabled and the machine is stable. Performance isn't stellar, but it's plenty enough to enjoy compiz and a slightly blinged up desktop, which is essentially what I was looking for, anyway. Ready-made binary attached. Remember, you need to update the kernel and drm bits too with the linked stuff.

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.

Saturday 12 August 2006

More about the 770

I've been playing with the Nokia 770 more the past few days, and figuring out how to make it more useful. Still haven't figured out a usable calendar application for it - not that GPE Calendar and Maemo Dates aren't good as such, but without a sync application, they're not usable for me. Otherwise, it's proving pretty good - I've managed to mostly tame the handwriting recogniser, too.

Continue reading...

Sunday 30 July 2006

New toys again - Nokia 770

Back in town from vacation trips - Sanna is back to work on Monday, but I still have one week in which I was thinking of doing some work around the home, etc. But I also finally bought a Nokia 770 I've been planning to get for some time. After one evening of playing with it, I'm not really sure what to think of it...

Continue reading...

Wednesday 17 August 2005

Dualhead on Xorg and Acer TravelMate 380

I wrote earlier about my experiences installing Linux on an Acer 382TMi laptop, and how I could not acceptably drive both the laptop's internal display and an external screen simultaneously. Thanks to the kind assistance of Alan Hourihane, I have a partial solution now. Read on.

Continue reading...

Monday 2 May 2005

Linux on Acer TravelMate 380

Switched to a new laptop as well, an Acer TravelMate 382 TMi. This is a radical shift from my previous one, being optimized for size in most respects. Only 1.6 kg, with an advertised battery life of 4.5 hours, I will hopefully like carrying this around much more than the Evo. Anyway - read on for notes on its Linux compatibility.

Continue reading...

Wednesday 27 April 2005

Phone to GNOME integration

Since my new RAZR doesn't have Gammu-compatible IrDA, but does have a "standard" USB ACM connection as well as Bluetooth, I am in search of new solutions for synchronizing my Evolution calendar and hopefully managing my phonebook. This entry is where I'm collecting stuff, hopefully helping someone and even attracting a few helpful comments. Read on, please.

Continue reading...

- page 1 of 2