linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cannot unload cx18_alsa to hibernate Mint13 64 computer
@ 2013-03-09 21:57 Dixon Craig
  2013-03-10  2:09 ` Andy Walls
  0 siblings, 1 reply; 4+ messages in thread
From: Dixon Craig @ 2013-03-09 21:57 UTC (permalink / raw)
  To: linux-media

Hello and thank you to all linuxtv developers!

I have my hauppuage pvr-1600 working very nicely for us-cable analog and 
composite inputs using cx18 from original linuxmint 13 MATE 64 and I also tried 
newest drivers from git.linuxtv.org.

My problem is cx18_alsa prevents successful suspend to disk when I run hibernate 
script.

I cannot unload module before hibernating because modprobe -r returns "FATAL: 
Module cx18_alsa is in use." 

lsmod does not list dependancies but lists 1 in use. here is my lsmod output:

dixon2@phenom ~ $ lsmod | grep cx
cx18_alsa              13730  1 
cx18                  131960  1 cx18_alsa
dvb_core              105885  1 cx18
cx2341x                28283  1 cx18
i2c_algo_bit           13423  1 cx18
videobuf_vmalloc       13589  1 cx18
videobuf_core          26022  2 cx18,videobuf_vmalloc
tveeprom               21249  1 cx18
v4l2_common            21560  4 cs5345,tuner,cx18,cx2341x
videodev              135159  5 cs5345,tuner,cx18,cx2341x,v4l2_common
snd_pcm                97275  3 cx18_alsa,snd_hda_intel,snd_hda_codec
snd                    79041  18 
cx18_alsa,snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_ra
wmidi,snd_seq,snd_timer,snd_seq_device


I have tried stopping all sound services (alsa-restore, alsa-store, and 
pulseaudio) then running modprobe -r on all the above listed modules but they 
all return the same "in use" error.

I have tried Lubuntu 12.04 with the same hardware and nvidia graphics driver
using same kernel 3.2.0-38 and I can successfully rmmod cx18_alsa and hibernate
computer. In Lubuntu, lsmod reports cx18_alsa is used by "0" other modules and
it rmmods without a problem.


Is there any other trick I can use to remove cx18_alsa module from kernel?

Thank you

Dixon 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cannot unload cx18_alsa to hibernate Mint13 64 computer
  2013-03-09 21:57 cannot unload cx18_alsa to hibernate Mint13 64 computer Dixon Craig
@ 2013-03-10  2:09 ` Andy Walls
       [not found]   ` <CAJGQ9=82aZe1j34=JkHUcsuVtcZ1tJRwB+sqBpEd3zBH3xSW6Q@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Walls @ 2013-03-10  2:09 UTC (permalink / raw)
  To: Dixon Craig; +Cc: linux-media

On Sat, 2013-03-09 at 21:57 +0000, Dixon Craig wrote:
> Hello and thank you to all linuxtv developers!
> 
> I have my hauppuage pvr-1600 working very nicely for us-cable analog and 
> composite inputs using cx18 from original linuxmint 13 MATE 64 and I also tried 
> newest drivers from git.linuxtv.org.
> 
> My problem is cx18_alsa prevents successful suspend to disk when I run hibernate 
> script.
> 
> I cannot unload module before hibernating because modprobe -r returns "FATAL: 
> Module cx18_alsa is in use." 
> 
> lsmod does not list dependancies but lists 1 in use. here is my lsmod output:
> 
> dixon2@phenom ~ $ lsmod | grep cx
> cx18_alsa              13730  1 
> cx18                  131960  1 cx18_alsa
> dvb_core              105885  1 cx18
> cx2341x                28283  1 cx18
> i2c_algo_bit           13423  1 cx18
> videobuf_vmalloc       13589  1 cx18
> videobuf_core          26022  2 cx18,videobuf_vmalloc
> tveeprom               21249  1 cx18
> v4l2_common            21560  4 cs5345,tuner,cx18,cx2341x
> videodev              135159  5 cs5345,tuner,cx18,cx2341x,v4l2_common
> snd_pcm                97275  3 cx18_alsa,snd_hda_intel,snd_hda_codec
> snd                    79041  18 
> cx18_alsa,snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_ra
> wmidi,snd_seq,snd_timer,snd_seq_device
> 
> 
> I have tried stopping all sound services (alsa-restore, alsa-store, and 
> pulseaudio) then running modprobe -r on all the above listed modules but they 
> all return the same "in use" error.

pulseaudio respawns when you kill it.  pulseaudio is likely the process
keeping the CX23418 ALSA device node open: use 'ps axf' and 'fuser' as
root on the /dev/snd/pcm* and /dev/snd/control* nodes to verify.

You have these options:

# killall pulseaudio; modprobe -r cx18_alsa; killall pulseaudio;
modprobe -r cx18_alsa; killall pulseaudio; modprobe -r cx18_alsa

or

# pactl (some arcane arugments to get pulseaudio to let go of the cx18
ALSA /dev/ nodes)

or 

# pacmd
> (some arcane commands to get pulseaudio to let go of the cx18
ALSA /dev/ nodes)
> exit

or

# find /lib/modules/`uname -r` -name "cx18-alsa.ko" -exec mv {}
{}.backup \; -print
# shutdown -r now


Regards,
Andy


> I have tried Lubuntu 12.04 with the same hardware and nvidia graphics driver
> using same kernel 3.2.0-38 and I can successfully rmmod cx18_alsa and hibernate
> computer. In Lubuntu, lsmod reports cx18_alsa is used by "0" other modules and
> it rmmods without a problem.
> 
> 
> Is there any other trick I can use to remove cx18_alsa module from kernel?
> 
> Thank you
> 
> Dixon 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cannot unload cx18_alsa to hibernate Mint13 64 computer
       [not found]   ` <CAJGQ9=82aZe1j34=JkHUcsuVtcZ1tJRwB+sqBpEd3zBH3xSW6Q@mail.gmail.com>
@ 2013-03-11  3:11     ` Andy Walls
  2013-03-14 17:52       ` Dixon Craig
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Walls @ 2013-03-11  3:11 UTC (permalink / raw)
  To: Dixon Craig; +Cc: linux-media

Dixon Craig <dixonjnk@gmail.com> wrote:

>Thanks Andy
>
>Pulse was indeed respawning.
>Once I got it killed for certain, I was able to rmmod cx18_alsa and
>cx18,
>then hibernate and wake up worked without problem.
>
>On wake up,  I tried   modprobe  cx18_alsa, but it just hung. I exited
>by
>pressing ctrl-c, and lsmod reported it had not loaded, but that cx18
>had.
>
>My sound config is a bit of a mess right now after days of randomly
>trying
>things to get things working, so once I get things cleaned up I will
>see if
>I can figure out how I can reload TV drivers after hibernate and report
>back to this list in case someone else is faced with this.
>
>Thanks again for your timely help.
>Dixon

modprobe cx18 will prompt a reload of cx18-alsa on its own.

BTW you should also unload cx18 before hibernation.  The cx18 driver really doesn't support power management and can't  save and restore CX23418 state short of reinitializing the whole chip anyway.

Regards,
Andy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cannot unload cx18_alsa to hibernate Mint13 64 computer
  2013-03-11  3:11     ` Andy Walls
@ 2013-03-14 17:52       ` Dixon Craig
  0 siblings, 0 replies; 4+ messages in thread
From: Dixon Craig @ 2013-03-14 17:52 UTC (permalink / raw)
  Cc: linux-media

On 03/10/2013 09:11 PM, Andy Walls wrote:
> modprobe cx18 will prompt a reload of cx18-alsa on its own. BTW you 
> should also unload cx18 before hibernation. The cx18 driver really 
> doesn't support power management and can't save and restore CX23418 
> state short of reinitializing the whole chip anyway. Regards, Andy 


I got hibernation and my hauppuage pvr1600 card sorted out on my Linux 
mint 13.

1. I removed all pulseaudio - Alsa seems to do everything I need and no 
more problems from pulseaudio respawning
2. I switched to a generic 3.2.0-38 kernel. I was using tuxonice kernel, 
but newer generic now supports my motherboard for hibernation. Tuxonice 
kernel would seg. fault when thawing when I tried to reload cx18 module.
3. I wrote a script to unload cx18_alsa, cx18 first like this

#!/bin/bash
#hibernate2.sh script to unload capture card modules; modify sudoers so 
you can call with root privilages
modprobe -r cx18_alsa
modprobe -r cx18
/usr/sbin/pm-hibernate
modprobe cx18

I tried to reload cx18_alsa, then cx18 after recovering from hibernation 
as per Ubuntu forum post, but for some reason this would mess up cx18. 
As per your instructions, for some reason modprobe cx18 causes both 
cx18_alsa and cx18 to load cleanly.

thanks again
Dixon




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-14 17:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-09 21:57 cannot unload cx18_alsa to hibernate Mint13 64 computer Dixon Craig
2013-03-10  2:09 ` Andy Walls
     [not found]   ` <CAJGQ9=82aZe1j34=JkHUcsuVtcZ1tJRwB+sqBpEd3zBH3xSW6Q@mail.gmail.com>
2013-03-11  3:11     ` Andy Walls
2013-03-14 17:52       ` Dixon Craig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).