Skip to contentSkip to conversation

cannot unload cx18_alsa to hibernate Mint13 64 computer

DISCUSSION Dixon Craig 2 participants 4 messages Mar 9, 2013 – Mar 14, 2013 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 27 lines · Dixon Craig

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 
Quoted 7 lines

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
Quoted 1 line

(some arcane commands to get pulseaudio to let go of the cx18

ALSA /dev/ nodes)

Quoted 1 line

exit

or

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

Regards,
Andy

Quoted 17 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAJGQ9=82aZe1j34=JkHUcsuVtcZ1tJRwB+sqBpEd3zBH3xSW6Q@mail.gmail.com

#3 lore raw
Quoted 19 lines · Dixon Craig

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.

Quoted 2 lines

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

#4 lore raw
Quoted 1 line · Andy Walls

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