Search

 

Recent Posts

Categories

Archives

Blogroll

24
Jul

Creative X-fi Linux [Update]

If you struggled to find a solution to your problem and this article helped, please Digg it up, or Retweet. It helps others to find the solution.


The date of this post was July 24th 2009, it has been edited and updated over time however read the whole post before following the guide, especially the paragraph starting “A quick bit of advice”.

After two months or so the guide I posted for installing an X-fi card on Ubuntu could use a little update, so here goes. This guide is very similar to the guide posted in May, however it does include updated drivers and a bit more info.

A quick bit of advice, Ubuntu 9.10 and Linux Mint 8 have out of the box support for Creative X-fi sound cards through their built in ALSA driver. Also the drivers in this guide are old releases, I strongly encourage everyone to upgrade to a newer install of Ubuntu/Mint (if that is an option).

Quick message of warning from the driver developer:

Note that the ctxfi driver might conflict with the HD-audio driver.
So it’d be nice if you save the output of lspci before loading the drivers and let me know if any problem happens. Also, at testing, please check the kernel message. If this conflict really happens, try to build without hd-audio, that is, run configure with “–with-cards=ctxfi” option in addition to others, and test whether it works with this workaround (better after reboot to reset the board info by BIOS).

A quick tip from John:

After updating the kernel the drivers will need to be compiled against the new kernel header files. To do this simply follow the guide again, all steps this ensures the latest Alsa drivers are used.

A quick input from Jo:

If gnome-sound-properties doesn’t work for whatever reason, you can access it via System > Preferences > Sound.

The How To:

Step 1:
First off you can get the latest most up to date version of the drivers from here: Alsa Snapshot FTP

Step 2:
Now we need to setup the system to be able to compile these files so, open a terminal and use the following commands:

1
2
3
4
sudo apt-get update
apt-cache search linux-headers-$(uname -r)
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install build-essential


Step 3:
Now we need to extract these packages and then compile, so browse to your download location, for the sake of this guide, we are using the desktop:

1
2
3
4
cd ~
cd Desktop
tar -zxf alsa-driver-unstable-snapshot.tar.gz
cd alsa-driver-unstable-snapshot

Step 4:
Now we are in the folder of extracted files, we need to grant relevant permissions to what we need:

1
sudo chmod 700 configure

Now we run the configure file:

1
./configure

This runs the configuration as root, now we need to make the files:

1
make

Next we install the package:

1
sudo make install

Step 5:
The ALSA drivers are loaded by default on Ubuntu, so this should be setup complete, reboot the machine to find out.

Important, by default the drivers are muted, adjust the volume through the Alsa mixer:

1
alsamixer

This command opens up the mixer for Alsa itself, use tab to move between “input”, “output” and “all”, left and right to move column to column, up and down to adjust volume. Then once adjusted press escape to exit. The mixer starts off on mute for the card, what you are after is similar to this:

You can control the volume using the Gnome sound controls.

1
gnome-sound-properties

Make sure all the boxes read ALSA.

All done.

A few small fixes if you run into trouble:

On a related note, Pulseaudio has been known to cause issues with the Alsa drivers, if there is a problem with your sound, e.g. cutting out after a while, try removing Pulseaudio. This has not caused me any issues, however there was mention on the Ubuntu forums that this caused problems with Amarok. A small note, these problems do not occur for everyone so do not follow this step unless you are experiencing issues and need to troubleshoot.

1
sudo apt-get remove pulseaudio pulseaudio-utils

John suffered trouble where the X-fi drivers weren’t loading at startup properly, he fixed this by adding the following line to the “etc/modules” file:

1
snd_ctxfi

If you have any other suggestions to make this guide more user friendly, leave a comment. :)

I would just like to thank anyone who has contributed through the comments section, specifically John and Jo.

authorimage This site is maintained by James Travers a 19 year old 4th year student in the field of computing and networks. As an avid user of Linux and open source software I want to spread the advantages of using free software, and give help and advice where I see it required. This site was started as a way of posting answers to questions posed by users about many topics to do with computing, the site then grew into a small knowledge bank of useful information for Linux, Windows and even OSX users.

This site is designed to be fully compliant with the latest web standards, these include: XHTML 1.0 Transitional CSS 2.1 Section 508 Accesibility Valid RSS.

36 Responses to “Creative X-fi Linux [Update]”

  1. pingback pingback:
    1
    Install Alsa with support for Creative X-fi on Ubuntu | Rants from a Scottish geek

    [...] Creative X-fi Linux [Update]Recommended ReadingCreative X-fi on Vectorlinux 6Installing Firefox 3.5 on UbuntuUbuntu 9.04 – A month laterGreasemonkey – Bebo and Facebook scripts [...]

  2. pingback pingback:
    2
    Creative X-Fi drivers finally available for Linux « Mesanna’s Weblog

    [...] you want to set up your X-Fi in the meantime however, I found an excellent installation guide here, which I used myself and so far all seems to be working well. The only teeny problem I encountered [...]

  3. AvatarJohn
    3

    The only thing I thought I’d mention is that if you upgrade the kernel you will have to re-compile with the updated kernel headers. I wasn’t thinking about this until I upgraded my kernel today, and that is a good piece of information for new users to the Linux community. (I remember struggling with guides when I first started using Linux). Sometimes the simplest thing can be overlooked.

    Once again, very well done James. Let me know if I can help in any way.

    Quote

  4. AvatarJames
    4
    Author Comment

    Thank you again for your contribution John, I will add this as a note to the guide as it is very important, and I overlooked this as I personally haven’t updated my Kernel since install of the drivers.

    Quote

  5. AvatarPatrick
    5

    hey

    Quote

  6. AvatarStopSpazzing
    6

    Have an issue…Followed directions perfect but cannot make:
    [code]make
    if [ ! -d include/sound -a ! -L include/sound ]; then \
    ln -sf ../alsa-kernel/include include/sound ; \
    fi
    cp -puvf include/version.h include/sound/version.h
    make dep
    make[1]: Entering directory `/home/stopspazzing/Desktop/alsa-driver-unstable'
    if [ ! -d include/sound -a ! -L include/sound ]; then \
    ln -sf ../alsa-kernel/include include/sound ; \
    fi
    cp -puvf include/version.h include/sound/version.h
    make[2]: Entering directory `/home/stopspazzing/Desktop/alsa-driver-unstable/acore'
    copying file alsa-kernel/core/pcm.c
    patching file pcm.c
    Hunk #2 FAILED at 30.
    Hunk #3 FAILED at 737.
    Hunk #4 succeeded at 927 (offset -9 lines).
    Hunk #5 succeeded at 943 (offset -9 lines).
    Hunk #6 FAILED at 975.
    Hunk #7 FAILED at 1034.
    4 out of 7 hunks FAILED -- saving rejects to file pcm.c.rej
    make[2]: *** [pcm.c] Error 1
    make[2]: Leaving directory `/home/stopspazzing/Desktop/alsa-driver-unstable/acore'
    make[1]: *** [dep] Error 1
    make[1]: Leaving directory `/home/stopspazzing/Desktop/alsa-driver-unstable'
    make: *** [include/sndversions.h] Error 2
    [/code]

    Quote

  7. AvatarJames
    7

    @StopSpazzing, try running “sudo make” instead of just make, I know the guide specifies “make” however permissions issues do occur occasionally.

    If this doesn’t solve it make sure you’ve got the correct dependencies (these are taken from an old script I used for Alsa install, but should be correct):
    sudo apt-get install build-essential ncurses-dev gettext && sudo apt-get install linux-headers-`uname -r`

    Quote

  8. AvatarStopSpazzing
    8

    Thanks James for such a quick response.

    I actually was running in “su” when i performed all of the terminal commands. I will try installing the packages you suggested after I get home, but I know for a fact i have build-essentials aswell as linux-headers for my current build. I will reply back when I have tried installing the suggested packages so everyone that may come apon this error can benefit.

    Quote

  9. AvatarStopSpazzing
    9

    Tried again after installing the provided packages.

    stopspazzing-desktop alsa-driver-unstable # make
    if [ ! -d include/sound -a ! -L include/sound ]; then \
    ln -sf ../alsa-kernel/include include/sound ; \
    fi
    cp -puvf include/version.h include/sound/version.h
    make dep
    make[1]: Entering directory `/home/stopspazzing/Desktop/alsa-driver-unstable’
    if [ ! -d include/sound -a ! -L include/sound ]; then \
    ln -sf ../alsa-kernel/include include/sound ; \
    fi
    cp -puvf include/version.h include/sound/version.h
    make[2]: Entering directory `/home/stopspazzing/Desktop/alsa-driver-unstable/acore’
    copying file alsa-kernel/core/pcm.c
    patching file pcm.c
    Hunk #2 FAILED at 30.
    Hunk #3 FAILED at 737.
    Hunk #4 succeeded at 927 (offset -9 lines).
    Hunk #5 succeeded at 943 (offset -9 lines).
    Hunk #6 FAILED at 975.
    Hunk #7 FAILED at 1034.
    4 out of 7 hunks FAILED — saving rejects to file pcm.c.rej
    make[2]: *** [pcm.c] Error 1
    make[2]: Leaving directory `/home/stopspazzing/Desktop/alsa-driver-unstable/acore’
    make[1]: *** [dep] Error 1
    make[1]: Leaving directory `/home/stopspazzing/Desktop/alsa-driver-unstable’
    make: *** [include/sndversions.h] Error 2

    Quote

  10. AvatarStopSpazzing
    10

    Hmm weird. So I decided just to delete the file and re-download it…and it turns out the tar was just corrupted and the new download works just fine and I am compiling it as we speak. Thanks for your help James. I hope this fixes my sound issues. Thanks!!

    Quote

  11. AvatarStopSpazzing
    11

    stopspazzing@stopspazzing-desktop ~/Desktop $ gnome-sound-properties
    (gnome-sound-properties:4331): sound-properties-DEBUG: setting theme LinuxMint
    sound-properties-Message: Error running pipeline ‘audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink’: Could not open audio device for playback. [gstalsasink.c(694): gst_alsasink_open (): /GstBin:bin0/GstAlsaSink:alsasink0:
    Playback open error on device 'default': No such file or directory]

    Any Ideas?

    Alsamixer and aslamixergui doesnt work for me either…gives me an error:

    alsamixer: function snd_ctl_open failed for default: No such file or directory

    Quote

  12. AvatarJames
    12

    @StopSpazzing – A reboot is required between installing the drivers and being able to use them.

    I assume you are running Mint 9.04 Gnome?

    Quote

  13. AvatarStopSpazzing
    13

    I am running Linux Mint 7 (Gloria) x64 Edition. It uses the gnome enviroment, correct. I did reboot before testing it. Also tried added the snd_ctxfi to ‘etc/modules’ and rebooted again, still to no avail.

    Quote

  14. AvatarJames
    14

    I’m sorry StopSpazzing, the driver as far as I am aware is 32bit only, which is most likely the cause of the problem. :(

    Quote

  15. AvatarStopSpazzing
    15

    Well, that’s definitely a deal killer…Thanks for your help James. You may want to make note that it only works for 32bit linux. :)

    Quote

  16. AvatarJames
    16

    I’ve had a quick look around the web and can’t find confirmation that they are purely 32bit, but I do believe they are.

    However you could always try just enabling support in the drivers for your X-fi, when you reach the “./configure” step:
    ./configure –with-cards=ctxfi

    Perhaps you could install a 32bit system to test if the drivers are working on your setup, depending on architecture (Mint 7 Gloria X86).

    Quote

  17. Avatarnicolas
    17

    works find on ubuntu amd64

    make sure you install ia32libs before compiling

    Quote

  18. AvatarStopSpazzing
    18

    James: I’ve had a quick look around the web and can’t find confirmation that they are purely 32bit, but I do believe they are.However you could always try just enabling support in the drivers for your X-fi, when you reach the “./configure” step:
    ./configure –with-cards=ctxfiPerhaps you could install a 32bit system to test if the drivers are working on your setup, depending on architecture (Mint 7 Gloria X86).

    I have already using the “with cards” parameter. I will try installing IA32libs before compiling and see if that gets me anywhere. Linux Mint is based on ubuntu so if it works on ubuntu 64bit then it should work just fine on linux mint 64bit…supposably.

    Quote

  19. AvatarStopSpazzing
    19

    stopspazzing@stopspazzing-desktop ~/Desktop $ sudo apt-get install ia32-libs
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    ia32-libs is already the newest version.
    ia32-libs set to manually installed.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    stopspazzing@stopspazzing-desktop ~/Desktop $

    ia32-libs is already installed as you can see from above.

    Quote

  20. AvatarStopSpazzing
    20

    I would also like to note that under step 3, #4 “cd alsa-driver-unstable-snapshot” Should be changed to “cd alsa-driver-unstable” because it extracts to the folder “alsa-driver-unstable” which is not the same as the package name.

    Quote

  21. AvatarStopSpazzing
    21

    Ok, another issue with your guide… run configure with “–with-cards=ctxfi” is not correct. Should be changed to… run with “-with-cards=ctxfi”. (I originally copied and pasted from the website that provided the option) hence why didnt find it the first time around. I am trying to compile again after updating to latest headers and confirming I have everything, aswell as trying again with the with cards param.

    Quote

  22. Avatarnicolas
    22

    try using the current stable version instead of unstable.

    Quote

  23. Avatarnicolas
    23

    try using the stable version.
    that is the one i am using this one.

    Quote

  24. AvatarStopSpazzing
    24

    I just finished trying nicolas recommendation of using the stable build 1.0.21. Linux does not detect the sound card STILL.

    I used the following guide..http://monespaceperso.org/blog-en/2009/08/31/upgrade-alsa-1-0-21-on-ubuntu-jaunty-9-04/

    just changed -with-cards=hd_intel to ctfxi everything went without a hitch…and even ran alsaconf and it showed the config for xfi card…still after everything the system will not let me select a sound card under sound.

    If ANYONE has any OTHER ideas I am open to trying anything.

    Quote

  25. Avatarp0ch
    25

    is this alright to use with 9.10 x64? i’m having problems with ubuntu 9.10 like i can’t use my microphone. but it worked back in 9.04 hope you can help me :(

    Quote

  26. AvatarRich Brown
    26

    Well, I got my X-Fi working thanks to your instructions but the pitch and speed of any audio file are too fast by about 15%. Strange. How do I fix this?

    My comp: Intel DP35DP Mainboard, Intel Quad Core Processor 2.40 GHZ, 4 GB RAM, Running Linux Mint 7.

    Quote

  27. AvatarJames
    27

    Rich,

    What program are you trying to play audio through, or is this in all players?

    Quote

  28. AvatarRich Brown
    28

    It appears to be an issue in all players – Gnome MPlayer, VLC – even Audacity.

    Quote

  29. AvatarJames
    29

    Do you have a different sound card you could test sound on, the issue could be codecs for audio.

    Do Youtube video’s work okay?

    Quote

  30. AvatarRich Brown
    30

    @James – my onboard sound works just fine, and on Youtube I get video but no sound at all.

    Quote

  31. AvatarJames
    31

    I would suggest Rich that you move onto Mint 8, which was released in the past few days, it should (as with Ubuntu’s latest offering) have the Alsa driver support for the X-fi by default. As for the sound issue you are currently experiencing I can’t think of one issue that would cause them, so the upgrade should be simpler.

    Quote

  32. AvatarRich Brown
    32

    @ James – Mint 8 did the trick. Thanks!

    Quote

  33. AvatarJo
    33

    Hey,

    Just wanted to report in:
    1. Fresh Ubuntu 9.10 install.
    2. Disabled on-board audio and installed card(X-Fi).
    3. Downloaded the drivers you instructed(unstable).
    4. I followed your directions as root so I didn’t sudo.

    It works!

    Note: I entered gnome-sound-properties in shell and that didn’t work. You may wish to update your HOWTO indicating this app is found under System > Preferences > Sound.

    Great HOWTO! Three thumbs up. :)

    /Scottish-Canadian g33k

    Quote

  34. Avatarpat(new to Linux)
    34

    have no sound at all now, saying “dummy” output.
    Am using MINT 8. How do I reverse the process? HEEEELP!!!!!

    Quote

  35. AvatarJames
    35

    pat(new to Linux): have no sound at all now, saying “dummy” output.
    Am using MINT 8. How do I reverse the process? HEEEELP!!!!!

    Pat,

    Linux Mint 8 has support for the X-fi cards supported by the driver above, if the system didn’t recognize the card by default there is a bigger issue.

    What exact steps have you carried out?

    Quote

  36. Avatarpat
    36

    Thanx for getting back to me James.
    I did a fresh install and now recognizes ” Internal Audio Analog Stereo”. So think I will leave it as is. :-)

    Quote

Leave a comment