Mailing List Archive

Cant load bttv module, ALSA module load problem
Please help, im at my wits end here. I have been lurking for about a
week and have read hundreds of messages on here about people trials and
tribulations in getting Myth up and running. I am running RedHat 9, have
an ATI Tv Wonder VE and know it is card=64 and tuner=2. My current
problem is I had the card working using xawtv at work where I was
configuring the box. I initially had trouble loading the bttv module
with insmod, though I dont remember the error offhand. A friend of mine
who is good with linux told me to use modprobe to load it, and lo and
behold it worked. I used Xawtv to see that it worked. When I tried to
use "Watch TV" in mythfrontend I got the same thing I did before I
actually installed the tuner card, the system locked up hard, had to
reset it. I did some more searching in the list archives and found that
someone had the same problem and it was suggested that their problem was
the fact they didnt have ALSA installed, so I got the alsa-driv*,
alsa-lib* and alsa-util* and followed the instructions on the alsa site
for my sound board (onboard via-82c686 chipset), all the builds and make
installs worked great but when it came time to modprobe the modules, it
would load due to this error message:

/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: unresolved symbol
schedule_work
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o failed
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod snd-via82xx
failed

By now it was time to come home, so I just shut down the box and brought
it home. Once i got it set up I booted it up and went to load bttv with
"modprobe bttv card=64 tuner=2" now i get this message:

/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o: unresolved
symbol mod_firmware_load_R39e3dd23
/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o: insmod
/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o failed
/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o: insmod bttv
failed

I just tried again to load bttv, and it loaded just fine. I have no idea
why sometimes it will load and sometimes it wont. Plus the ALSA thing
is killing me.

I have searched the list archives, the internet, the docs. I have
downloaded a vanilla 2.4.20 kernel source tree and compiled it and
successfully gotten it to boot, but my nic doesnt work on it nor do any
of my modules load, none of them (lsmod shows no modules at all). Its
like they dont even exist. I boot back to this one and lsmod shows a
bunch of modules loaded.

If anyone here feels they can help me and if you want to initiate a
one-on-one please feel free to email me, im pulling my hair out here.
Take pity please. :)

Michael
Re: Cant load bttv module, ALSA module load problem [ In reply to ]
First thing -- these are not MythTV problems. They are kernel problems. So
if you need extended help, you probably should get it not here but either
on a Red Hat users' list or a general Linux-support list (an example is
linux-newbie@vger.kernel.org, a majordomo-run list I participate on).

That said ... it's worth one pass here at your problem, I think.

The difference between modprobe and insmod is that modprobe checks for
dependencies among modules and loads any additional modules needed to make
the requested module run. insmod does not do this step, so with insmod, you
have to load modules in the right order. That's probably what your friend
told you that you forgot.

But you say you are using modprobe. In that case, the symptom you see most
likely means that the module you are trying to load was not compiled for
the kernel you have running. It's not enough that the kernel have the right
name; oftentimes (not always, but often enough), the module has to be from
the same compile as the kernel.

So when you compiled your kernel from source, did you follow all the
required steps, including "make modules" and "make modules_install"? If
not, that is your problem with the custom kernel.

If I've guessed wrong about the specific error, the general advice still
applies. In that case, read /usr/src/linux/README, which has a list of the
steps you need to follow to compile a kernel, install it, compile its
modules, and install its modules successfully.

As to the add-on compiles you did for the stock kernel ... these may be
running into the same problem. I always compile my own kernels, so I don't
have experience trying to compile (say) alsa for a stock kernel. You may
have the same mismatch problem. Or you may have missed installing (moving
to /lib/modules/...) some "helper" modules that supplies the missing
pieces. Or you may not have run "depmod", the app that constructs the
dependencies list that modprobe uses. Or you may have missed some other
detail ... I'm writing this off the top of my head, so I'm probably missing
some possibilities, but the number I am hitting indicates how involved this
process is.

As to the bttv problems with the stock kernel ... intermittent loading is a
real oddity. I suggest that before you hand-load it, you run "lsmod" and
see what modules are loaded. After it loads successfully, do it again and
see what else loaded. Although I can deliberately misload bttv here and
generate an "unresolved symbols" message, I cannot get it to happen with
that *particular* symbol. The only reference I find to that function in the
kernel source (2.4.19) is in the sound drivers ... and I can't see why the
bttv module would be generating that particular call. And the function (in
./drivers/sound/sound_firmware.c) is headed with a comment discouraging its
use and warning that it might disappear.

Oh, I'd also suggest you pay closer attention to whether there is any
pattern in the "sometimes-ness" of bttv loading. Like it always fails the
first time after a reboot but succeeds the second time (which might be what
you described below). Or it works if loaded after sound but not before
(which might also be what you described below).

At 10:18 PM 6/6/2003 -0400, Michael Williams wrote:
>Please help, im at my wits end here. I have been lurking for about a
>week and have read hundreds of messages on here about people trials and
>tribulations in getting Myth up and running. I am running RedHat 9, have
>an ATI Tv Wonder VE and know it is card=64 and tuner=2. My current
>problem is I had the card working using xawtv at work where I was
>configuring the box. I initially had trouble loading the bttv module
>with insmod, though I dont remember the error offhand. A friend of mine
>who is good with linux told me to use modprobe to load it, and lo and
>behold it worked. I used Xawtv to see that it worked. When I tried to
>use "Watch TV" in mythfrontend I got the same thing I did before I
>actually installed the tuner card, the system locked up hard, had to
>reset it. I did some more searching in the list archives and found that
>someone had the same problem and it was suggested that their problem was
>the fact they didnt have ALSA installed, so I got the alsa-driv*,
>alsa-lib* and alsa-util* and followed the instructions on the alsa site
>for my sound board (onboard via-82c686 chipset), all the builds and make
>installs worked great but when it came time to modprobe the modules, it
>would load due to this error message:
>
>/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: unresolved symbol
>schedule_work
>/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod
>/lib/modules/2.4.20-8/kernel/sound/acore/snd.o failed
>/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod snd-via82xx
>failed
>
>By now it was time to come home, so I just shut down the box and brought
>it home. Once i got it set up I booted it up and went to load bttv with
>"modprobe bttv card=64 tuner=2" now i get this message:
>
>/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o: unresolved
>symbol mod_firmware_load_R39e3dd23
>/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o: insmod
>/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o failed
>/lib/modules/2.4.20-8/kernel/drivers/media/video/bttv.o: insmod bttv
>failed
>
>I just tried again to load bttv, and it loaded just fine. I have no idea
>why sometimes it will load and sometimes it wont. Plus the ALSA thing
>is killing me.
>
>I have searched the list archives, the internet, the docs. I have
>downloaded a vanilla 2.4.20 kernel source tree and compiled it and
>successfully gotten it to boot, but my nic doesnt work on it nor do any
>of my modules load, none of them (lsmod shows no modules at all). Its
>like they dont even exist. I boot back to this one and lsmod shows a
>bunch of modules loaded.
>
>If anyone here feels they can help me and if you want to initiate a
>one-on-one please feel free to email me, im pulling my hair out here.
>Take pity please. :)
Re: Cant load bttv module, ALSA module load problem [ In reply to ]
Very true Ray, the bttv and alsa problems aren't MythTV problems
directly. However the problem where when I go to "Watch TV" in
mythfrontend and it completely freezes the machine is isnt it? Once I
finally get bttv loaded I can watch TV on it using xawtv just fine, and
as for the alsa problem I THINK i have finally gotten that working,
though I dont know how. I found some other references to the same
problem, most of them indicating I should touch
include/linux/workqueue.h after running ./configure and before make;make
install. I did this, but it didnt work. I finally found some RPMs on
freshrpms.net for redhat 9 for alsa version 0.9.3, though the sources i
was compiling were for 0.9.4, I went ahead and installed all the rpms
using apt-get. Afterward, I was able to use alsaplayer to play an MP3,
does this indicate a properly working ALSA driver that would work with
MythTV? I have mythtv set to output sound to /dev/dsp

If this ALSA is working correctly now, I am still stuck as to why i can
watch tv with xawtv but when I go to "Watch TV" in Myth it completely
freezes the machine. Mythbackend is running correctly, I can see the
program guide just fine going through "Record a program".

Thanks again Ray for the response.

On Fri, 2003-06-06 at 23:35, Ray Olszewski wrote:
> First thing -- these are not MythTV problems. They are kernel problems. So
> if you need extended help, you probably should get it not here but either
> on a Red Hat users' list or a general Linux-support list (an example is
> linux-newbie@vger.kernel.org, a majordomo-run list I participate on).
>
> That said ... it's worth one pass here at your problem, I think.
>
> The difference between modprobe and insmod is that modprobe checks for
> dependencies among modules and loads any additional modules needed to make
> the requested module run. insmod does not do this step, so with insmod, you
> have to load modules in the right order. That's probably what your friend
> told you that you forgot.
>
> But you say you are using modprobe. In that case, the symptom you see most
> likely means that the module you are trying to load was not compiled for
> the kernel you have running. It's not enough that the kernel have the right
> name; oftentimes (not always, but often enough), the module has to be from
> the same compile as the kernel.
>
> So when you compiled your kernel from source, did you follow all the
> required steps, including "make modules" and "make modules_install"? If
> not, that is your problem with the custom kernel.
>
> If I've guessed wrong about the specific error, the general advice still
> applies. In that case, read /usr/src/linux/README, which has a list of the
> steps you need to follow to compile a kernel, install it, compile its
> modules, and install its modules successfully.
>
> As to the add-on compiles you did for the stock kernel ... these may be
> running into the same problem. I always compile my own kernels, so I don't
> have experience trying to compile (say) alsa for a stock kernel. You may
> have the same mismatch problem. Or you may have missed installing (moving
> to /lib/modules/...) some "helper" modules that supplies the missing
> pieces. Or you may not have run "depmod", the app that constructs the
> dependencies list that modprobe uses. Or you may have missed some other
> detail ... I'm writing this off the top of my head, so I'm probably missing
> some possibilities, but the number I am hitting indicates how involved this
> process is.
>
> As to the bttv problems with the stock kernel ... intermittent loading is a
> real oddity. I suggest that before you hand-load it, you run "lsmod" and
> see what modules are loaded. After it loads successfully, do it again and
> see what else loaded. Although I can deliberately misload bttv here and
> generate an "unresolved symbols" message, I cannot get it to happen with
> that *particular* symbol. The only reference I find to that function in the
> kernel source (2.4.19) is in the sound drivers ... and I can't see why the
> bttv module would be generating that particular call. And the function (in
> ./drivers/sound/sound_firmware.c) is headed with a comment discouraging its
> use and warning that it might disappear.
>
> Oh, I'd also suggest you pay closer attention to whether there is any
> pattern in the "sometimes-ness" of bttv loading. Like it always fails the
> first time after a reboot but succeeds the second time (which might be what
> you described below). Or it works if loaded after sound but not before
> (which might also be what you described below).
>
> At 10:18 PM 6/6/2003 -0400, Michael Williams wrote:
> >Please help, im at my wits end here. I have been lurking for about a
> >week and have read hundreds of messages on here about people trials and
> >tribulations in getting Myth up and running. I am running RedHat 9, have
> >an ATI Tv Wonder VE and know it is card=64 and tuner=2. My current
> >problem is I had the card working using xawtv at work where I was
> >configuring the box. I initially had trouble loading the bttv module
> >with insmod, though I d

<snip>
Re: Cant load bttv module, ALSA module load problem [ In reply to ]
At 12:29 AM 6/7/2003 -0400, Michael Williams wrote:
>Very true Ray, the bttv and alsa problems aren't MythTV problems
>directly. However the problem where when I go to "Watch TV" in
>mythfrontend and it completely freezes the machine is isnt it?

Probably. But, first, is it the *machine* that freezes or just the
mythfrontend process? (For example, if the machine is on a LAN, can you
ping it? Can you open an ssh or telnet session to it? Can you switch from X
to a console and log in? Can you switch from mythfrontend to another X
process, like an xterm? Since I don't know much about the details of your
actual setup, I don't what options might be available to you to see if the
system itself is hung.)

When I see this problem here (and I do), and it is only mythfrontend, not
the host itself, that has ceased responding, I find that mythbackend has
died unexpectedly. I still don't know in some cases why it happened. In
others, it died because it could not access some resource.

Check if mythbackend is running under a userid that has permission to
access the video and audio devices. The easiest way to take care of this is
to add the userid to groups audio and video (in /etc/group).

Check that it has write permission for the directory where you told it to
store the "live" TV buffer. Someone else on the list today had that problem.

What X driver are you running? Does it support xVideo (or some means of
displaying full-motion video)? (xawtv uses a very non-standard way of
displaying video on the screen, so don't assume that because it can write
to the screen, other apps can. See if xine or mplayer can play video if you
want to check it that way.)

What type and speed CPU? How much RAM? We're getting to long shots now, but
might you be asking your hardware to do more than it can?

[...]
>If this ALSA is working correctly now, I am still stuck as to why i can
>watch tv with xawtv but when I go to "Watch TV" in Myth it completely
>freezes the machine. Mythbackend is running correctly, I can see the
>program guide just fine going through "Record a program".

The biggest difference between xawtv and Myth is that Myth buffers "live"
TV to disk (that's why I always use quotes around "live"). So the
possibility of a permissions problem with the buffer directory is a
tempting one.

>Thanks again Ray for the response.
[old stuff deleted]
Re: Cant load bttv module, ALSA module load problem [ In reply to ]
On Sat, 2003-06-07 at 02:21, Ray Olszewski wrote:
> At 12:29 AM 6/7/2003 -0400, Michael Williams wrote:
> >Very true Ray, the bttv and alsa problems aren't MythTV problems
> >directly. However the problem where when I go to "Watch TV" in
> >mythfrontend and it completely freezes the machine is isnt it?
>
> Probably. But, first, is it the *machine* that freezes or just the
> mythfrontend process? (For example, if the machine is on a LAN, can you
> ping it? Can you open an ssh or telnet session to it? Can you switch from X
> to a console and log in? Can you switch from mythfrontend to another X
> process, like an xterm? Since I don't know much about the details of your
> actual setup, I don't what options might be available to you to see if the
> system itself is hung.)

Yes, its on a lan and I do most of my work on it from a SSH session and
VNC, though when I test the video stuff its at the local console. Its
the machine that is locking up, the vnc and ssh sessions are killed on
the windows box, and on the mythtv box you cant switch tasks or virtual
terminals.

> Check if mythbackend is running under a userid that has permission to
> access the video and audio devices. The easiest way to take care of this is
> to add the userid to groups audio and video (in /etc/group).

I did a quick fix, chmod 777 /etc/dsp* and chmod 777 /dev/video*

I know, not the right way to do it, but I was getting desperate. Will
set it correctly once I get this working. If I do :)

> Check that it has write permission for the directory where you told it to
> store the "live" TV buffer. Someone else on the list today had that problem.

Yea, i already got that :) Linux is stored on a little 10gb drive and I
have a 60gb drive mounted on /mnt/store and I run both myth frontend and
backend under the user "michael", I have gone to the store mount and
touched a test file to make sure I can write it.

> What X driver are you running? Does it support xVideo (or some means of
> displaying full-motion video)? (xawtv uses a very non-standard way of
> displaying video on the screen, so don't assume that because it can write
> to the screen, other apps can. See if xine or mplayer can play video if you
> want to check it that way.)

I was using the ATI All in Wonder Rage 128 that I was originally going
to use for a capture card (until I found out that it WILL NOT WORK :).
I have installed an NVidia TNT2 with tv out. I couldnt get the NVidia
binary drivers to work, even though I followed their instructions to the
tee. Maybe they dont work with TNT2s, only Geforce+.

> What type and speed CPU? How much RAM? We're getting to long shots now, but
> might you be asking your hardware to do more than it can?

I am running an AMD 1700+ processor with 512mb of PC133 Ram.


I am thinking the problem with it locking up when trying to view live tv
is with Alsa actually. When I try to do it I hear a few clicks from the
speaker RIGHT before it freezes the system. Strangly enough, bttv seems
to be loading more often than not now, right after boot. I have no idea
why. Sometimes it does give me the unresolved symbol error. Does anyone
know if bttv has some kind of sound driver dependencies?
Re: Cant load bttv module, ALSA module load problem [ In reply to ]
On Saturday 07 June 2003 01:27 pm, Michael Williams wrote:
> I am thinking the problem with it locking up when trying to view live tv
> is with Alsa actually. When I try to do it I hear a few clicks from the
> speaker RIGHT before it freezes the system.

That sounds like a very likely diagnosis to me. Not sure what you'd want to
do to fix it, though.

Isaac
Re: Cant load bttv module, ALSA module load problem [ In reply to ]
Hmmm ... usually when I probe on this, it turns out that just the
mythfrontend process itself is hung, not the underlying machine. If it does
not even respond to pings (Linux kernels are awfully resilient in this
respect), it means a bad kernel-level problem, even if Myth is the
proximate cause. So you might check this detail, trying to ping the Myth
host from the Linux host after it (apparently) hangs.

Your guess about alsa sounds like a good place to start. I don't think
you've said anything about the details of the alsa install beyond that you
"followed the instructions on the alsa site" and that "all the builds and
make installs worked great" ... but then snd.o failed to load properly at
least once. So it's hard to offer specific advice.

If there is an alsa-users list associated with the alsa site, it might be
the better place to describe the details ... but to get help, you''re going
to need to tell *someone* the details. For example:

1. What modules does lsmod report as installed just before you start
mythfrontend?

2. Does sound work properly to playback using some other Linux app (mpg123
or xmms, for example)?

3. Does sound work properly to record using some other Linux app that uses
the sound card's line input (gramofile, for example)?

4. Does some other video capture application (vcr/avifile, avicap,
mencoder, or ffmpeg, for example) work?

5. Run "top" over an ssh session where the window will stay open even if
the session terminates (putty on Windows does this, for example). After the
system dies, did the last update of "top" reveal anything instructive?

The alsa experts can probably suggest better questions, but this is at
least a place to start.

Oh ... let me ask one long-shot question: do you have DMA enabled on the
hard drive that Myth is using for the "live" TV buffer? (You can check this
with "hdparm /dev/hd?", replacing ? with the appropriate drive designator.)
If not, DMA-related errors can make a system unresponsive for a
surprisingly long time (another one I learned the hard way).


At 01:27 PM 6/7/2003 -0400, Michael Williams wrote:
[...]
>I am thinking the problem with it locking up when trying to view live tv
>is with Alsa actually. When I try to do it I hear a few clicks from the
>speaker RIGHT before it freezes the system. Strangly enough, bttv seems
>to be loading more often than not now, right after boot. I have no idea
>why. Sometimes it does give me the unresolved symbol error. Does anyone
>know if bttv has some kind of sound driver dependencies?