Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288267 - dvb-t : b2c2_flexcop_pci : no System Sleep : breaks kaffeine
Summary: dvb-t : b2c2_flexcop_pci : no System Sleep : breaks kaffeine
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-09 07:48 UTC by Manfred Knick
Modified: 2016-01-30 14:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add suspend/resume to b2c2-flexcop-pci (flexcop-suspend-v2.diff,6.76 KB, patch)
2009-10-20 13:17 UTC, Matthias Schwarzott
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manfred Knick 2009-10-09 07:48:35 UTC
Upgrading 
... from linux-2.6.31-gentoo-r1
... to   linux-2.6.31-gentoo-r2,
kaffeine DVB-T could not find / access channels any more.
Reverting:
Booting from the previously installed 
.......  linux-2.6.31-gentoo-r1
again solved the problem.


# lspci
...
01:07.0 Network controller:
Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip /
Technisat SkyStar2 DVB card (rev 02)
...

Notabene: a diff between the relevant kernel sources
. . . ./drivers/media/dvb/b2c2
showed no difference at all.


$ equery list kaffeine
[I--] [ ~] media-video/kaffeine-0.8.8 (3.5)


# equery list xine-lib
[I--] [  ] media-libs/xine-lib-1.1.16.3-r1 (1)

# equery list ffmpeg
[I--] [  ] media-plugins/gst-plugins-ffmpeg-0.10.7 (0.10)
[I--] [  ] media-video/ffmpeg-0.5-r1 (0)

# equery list x264
[I--] [  ] media-libs/x264-0.0.20081006 (0)
Comment 1 Manfred Knick 2009-10-09 07:49:10 UTC
$ emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0/desktop, gcc-4.4.1, glibc-2.9_p20081201-r3, 2.6.31-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r1-x86_64-AMD_Phenom-tm-_9950_Quad-Core_Processor-with-gentoo-1.12.12
Timestamp of tree: Fri, 09 Oct 2009 06:45:02 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.3, 3.1.1-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.12
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native        -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/fax /usr/share/config /var/lib/hsqldb /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native        -O2 -pipe"
DISTDIR="/mnt/Storage-01/Portage_dist/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/"
LANG="de_DE.UTF8"
LC_ALL="de_DE.UTF8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/Storage-02/Portage_tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/local-overlay"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 bash-completion berkdb branding bzip2 cairo cdr cli consolekit cracklib crypt cups dbus doc dri dts dvb dvd dvdr eds emboss encode esd evo examples fam fax ffmpeg firefox firefox3 flac foomaticdb fortran gdbm gif gimp gnome gphoto2 gpm gstreamer gtk h323 hal hbci htmlhandbook iconv ipv6 isdnlog jadetex java jce jpeg kde ldap libnotify lm_sensors mad maildir mbox mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcre pdf perl pmu png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sasl scanner sdl session sip snmp spell spl sql sse sse2 sse3 sse4a ssl startup-notification subversion svg sysfs tcpd theora thunar tiff truetype unicode usb v4l v4l2 vorbis webkit x264 xcomposite xml xorg xulrunner xv xvid zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FRITZCAPI_CARDS="fcpci" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" MISDN_CARDS="avmfritz" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Manfred Knick 2009-10-12 14:02:50 UTC
I have to CORRECT myself:

It is not the kernel version itself.

The problem is reproducible by putting the system asleep (memory)
and waking it up again.

Afterwards, kaffeine is able to play recordings (from file system),
but it cannot access the DVB-T channels.

This applies to 2.6.31 as well as 2.6.30 alreaedy.

Thus I have changed the subject accordingly.

If I can help with any further info, please give me a note.
Comment 3 Matthias Schwarzott gentoo-dev 2009-10-12 18:30:29 UTC
The b2c2-card driver does not support system sleep states as it seems.
Does it work if you stop streaming before suspend, or even unload the dvb card driver b2c2-flexcop-pci and reload it after resume?
Comment 4 Manfred Knick 2009-10-13 07:49:58 UTC
(In reply to comment #3)

> The b2c2-card driver does not support system sleep states as it seems.

So we should file a BUG upstream, requesting this capability?

Perhaps we should even define a TRACKER ?
I think it would be a really worth-while general goal to make Gentoo  excellently support power-saving achievements.

> Does it work if you stop streaming before suspend,

no

> or even unload the dvb card driver
> b2c2-flexcop-pci and reload it after resume?

Sorry, I can't test that immediately - on that respective box,
it's not built as a module (M) , but static (*) .
Comment 5 Manfred Knick 2009-10-20 09:16:57 UTC
(In reply to comment #3)

> Does it work if ... ???

It is sufficient to have b2c2_flexcop_pci built as a module:

WorkAround - the 'clean' way:

- stop Kaffeine
- modprobe -r b2c2_flexcop_pci
- suspend to RAM
- - - 
- resume
- modprobe    b2c2_flexcop_pci
- start Kaffeine

WorkAround - if you forgot before suspending:

- a running Kaffeine will hinder "modprobe -r" because "module still in use": so
- stop Kaffeine
- modprobe -r b2c2_flexcop_pci
- modprobe    b2c2_flexcop_pci
- (re-)start Kaffeine

(In reply to comment #3)
> The b2c2-card driver does not support system sleep states as it seems.
Yes, indeed.

? Anybody with a contact to upstream dev. ?
Comment 6 Manfred Knick 2009-10-20 09:18:52 UTC
(In reply to comment #5)

Postscriptum:

> It is sufficient to have b2c2_flexcop_pci built as a module:

# uname -a :   Linux ... 2.6.31-gentoo-r3 ...
Comment 7 Matthias Schwarzott gentoo-dev 2009-10-20 13:17:57 UTC
Created attachment 207670 [details, diff]
add suspend/resume to b2c2-flexcop-pci

Please try this patch I have written.
Comment 8 Manfred Knick 2009-10-20 20:16:44 UTC
(In reply to comment #7)

> Please try this patch I have written.

It's my pleasure!

   # cd /usr/src/linux/
   # cd drivers/media/dvb/b2c2/
   # patch < /.../flexcop-suspend-v2.diff

Findings (still built as a module):

+ 1.) stop Kaffeine ; Suspend-to-RAM/Resume ; start Kaffeine: works
+ 2.) only stop streaming in kaffeine, leave kaffeine alive: ... works
- 3.) suspend while Kaffeine is displaying a DVB-T channel programme:
 ... hangs; you have to stop Kaffeine ; modprobe -r ; modprobe ; start kaffeine a-fresh

1,2 :: That's a very good step forward already !!  Thanks a lot.

3 :: Having built this patched version into the kernel as (*), probably one could live happily as long as one does not forget to stop streaming _before_ suspend; otherwise a (kernel) re-start would be necessary.
Comment 9 Manfred Knick 2009-10-20 20:32:44 UTC
(In reply to comment #7)

Matthias, are you sure the following part from your patch is sufficient?

+	/* make sure streaming is really off */
+	if (fc->stream_control)
+		fc->stream_control(fc, 0);
Comment 10 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2010-12-30 01:34:45 UTC
since it is not a kaffeine problem, i'll remove kde and media-video herds from this bug
Comment 11 Mike Pagano gentoo-dev 2010-12-30 01:45:16 UTC
If this is still an issue, please reopen. I don't want to anyone to dig into a 14 month old bug if it's not necessary
Comment 12 Manfred Knick 2011-01-19 14:13:30 UTC
(In reply to comment #11)
> If this is still an issue,

Hi, Mike,

aktually it is -
with every new kernel to build I have to apply the patch
provided above.

Kind regards
Manfred

Comment 13 Manfred Knick 2012-04-04 20:59:45 UTC
(In reply to comment #11)

> ... still an issue

for ~ 2 1/2 years now ...

Mike,

I would like to confirm that the patch provided by Matthias Schwarzott 
in comment #7 ist perfectly working until / including 3.3.1.

Unfortunately, I will probably not be able to test this any more
because the corresponding HW will be sorted out of this duty quite soon.

Hint:
https://bugzilla.kernel.org/show_bug.cgi?id=14394
Comment 14 Pacho Ramos gentoo-dev 2016-01-30 14:51:59 UTC
This should be retested on a recent system