Search Results: "snd"

20 May 2008

Axel Beckert: A good day

Today was a good day — at least if I average all the things happened today. And since Twitter.com is currently down and there’s no way all those things fit in 140 characters, I decided to pack them in a “short” blog post: So if I sum up the smileys in this blog posting, I get 5 happy ones and only 2 sad ones. I think being happy outrun being unhappy today. ;-) Now I want to dive into my bath tub to get this smell of burning servers off me and my cloths. ;-)

9 April 2008

Holger Levsen: random bits

Instructions how to use etchanhalf kernels are available too, please report problems to the mailinglist mentioned there.

I still have oldworld powerpc hardware to give away, if someone wants to have those for testing the new snd-powermac driver or whatever, please contact me. Appearantly my mail didn't make it to the powerpc list when I originally sent it, so I've just resend it.

Today I will switch the second PCs of my parents to Debian etch. They seem to like it and "Gnome is not really different than Windows" ;-)

29 January 2008

Maximilian Attems: 2.6.24 in Sid

2.6.24 has been uploaded on Saturday and passed NEW on Monday. It will be soonest available for all archs. If we don't get enough test coverage or things go bad 2.6.22 will be the fallback for Etch+half. The images install in Lenny/testing just fine. So please give it a spin. Known Issues are still missing VServer and Xen images, bnx2 + snd-cs46xx disabled due to firmware issue and ACPI userland still relying on old interfaces (for example #462305). For more adventurous souls the kernel buildserver will continue to track latest Linus git daily snapshot (enhanced ext4 should land soon). 2.6.24 will also soon be pushed to Testing. I repeat this is not the real Etch+half kernel yet as there will be some config changes for it, but it is pretty close. Thanks for your 2.6.24-rc7 feedback.

11 November 2007

Martín Ferrari: HP 530 review (with Ubuntu)

Yesterday I bought a laptop for a friend, who also asked me to install Linux on it. Since she's not computer-savvy at all, I opted for an Ubuntu. I provide here a short description of the hardware and what to expect regarding compatibility for anyone about to buy one of these. Hardware description
Model HP 530
Part No. GU322AA
CPU Intel(R) Core(TM) Duo CPU T2300 @ 1.66GHz (stepping 12) - 2 MiB cache
CPU flags fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor est tm2 xtpr
Screen 330 mm x 250 mm viewable area, "glossy" wide-screen. 1280x800 pixels.
Video Intel Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller
Audio Intel 82801G (ICH7 Family) HDA
USB Intel 82801G (ICH7 Family) USB2 EHCI Controller
Ethernet Intel 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile
WiFi Intel Corporation PRO/Wireless 3945ABG Network Connection
Optical media Optiarc DVD RW AD-7560A
Hard disk Fujitsu MHY2120BH, 112GiB, max UDMA/100
Problems The only problems I had with the hardware were related to the sound card and the lid. The sound card had exactly the same problem as my Dell Inspiron 6400: it won't turn off the internal speakers when you plug something in the audio output jack. This is easily solved adding the following to /etc/modprobe.d/options: options snd-hda-intel enable=yes model=laptop The problem with the lid is that the screen didn't turn off when the lid closed. Just one time it did work, and stopped doing so after a reboot. Looking with acpi_listen, it seems that the acpi event isn't even generated. I don't know if this is a hardware or software problem. Also, some not very nice things should be noted about it: it has no independent media buttons for volume, suspend, etc.; only the WiFi transmitter kill and the power button, the rest needed a key chord. It has only two USB ports, which nowadays is incredibly few. No LEDs for hard dist, scroll lock or num lock. The audio jacks are on the front, which makes them very unsuitable for any straight plug. Although seldom used, it is nice to have the ability to turn the screen 180 , but this one can't do it. Finally, the battery is tiny: only four cells amounting 2 Ah of capacity. The power consumption seems a little better than my Dell: running on batteries, with low brightness, an idle GNOME desktop gave a reading of 820mA. Watching a movie from optical media in full screen ranged from 1 A to 1.3 A depending on the spinning of the media and the codec. Burning a DVD at 2x took 1.15 A The good After installing a Ubuntu 7.10, almost everything Just Worked . Of course it warned me about the non-free ipw3945 driver, but in seconds network-manager had connected to my home WLAN. Network manager could be a little more smart and turn off the WiFi transmitter when it's disabled by the user, but I guess that's not only an Ubuntu problem :). Most media keys worked out of the box, the WiFi kill switch worked OK, as did suspend to ram and to disk. Video acceleration and obligatory eye candy worked automatically. No problems either with burning a DVD, listening to music, watching a movie or connecting to my home network. The external aspect is not bad, the screen looks good, and the touch pad is very nice: just a matrix of dots over a surface that doesn't show any other sign of being an input method. In conclusion, it shows that it is a very cheap machine, but the drawbacks seem very few comparing to the good price. Tags: Planet Lugfi, Planet Debian, Tecnolog a

13 August 2007

Uwe Hermann: Linux on the Fujitsu Siemens Lifebook S-4572 Subnotebook

I recently bought a Fujitsu-Siemens LIFEBOOK S-4572 (sub)notebook on eBay for less than 150 Euros, a really great little machine. It's a Pentium III, 750 MHz, 256 MB RAM (the chipset cannot handle more than that unfortunately), 12.1" screen, ethernet, 2x USB 1.1, CD-ROM/DVD reader + CD-ROM writer, PCMCIA, IrDA, modem, and a 15 GB hard drive. No floppy, no serial ports, no parallel port. There's no wireless builtin, but I use a cheapo PCMCIA adapter. The greatest feature compared to all other laptops I previously owned is that the battery life is really great, it lasts almost 3 hours (compare that to 45 minutes on my current "main" laptop). I'm running Debian unstable on the box (of course). Here's the Linux support status as far as I have tested things: Networking Works out of the box using the e100 driver. Sound Works out of the box using the snd_intel8x0 driver. X11 Works out of the box, using either the vesa or the ati driver (at a max. resolution of 1024x768). Touchpad Works out of the box. Using the Option "SHMConfig" "on" line in /etc/X11/xorg.conf's InputDevice section (using the synaptics driver) also works fine and allows you to scroll using the touchpad, e.g. in a browser. More info in the SynapticsTouchpad page on the Debian wiki. CDROM, DVD Reading CD-ROMs and DVDs as well as burning CD-ROMs works fine. I don't think the drive is capable of writing DVDs. External VGA Displaying the screen contents on an external VGA monitor (or beamer) works just fine, switching is done using Fn+F10. PCMCIA Works fine, tested using the Sitecom WL-112 wireless card. The driver installation for that is straight-forward, too:
$ apt-get install rt2500-source
$ m-a a-i rt2500-source
$ dpkg -i /usr/src/rt2500*deb
Special keys All the Fn-keys work fine (brightness, volume, etc.). There are five other special keys (for starting a browser or something) which I haven't tested, but I don't really care... USB Works fine, but it's only USB 1.1, so some higher-speed devices will not work (DVB-T USB devices for example; PCMCIA DVB-T adapters might work). IrDA, Modem Untested, I don't care. Powersaving, Suspend to RAM It seems this CPU (Pentium III, Coppermine) doesn't support frequency scaling, so cpufreq-set doesn't work. I'm using laptop-mode-tools to improve battery life a bit more, though. Also, Suspend-to-RAM works fine out of the box:
$ apt-get install hibernate
$ hibernate-ram
I haven't tested Suspend-to-Disk yet, but I'm not sure it'll work anyway, as I'm using a dm-crypt'ed disk (+ LVM), as with all my boxes. lspci
00:00.0 Host bridge [0600]: Intel Corporation 82440MX Host Bridge [8086:7194] (rev 01)
00:00.1 Multimedia audio controller [0401]: Intel Corporation 82440MX AC'97 Audio Controller [8086:7195]
00:00.2 Modem [0703]: Intel Corporation 82440MX AC'97 Modem Controller [8086:7196]
00:07.0 Bridge [0680]: Intel Corporation 82440MX ISA Bridge [8086:7198] (rev 01)
00:07.1 IDE interface [0101]: Intel Corporation 82440MX EIDE Controller [8086:7199]
00:07.2 USB Controller [0c03]: Intel Corporation 82440MX USB Universal Host Controller [8086:719a]
00:07.3 Bridge [0680]: Intel Corporation 82440MX Power Management Controller [8086:719b]
00:12.0 Ethernet controller [0200]: Intel Corporation 82557/8/9 [Ethernet Pro 100] [8086:1229] (rev 09)
00:13.0 CardBus bridge [0607]: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus Controller [1217:6933] (rev 02)
00:13.1 CardBus bridge [0607]: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus Controller [1217:6933] (rev 02)
00:14.0 VGA compatible controller [0300]: ATI Technologies Inc Rage Mobility P/M [1002:4c52] (rev 64)
01:00.0 Network controller [0280]: RaLink RT2500 802.11g Cardbus/mini-PCI [1814:0201] (rev 01)
Other resources I'm really considering making this my "main" box even though it's a bit older/slower, as my current laptop with 45 minutes battery life is a major pain when travelling...

14 May 2007

Uwe Hermann: Playing audio on the NSLU2

3D Sound USB Audio Device I'm a happy NSLU2 user since a few months now, and I'm using it for all kinds of things, e.g. as a 24/7 remote ssh server at home (using DynDNS and the ddclient Debian package), as IRC logger (screen + irssi), etc. etc. I was considering multiple options as to where/how to install the slug (USB thumb drive, Compact Flash, disk drive, ...) but I settled with a full Debian install on an 1 GB USB thumb drive for now. I implemented some measures to maximize the life time of the USB thumb drive, maybe I'll post some info on that later... One new thing I've been trying lately is to use the slug as an audio player. As it doesn't come with an integrated sound card, you have to use an external USB audio device. I've got mine (see photo) from eBay for ca. 5 Euro (+ shipping) and it works out of the box with Linux 2.6.18 using the snd_usb_audio kernel module. You simply attach it via USB (the module is automatically loaded) and then attach external speakers to it. Here's an lsusb of the device:
Bus 001 Device 011: ID 1130:f211 Tenx Technology, Inc.
One problem with playing audio on the slug is the slow CPU. At 266 MHz (and without FPU!) playing audio with "normal" audio players such as mplayer or mpg321 is not possible. But there are several ways to make the slug play your favorite music. Here's a list of players I tested and a status report of whether they work at all. If yes, I listed a rough percentage of CPU load resulting from playing the music.
  • Ogg vorbis:
    • mplayer, aplay, playsound, and ogg123 don't work.
    • $ apt-get install libvorbisidec-dev
      $ cd /usr/share/doc/libvorbisidec-dev/examples
      $ make
      $ cat foo.ogg   ./ivorbisfile_example   aplay -f cd
      
      Result: 40% CPU load
  • MOD, XM, S3M, IT, etc.:
    • $ mikmod foo.mod: 10% CPU load (even with compressed MOD files)
  • WAV:
  • FLAC:
  • SPEEX:
    • $ speexdec foo.spx: doesn't work, 100% CPU load. Any known alternatives?
  • AU:
    • $ cat foo.au > /dev/dsp: 3% CPU load (but sounds crappy)
    • $ cat foo.au > /dev/audio: 3% CPU load (sounds better)
    • $ mplayer foo.au: 5% CPU load
    • $ aplay foo.au: 5% CPU load
    • $ playsound foo.au: 5% CPU load
  • AIFF:
    • $ sox foo.aiff -t wav - aplay: 50% CPU load (a bit stupid, but it works)
  • Streaming MP3:
    • $ mplayer http://www.example.com/foo.mp3: doesn't work, 100% CPU load.
    • $ wget http://www.example.com/foo.mp3 -O - madplay - : 17% CPU load
  • Streaming Ogg Vorbis:
    • $ cd /usr/share/doc/libvorbisidec-dev/examples
      $ wget http://www.example.com/foo.ogg -O - ./ivorbisfile_example aplay -f cd
      : 40% CPU load
  • The SlugAsAudioPlayer page in the NSLU2-Linux wiki might have further information on this topic. Feel free to add comments if you know of other audio types which can be played on an NSLU2.

    10 April 2007

    Peter Makholm: The iBook story

    I took some days off-line so the iBook story hasn’t progressed very much. On the other hand I’ve spent some time with my family and finaly finished Neil Stephenson’s Quicksilver. Sound Had some problems with the internal soundcard. I’m not quite sure what the porblem was, but the right module is snd_powermac and not anything like snd_aoa. Probaly did something else wrong along the way too. The fun part would be playing music throug AirTunes. raop-play claims to solve this problem. They got debian packages for i386 and a nice debian/ in the source tar-ball. The build-deps is missing fluid and libglib2.0-dev but other than that it builds nicely — but no sound… Nearly giving up I looked at the alsapcm module not part of the debian package, just to see how it worked in theory. And suddenly I could play music with mplayer -ao alsa:device=hw=1.0 music.ogg. Problem is that raop-play isn’t endian safe, but the alsapcm module forces use of little endian somewhere before the real raop-play. Afterward I’ve tested raop-play on amd64 where it works nicely. Java Java seems to be a problem. None of the packages of ibm-jre packages I’m seem to be able to find is supported by java-package. My Bank uses java, so that is kind of a show stopper, but I havn’t really looked into it yet. Flash, Youtube and the like Flash isn’t really a showstopper, but it would be nice to be able to see all the funny video clips people are refering to. None of the free flash plugins seems to work (swfdec, libfalsh-mozplugin), but youtube-dl and mplayer do the job. Futher work… Java is a major show stopper. I can’t switch for real without java support in my browser. The other problems is something I can live with. I migth even prefer to use AirTunes from my amd64 server instead of my laptop so I will probally ITP raop-play soon. Some people have asked why I want to switch away from wonderfull OS X. I’ll try to wirte something up one of the days - and no it’s is not anything personal against mac fans.

    27 March 2007

    Martin-Éric Racine: I'm Thin, therefore I Can

    Life sometimes goes in a funny direction, like a full circle d j vu: 20 years ago, I was studying Technology of Computerized Systems (a combination of electronics and programming). Now, 20 years later, I'm starting a dream job as the Business Development Manager of Artec Group and their core business is you guessed it exactly that. The really cool thing about Artec, from a Free Software advocate's point of view, is that they contribute firmware and drivers for their products to LinuxBIOS and the Linux kernel. At this point, my initial tasks will focus on marketing and selling Artec's flagship OEM product, the ThinCan. What is the ThinCan? Actually, you're already familiar with one iteration of the product: the Linutop is a branded ThinCan, delivered with a custom hardware configuration, plus custom casing artwork designed by Fr d ric Baille of Linutop SARL and loaded with Fred's favorite Xubuntu configuration. In the Linutop's case, their business model is to fill the market niche for a simple Internet surfing platform that fits 80% of average people's daily computing needs, so the hardware configuration they ordered reflects that. Still, as several readers of this blog noticed, the "Linutop" could make a fantastic thin client and, sure enough, that was the main purpose behind the ThinCan's original design; it sells well in the Fortune-500 market as an RDP client running under Windows CE. However, until recently, there simply wasn't much demand for a contemporary X11 terminal solution based on the ThinCan. That is, until LTSP took off, thanks to the contributions of Edubuntu and similar educational Linux distributions. Sure enough, someone spotted the opportunity and contacted Artec to order a branded ThinCan iteration with Etherboot and PXE support, which they call the Linuterm. By the way, for those who need a really cheap OEM thin client, I've got a great spring clearance offer for you:
    Artec has about 500 pieces left of their older DBE60 ThinCan model, based on the AMD Geode SC2200, and we're selling them at 100 euro / piece, plus VAT and shipping.
    The DBE60 is configured with three USB 1.1 ports, one parallel printer port, one 100baseT Ethernet port, one VGA port (up to 1024x768 @ 16bpp 60-85Hz or 1280x1024 @ 8bpp 60-75Hz) and one 1/8" stereo audio output jack. Its BIOS provides Etherboot support and its motherboard is populated with 64MB of RAM and 32MB of Stratoflash. It comes delivered with a European AC adapter. The Geode SC2200 is fully supported by the Linux kernel with the sole exception of a missing ALSA snd-scx200, but this could easily be ported from AMD's deprecated OSS driver and X.org support is provided by the "nsc" driver.
    Minimum order size is 10 pieces. Contact me via my full name (unaccented, with one hyphen and one dot) at artecgroup.com quoting this special offer.
    PS: someone was asking if that DBE60 special is also available in the aforementioned Fortune-500 configuration. It indeed is: add 16 euro / piece for the Windows CE 4.1 license with an RDP client.

    21 January 2007

    Daniel Burrows: How to Breathe, Functionally (part 1)

    David Welton writes that the problem with functional languages is that you don't get to mentally "catch your breath" between computations; piling function invocations on function invocations makes it hard to understand what's actually being calculated. He has an amusing summary of how functional code can become unreadable:


    Do this with the result of this with what this produces when given this input that is derived from this function which takes the result of this other thing after calculating the result of something that is derived from the output of a function that ...


    Indeed, I've seen functional code like this (much of it written by myself). Here's a particular gem:


    f splitPoints = map fst $ tail $ scanl (flip ($) . snd) ([], toSplit) $
    map splitAt splitPoints


    I wrote this code a year ago, and I don't know what it does! It's hard to read and hard to understand. So, however, is imperative code that says


    Add 5 to A, now if B is not zero we jump to where we subtract one from B and if C is less than 3 we add 4 to C otherwise we divide C by 2 and then add it to A, then we ...


    The reason both pieces of pseudocode are hard to understand is that they don't use the abstraction features built into the language. Good imperative code uses meaningful variable names, uses the structured-programming primitives the language provides, and abstracts complex operations into functions.

    My rule of thumb (which is, heh, not always religiously followed) is that a piece of program structure that does more than about 3-6 things is probably too complicated; it seems like that's about as much local context as I can hold in my head comfortably (and the number is more 3 than 6 these days, if you get my drift). As David puts it,


    If you'll bear with a poor comparison, sometimes programming is like a song. You do the tricky section, then you go back to an easier section and catch your breath for a bit.


    The problem seems to be that people trained on imperative languages, when they're tossed into the ocean of functional coding, can't find the guideposts and landmarks that would help them impose some structure on the water. Should I put this complicated expression inside a "let", or break it out into another function? When do I use a higher-order function to unify two dissimilar pieces of code? Should I write this code in terms of higher-order library functions or directly? It's easy to wander off down a chain of nested invocations of anonymous higher-order functions, or composed partially applied library functions, just "because you can" and end up forgetting what you were trying to do in the first place.

    Luckily, some of the basic rules of keeping your code readable remain more or less the same: assign intermediate results to variables with meaningful names, and abstract complicated operations into separate functions. To tackle David's example:


    You get sections with DoThisAndThisAndThatWithTheResultsOfSelectThisFromTableXYZ that you have to slow down to think through.

    ...

    GoToTheNextTrickyBit where ManyThingsHappen.

    All in all, you wind up with a sort of ebb and flow that works out pretty well if you're in tune with the code being written, going from intense calculations, to a line or two where you do no more than store things in a variable, take a breather, and prepare for the next important stanza.


    The way to "take a breath" in a functional language is generally to assign an intermediate result to a variable, or to extract a complicated operation into a function and give it a meaningful name. One Haskell approximation to David's example is


    do DoThis
    AndThis
    results - SelectThisFromTableXYZ
    someVal - AndThat results
    GoToTheNextTrickyBit someval


    If you're writing pure functional code, you might write


    let
    results = SelectThisFromTableXYZ
    someVal = AndThat results
    in
    GoToTheNextTrickyBit someVal


    Of course, this will become unreadable if you write a huge complicated nested "let" expression in place of "AndThat". For a truly dreadful example of this kind of coding, check out the Gnucash Scheme code that generates the "Cash Flow" report (warning: read this in short bursts, or you WILL go blind). This is exactly analogous to writing too many nested loops and conditionals in imperative code, and the fix is the same: find logically distinct bits of code and extract them into separate functions.

    I have a few more thoughts, but this post is getting too long, so I'll inflict them on the world in another post. The rule that short things are easier to understand applies to blog posts as well as code. :-)

    21 December 2006

    Enrico Zini: etch-on-asus-U5F

    Debian Etch on Asus U5F Model Asus U5F, with Intel Core 2 Duo T5500 Distribution Debian Etch amd64. Summary Video: works, with 3D and everything. Audio: works, with a little config change. Wireless LAN: works, with drivers from non-free. Bluetooth: works. Ethernet: works. SD card reader: works. DVD reader/burner: works. ACPI features: various problems. Suspend: broken. Installation and wireless card To have the wireless card working you need some package from non-free that is not provided with the standard installer. I installed using the binary 1 CD, then I fetched the following packages from unstable:
    firmware-ipw3945_0.3_all.deb
    ipw3945d_1.7.22-2_amd64.deb
    ipw3945-modules-2.6.18-3-amd64_2.6.18+1.1.2-2_amd64.deb
    linux-headers-2.6.18-3_2.6.18-8_amd64.deb
    linux-image-2.6.18-3-amd64_2.6.18-8_amd64.deb
    
    Once those packages are installed, wireless just works. Video Intel 945GM/GMS/940GML It just works, with 3D and everything. To turn on AIGLX and Compiz, just follow the HOWTO in the Debian wiki. Audio Intel 82801G To make it work add:
    options snd-hda-intel model=laptop-eapd
    
    to /etc/modprobe.d/alsa-base. Rationale: this link gives the quick solution. Note: no need to reboot:
    /etc/init.d/alsa unload
    modprobe snd-hda-intel
    
    The list of models available for the driver is in /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz A hint about the model to use can be found at the beginning of /proc/asound/card0/codec#0. CPU speed scaling Just modprobe speedstep-centrino. Then the cpufreq_ondemand module works fine. I'm a bit disappointed that it doesn't want to go below 996Mhz (60%) and it has only 3 scaling modes: 1.66 GHz, 1.33 GHz, 996 MHz. It used to display available scaling modes weirdly (it would repeat 1.66Ghz 6 times), then I updated the BIOS to version 304 and now it shows just those 3. The laptop tends to get warm, this disappoints me. I hope things will improve with newer kernels. USB Just works. SD card reader Just works. I put an SD card in and it gets mounted automatically. In the old Asus M2 the card reader was just some unsupported obscure thing. Ethernet RTL8111/8168B Gigabit Ethernet. I'm not sure it was working in the installer, but in the installed system it works out of the box. Very pleasant thing: it can cross the cable if needed. DVD reader/writer Just works. I haven't tried burning CDs or DVDs, but k3b sees it and correctly detects the writing speed. Bluetooth Just works. I connected to the bluetooth GPS just fine. ACPI Still quirky. Brightness control buttons don't work: before updating the BIOS I would get this reaction on syslog:
    Dec 17 23:57:35 viaza kernel: ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC0_._Q0E] (Node ffff81003e98bd90), AE_NOT_FOUND
    Dec 17 23:57:35 viaza kernel: ACPI Error (psargs-0355): [\_SB_.PCI0.P0P2.VGA_.LCDD] Namespace lookup failure, AE_NOT_FOUND
    
    After updating the BIOS I get this reaction instead:
    Dec 21 21:17:38 viaza kernel: video device notify
    Dec 21 21:17:38 viaza kernel: set_level status: 0
    Dec 21 21:17:38 viaza kernel: compiz.real[4013]: segfault at 0000000000000060 rip 000000000040b3b0 rsp 00007fff6c47f4e0 error 4
    
    compiz segfaults and I'm back to gdm, with the brightness unchanged. The LCD on/off button works. Controlling the LCD via software does not work:
    # echo 1 > /proc/acpi/asus/lcd
    Dec 21 22:22:45 viaza kernel: Asus ACPI: Error switching LCD
    # cat /proc/acpi/asus/lcd
    Dec 21 22:22:49 viaza kernel: Asus ACPI: Error reading LCD status
    0
    
    In fact, asus-acpi complains:
    Dec 21 17:08:29 viaza kernel: Asus Laptop ACPI Extras version 0.30
    Dec 21 17:08:29 viaza kernel:   unsupported model U5F, trying default values
    Dec 21 17:08:29 viaza kernel:   send /proc/acpi/dsdt to the developers
    
    Therefore, I sent the dsdt to the developers. The wireless on/off button turns on and off the wlan and bluetooth leds, and apparently also the wireless hardware. I still don't know how to turn off bluetooth and leave wlan on. Suspend Suspend to ram works, but on resume it does not turn on the LCD display. The LCD on/off button has no effect. Other things work fine, so I can blind-type a shutdown command. I have vbetool installed, but it doesn't seem to help. So far, suspend is still not usable. Modem Not tried.

    9 October 2006

    Martin-Éric Racine: ALSA pitfalls ... and a bounty ... or two

    Daniel Jacobowitz writes about problems he's having getting proper ALSA support for his desktop computer. Boy, does that sound familiar! I myself have three computers that are partially or totally unsupported on ALSA:
    • Apple iMac rev.D a.k.a. 333MHz G3 tray-loading iMac. Partially supported by snd-powermac, except that some controls are inverted and other controls just plain don't work. Probably something as simple as the wrong offset in the bitmap used to select the control on which to act. Bug filed in the ALSA BTS. No reaction. Anyhow, sound support for Apple products is being migrated to snd-aop, which was written from scratch using a modular architecture that enables easily adding support for new sound chips. Nice idea, except that no effort is being put towards supporting pre-G4 products... Back when Ubuntu appeared on the Linux scene, Mark Shuttleworth agreed to pay a 500$ bounty to whoever made ALSA work on all PowerMac variants. Nobody took it, as far as I know. Those who are interested in taking on this challenge might wanna check my wiki page for our summary of the ALSA PowerMac situation.
    • HP 9000 series model 712. Recently supported, thanks to someone on the PA-RISC Linux mailing list having a go at coding it. Never merged by upstream ALSA, though. It's been a while since I gave it a try but, last time, only output worked.
    • AMD Geode SCx200. There is no snd-scx200 driver at all. Bug filed in the ALSA BTS. The issue of sound support on early Geode products was also mentioned on the Linux kernel mailing list, during the big OSS cleanup discussion so, at least, some people are aware of the issue. It so happens that the Geode SC is used in a number of popular embedded boards, such as the Soekris and yet, nobody tried porting the old OSS drivers available on AMD's Geode driver source page. Odd.
    As we can see, there's plenty of ALSA support remaining to be coded, ported or cleaned up, and some people are willing to pay for the results. Who's gonna grab it?

    10 August 2006

    Erich Schubert: Going AMD64

    Up to now, my dad was using my old desktop PC, a celeron 412 MHz (366 overclocked) with Linux. Unfortunately, this trusty companion started to freeze within a few minutes after boot (even in BIOS). So after some 7 years, a replacement was needed. The guys at the computer shop (Computer Gallerie in munich) tried to convince me that nvidia is best for Linux. Basically I followed this recommendation because ATI isn't better, and there are not Intel-based onboard graphics for AMD. And AMD Sempron sounded like the cheapest CPU. And definitely cheaper than an Intel Core... But dudes: Nvidia is NOT included in the kernel. Trust me on that one. Nvidia is non-free, and their drivers most likely violate the GPL. So I ended up buying an ASRock 939NF4G-VSTA mainboard and an AMD Sempron CPU. 1 GB of RAM, an HDD, an okay housing. Just below 400 Euro, that is what I had expected. After some fighting with the hardware (the HDD didn't fit into its slot, I had to bend away some metal. No docs on which way to put the power LED plug on etc.), I was finally able to boot the system. I used todays daily-build of the netinstall CD image for AMD64. I.e. the to-be etch installer. Worked like a charm. After some downloading over my 2 mbit DSL line the system was up and running. Graphics were VESA, as expected. With some fighting with the annoying non-free Nvidia drivers, I had them working, too. Ethernet worked out of the box; I don't know about S-ATA (a driver is loaded though), temperature sensors seem to work, too. Sound doesn't work yet. The snd_hda_intel driver is loaded, however there is no sound to be heard on any of the 7.1 channels. The mixer only shows "Master" and "Capture" volume controls. If anyone knows how to get sound out of a
    00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
    Subsystem: ASRock Incorporation Unknown device 0888
    
    device, I'd welcome any hints. Kernel is 2.6.17-1-amd64-k8. Maybe I just have to get a newer Alsa with some hardware information on this device? [Update: this is a realtek ALC 888, there is a patch for this to come in 2.6.18...] Anyway, I now have a AMD64 box, and as soon as I've setup some i386 chroot I'll have a useable build-box after all. ;-) And maybe I can do some SELinux testing on it, too. OTOH, I should get myself a diploma thesis topic now, and work on my final thesis.

    9 August 2006

    Ross Burton: ALSA Woes

    Has anyone seen this, and know a solution, for ALSA on a ThinkPad X60:
    $ esd
    ALSA lib pcm_direct.c:786:(snd_pcm_direct_initialize_slave) snd_pcm_hw_params_any failed
    ALSA lib pcm_dmix.c:831:(snd_pcm_dmix_open) unable to initialize slave
    The sound card is a standard Intel chipset:
    0000:00:1b.0 0403: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

    5 August 2006

    Matt Brown: Working sound on an HP dc7600

    Back in April I mentioned the fun and games I had trying to get a nice dual-DVI setup working with my new HP dc7600. The other problem that I’ve been experiencing since then is a complete inability to play any audio. The machine has an Intel ICH7 High Definition audio chipset onboard which is theoretically supported fine by the snd-hda-intel kernel module, and indeed everything loads fine and shows up in /proc correctly. However nothing ever comes out the speakers! lspci output below
    0000:00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
    Subsystem: Hewlett-Packard Company: Unknown device 3010
    Flags: bus master, fast devsel, latency 0, IRQ 21
    Memory at e0a00000 (64-bit, non-prefetchable) [size=16K]
    Capabilities:
    Today I sat down and tried to work out what was going on, it turns out the Realtek ALC260 chipset that is used on this motherboard supports quite a few different pinouts, so while snd-hda-intel knows how to drive it you don’t actually get any sound unless you have the correct mapping setup! The driver attempts to do this automatically for a number of different motherboards and there is a entry in the table for my particular motherboard (Subsystem 0×3010) mapping it to the ALC260_HP patching, but still nothing works! Eventually I stumbled across ALSA Bug #2157 which fixes an identical problem for a different motherboard (Subsystem 0×3012) by using the ALC260_HP_3013 mapping in the driver. So, taking a guess, I made the same change for the 0×3010 mapping, rebooted, and voila, I have sound. Patch below:
    --- sound/pci/hda/patch_realtek.c.orig 2006-08-05 21:13:49.000000000 +1200
    +++ sound/pci/hda/patch_realtek.c 2006-08-05 20:33:17.000000000 +1200
    @@ -2951,7 +2951,7 @@
    .pci_subvendor = 0x152d, .pci_subdevice = 0x0729,
    .config = ALC260_BASIC , /* CTL Travel Master U553W */
    .modelname = "hp", .config = ALC260_HP ,
    - .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP ,
    + .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP_3013 ,
    .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP ,
    .pci_subvendor = 0x103c, .pci_subdevice = 0x3012, .config = ALC260_HP ,
    .pci_subvendor = 0x103c, .pci_subdevice = 0x3013, .config = ALC260_HP_3013 ,

    4 June 2006

    Enrico Zini: Dapper on XEN (part 1/1, unfinished)

    I need to do some work on a Dapper system, so it's time to try out xen:
    apt-get install linux-image-2.6-xen-686 xen-hypervisor-3.0-i386 xen-utils-3.0 xen-tools
    
    xen-tools tries to recommend xen, which is old and has been requested to be removed from the archive. The recommends needs to be ignored, which is not that trivial to do with aptitude. The linux-image doesn't happen to have an initrd. The bug has already been reported. One can recreate one using:
    mkinitrd -o/boot/initrd-2.6.16-2-xen-686.img  2.6.16-2-xen-686
    
    Then one adds this to /boot/grub/menu.lst:
    title Xen
    root (hd0,0)
    kernel /boot/xen-3.0-i386.gz
    module /boot/vmlinuz-2.6.16-2-xen-686 root=/dev/hda1
    module /boot/initrd.img-2.6.16-2-xen-smp
    
    And it boots lovely:
    # xm list
    Name                              ID Mem(MiB) VCPUs State  Time(s)
    Domain-0                           0      939     2 r-----  4677.9
    
    Now xen-tools provides xen-create-image. I'll try to create the Dapper image (deboostrap in my system has already been changed to be able to install dapper):
    xen-create-image --size=4G --swap=128M --dhcp --volume=marvin \
                     --hostname=cavazza --dist=dapper --fs=xfs
    
    But I get:
    [...]
    Creating swapfile : /dev/marvin/cavazza-swap
    Done
    Creating disk image: /dev/marvin/cavazza-root
    Done
    Creating xfs filesystem
    Done
    Installing the base system.   This will take a while!
    Copying files from host to image.
    Finished
    Something went wrong with the debootstrap installation
    Aborting
    
    I love detailed error messages. This one is not. So I'll have to do by hand. The documentation says:
    Before you can start an additional domain, you must create a configuration file. We provide two example files which you can use as a starting point:
    • /etc/xen/xmexample1 is a simple template configuration file for describing a single VM.
    • /etc/xen/xmexample2 file is a template description that is intended to be reused for multiple virtual machines. Setting the value of the vmid variable on the xm command line fills in parts of this template.
    But in Debian there's no trace of the two example files. I've reported to Guido Trotter. Then I googled for the two files and found them. Now, on to adapt Dapper to run under Xen. The good Ubuntu wiki has an HOWTO which crudely makes you install the Tarballed Pre-built installations of Xen 3.0. It's sad that xen-enabled kernels didn't make it into Dapper roper. I can make this:
    kernel = "/boot/vmlinuz-xen-domu"
    memory = 128
    name = "Dapper"
    disk = [ 'phy:marvin/dapper,hda1,w' ]
    dhcp="dhcp"
    root = "/dev/hda1 ro"
    
    I used the pre-built kernel as a domU, but:
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)
    
    Sigh. I'll try with the Debian Xen-enabled kernels. Installing yaird and linux-image-2.6.16-2-xen-686_2.6.16-14_i386.deb and linux-modules-2.6.16-2-xen-686. It WORKS! Now, that's not Dapper: that's a debootstrap install of it. No user, no root password, no desktop, no shiny Ubuntu custom config. How to finish the installation? No idea. In the past, I could run base-config, but now it doesn't exist anymore. It seems that the best bet is not to use debootstrap, but to install the CD in the LVM partition using QEMU and then chroot into it and then install the debian xen kernel to boot it. A QEMU install will take ages, and I expect some trouble, like getting partman to see LVM. Maybe I better install on a disk image file and then use tar and netcat to bring the ubuntu installation out of the disk image and into the LVM image. For today, I didn't make it. This job slips another day. Frustration. I hope that at least this description of my efforts so far can be helpful to someone trying similar things. One suggestion I got was to boot the Dapper CD and install from there. I can't: this computer has no bootable CD. Update: I found out http://xensource.com/summerofcode.html and it says:
    Project Idea 3: Xen Desktop Outside of Domain 0 This project would deliver a Xen desktop to the user of a client system that presents an abstraction of a virtual desktop to the user in which multiple guests share the virtual desktop, each with a subset of the desktop resources (pixels, etc). Smart management of the sound drivers would allow mixing of sound from multiple guests to the single device used for output. Microphone input could be broadcast to all guests. Technologies such as ALSA already emulate playback settings by downsampling for the hardware etc. so its not hard to imagine a xen-snd-front device munging the data to a common format used for the internal sound card. Issues: synchronization of playback.
    So, what I'm trying to do has been proposed as a SoC project and (I guess) is something that can't be done overnight. Although I was planning to run a diskless gdm accessed with XDMCMP from domain0's X server, and to just hand out the audio card to the domU using pciback, so my task would have been easier. Thus I give up using Xen for this one. I'll work around the lack-of-bootable-cd limitation of this computer by installing Ubuntu using QEMU. Which I found out requires using the "Alternate install" CD. The desktop install CD is a live CD installing with Ubuntu Expresso, and the live CD doesn't seem to work in QEMU. Or, I'll install in a LVM partition in the laptop and then move it around using the network. This one's probably faster. Could this experience be an interesting use case for Edgy Eft?

    2 June 2006

    Uwe Hermann: OS Install Experiences - Part 3: PC-BSD [Update]


    Note: This article is part of my OS Install Experiences series.
    
    I'll continue with the recently released operating system PC-BSD 1.1, which is based on FreeBSD 6.1. This is actually the first time I installed a BSD-like OS, so I thought it would be a bit of a hassle. But I was surprised to find that the install was really pretty easy (which is a major goal of PC-BSD, as I understand it). I didn't even read a manual or installation instructions or anything... Install
    1. First, I downloaded a PC-BSD 1.1 CD #1 image, burned it on a CD, and booted from that.
    2. The first installer screen is text-based (later it's graphical), and allows you to choose between a normal install ("boot FreeBSD"), install "with ACPI", "safe mode", "single user mode", and "with verbose logging". You can also "escape to loader prompt", or "reboot".
    3. While the installer runs, it merely shows a nice desktop background, pressing any key shows you the boot messages.
    4. After a while you can select a screen resolution for the graphical installer, run fdisk, escape into an "emergency shell", chroot into the root partition, or reboot. Default is to start the installation at a pre-selected screen resolution.
    5. You can choose the language and keyboard layout. Although you can click "back" to return to previous steps in the installer, you can not go back to the language/keyboard selection later!
    6. Partitioning. First, you can choose on which disk to install, then choose the partition to use. The list only shows the primary partitions and an "extended DOS" partition. Device names for disks are a bit different in BSD world. /dev/ad0 (counting starts at 0) is the first disk, /dev/ad0s1 (counting starts at 1) the first "partition" (called "slice" in BSD). It doesn't seem to be possible to install PC-BSD on an extended partition (please correct me if I'm wrong), so I installed it on /dev/hda2 (/dev/ad0s2 in BSD-speak), which is a primary partition. To make things more complex and confusing, a BSD slice can contain multiple "partitions" (not the same as Linux partitions!). I now have /dev/ad0s2a, which is the boot partition, and /dev/ad0s2b, the swap partition. Confused? Me too.
    7. Note that changes made to the partition table seem to be effective immediately, there's no way to go back without losing data! Debian's installer is better at this. The default PC-BSD file system is UFS, btw.
    8. The hardware will be automatically detected (worked quite well for me).
    9. You can now choose to either install the BSD bootloader in the MBR, or install no bootloader at all. Not sure what the best thing for me is here, but I decided to install the BSD bootloader (overwriting GRUB). I might have to re-install GRUB (and tell it about PC-BSD) if the BSD bootloader cannot boot the other (Linux) OSes.
    10. Now I must enter the root password, and I can also create another user. I noticed that passwords can only contain alpha-numeric characters (no %$ ,.#+!? and so on). WTF? They can't be serious... Also, you must enter a real name for the normal user, it won't let you continue until you type something... Pretty annoying. There's a checkbox called "Auto-Login User?" which is enabled by default, but I didn't find out what exactly that does...
    11. The network is successfully auto-configured via DHCP. I was not asked for a hostname, but typed hostname after the install and I got PCBSD.localhost.
    12. Reboot. The CD is not ejected automatically, you have to remove it manually before booting up.
    13. I'm asked to insert CD 2 (language packs), which I don't have (or want), as I only burned CD 1. Clicking "abort" does the trick, and I can continue with English as the default language.
    14. Finally, I'm dropped into a KDE session, and that's it.
    Security That's it. Comments, suggestions, flames? Update 2006-06-02: Added IPv6 netstat/sockstat output.

    27 April 2006

    Steve Kemp: All my people

    udev? I upgraded my machine last night and it decided it didn’t like the look of hotplug anymore installing udev instead. Fine. I can be brave. Rebooting and hoping for the best all seemed well. Until I noticed that /dev/dsp wasn’t recreated. My working system had the following modules loaded:
    i810_audio             31028  0
    ac97_codec             17004  1 i810_audio
    soundcore               8672  2 snd,i810_audio
    
    The system has an SIS audio system:
    0000:00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] Sound Controller (rev a0)
    
    So how do I persuade udev to use this? Right now I have no /dev/dsp device. If I manually install some modules I can make the dsp device appear - but surely I shouldn’t have to do that?
    root@itchy:~# ls /dev/dsp
    ls: /dev/dsp: No such file or directory
    root@itchy:~# modprobe  snd_intel8x0  snd_pcm
    root@itchy:~# modprobe snd_pcm_oss
    root@itchy:~# modprobe snd_intel8x0
    root@itchy:~# ls /dev/dsp
    /dev/dsp
    root@itchy:~# ls /dev/dsp -l
    crw-rw---- 1 root audio 14, 3 Apr 27 10:26 /dev/dsp
    
    (Obviously if this is what I’m supposed to do I can add the module names to /etc/modules - it just seems strange to me!)

    7 January 2006

    Martin F. Krafft: Unstable Linux

    One thing I will never understand about this Linux hype are the operating system's miserable failures in the wake of hardware problems. Coming home from dinner, I find this all over my consoles:
    Message from syslogd@piper at Sat Jan  7 22:53:35 2006 ...
    piper kernel: Oops: 0002 [18] 
    Message from syslogd@piper at Sat Jan  7 22:53:35 2006 ...
    piper kernel: CR2: 0000004000000004
    
    Since then, I cannot start new processes anymore (though apache2 and old processes work just fine), which means I cannot SSH into the box (which is far away from where I am right now), and thus it's become useless. The problem could be anything: corrupt memory, a broken CPU, a harddrive with bad blocks in the swap area, etc... since Linux obviously seems to be able to wall in response to a problem, I would only wish it wouldn't pout as a consequence but handle the event more gracefully. If only I had the time and energy to finally wave goodbye and choose NetBSD... Update: I managed to get a dmesg output:
    <1>Unable to handle kernel paging request at 0000004000000004 RIP: 
    <ffffffff80152c54> find_get_pages+36 
    PGD 72cee067 PUD 0 
    Oops: 0002 [18] 
    CPU 0 
    Modules linked in: rfcomm l2cap ipv6 af_packet ipt_REJECT ipt_state
    iptable_filter iptable_nat ip_conntrack ip_tables deflate zlib_deflate
    twofish serpent aes blowfish des sha256 sha1 md5 crypto_null af_key usbhid
    hci_usb bluetooth raid5 xor dm_mod sbp2 ide_generic ide_cd eth1394
    snd_seq_dummy snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq
    snd_via82xx gameport snd_ac97_codec snd_pcm_oss snd_mixer_oss snd_pcm
    snd_timer snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_device snd
    i2c_viapro soundcore i2c_core ehci_hcd via82cxxx ohci1394 shpchp pci_hotplug
    sk98lin uhci_hcd ide_core ieee1394 rtc parport_pc parport floppy psmouse
    pcspkr serio_raw evdev xfs exportfs sr_mod cdrom sd_mod sata_via
    sata_promise libata sg scsi_mod raid1 md unix fbcon tileblit font bitblit
    vesafb cfbcopyarea cfbimgblt cfbfillrect softcursor
    Pid: 136, comm: kswapd0 Not tainted 2.6.12-1-amd64-k8
    RIP: 0010:[<ffffffff80152c54>] <ffffffff80152c54> find_get_pages+36 
    RSP: 0018:ffff81007f90dcc8  EFLAGS: 00010002
    RAX: 0000004000000000 RBX: ffff81007f90dd08 RCX: ffff81007f90dd10
    RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffff81000289f678
    RBP: 0000000000000000 R08: 0000000000000000 R09: ffff81007113f670
    R10: 0000000000000040 R11: 0000000000000000 R12: ffff8100705e54e0
    R13: 000000000000007a R14: ffffffffffffffff R15: ffff8100705e55f8
    FS:  00002aaaab730d70(0000) GS:ffffffff8040f940(0000) knlGS:0000000000000000
    CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
    CR2: 0000004000000004 CR3: 0000000072925000 CR4: 00000000000006e0
    Process kswapd0 (pid: 136, threadinfo ffff81007f90c000, task ffff81007f906760)
    Stack: ffff81007f90dcf8 ffffffff8015bca7 ffff8100705e54f0 ffffffff8015c905 
           ffff810001172200 0000000000000000 0000000000000000 0000000000000000 
           ffff81000289f678 0000004000000000 
    Call Trace:<ffffffff8015bca7> pagevec_lookup+23 
               <ffffffff8015c905> invalidate_mapping_pages+245 
               <ffffffff8018a403> shrink_icache_memory+259 
               <ffffffff8012d144> recalc_task_prio+324 
               <ffffffff8015ca01> shrink_slab+193 
               <ffffffff8015dcaf> balance_pgdat+623 
               <ffffffff8015df37> kswapd+295 
               <ffffffff80144e00> autoremove_wake_function+0 
               <ffffffff8010f0f7> child_rip+8  <ffffffff8015de10> kswapd+0 
               <ffffffff8010f0ef> child_rip+0  
    Code: ff 40 04 ff c2 48 83 c1 08 39 d6 75 f0 fb 5b 89 f0 c3 66 66 
    RIP <ffffffff80152c54> find_get_pages+36  RSP <ffff81007f90dcc8>
    CR2: 0000004000000004
    
    Now, how does a mere mortal diagnose this? This was the third in a series of oopses, the others occurred in a find process... the machine runs a software RAID5, so it really could be anything, right?

    Next.

    Previous.