How to Auto Reset DVB-card after suspend ?

New to Debian (Or Linux in general)? Ask your questions here!

How to Auto Reset DVB-card after suspend ?

Postby Chris » 2019-08-20 12:41

Unfortunately, my PCIe DVB-Sky T982 card does not work after my PC with Debian v10.0 have been in suspend and or Hibernate mode. If I run Windows OS, then there are no problems.

In Debian, I can restart the card manually or with a bash script with the commands "sudo rmmod cx23885" as well "sudo modprobe cx23885 card = 51", but it would be nice if it could be automatic by/after awakening from suspend and or hibernate, so if there is someone who knows how to fix it ?
Chris
 
Posts: 16
Joined: 2017-07-07 18:05

Re: How to Auto Reset DVB-card after suspend ?

Postby Dai_trying » 2019-08-20 16:46

First response from google here should answer your question
Dai_trying
 
Posts: 754
Joined: 2016-01-07 12:25

Re: How to Auto Reset DVB-card after suspend ?

Postby stevepusser » 2019-08-20 18:11

I think the answer could be quite different under systemd than six years ago, but I don't know much about how systemd handles that. I do have my system unloading and reloading the wi-fi driver before and after suspend without systemd by this method:

https://mxlinux.org/wiki/networking/wif ... nd-issues/

I suspect it would do that for any module.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Calibre 3.48.0, QMPlay2 19.09.03, wine-staging 4.16, Telegram-desktop 1.8.8, Pale Moon 28.7.1, Waterfox 56.2.14
User avatar
stevepusser
 
Posts: 11098
Joined: 2009-10-06 05:53

Re: How to Auto Reset DVB-card after suspend ?

Postby Chris » 2019-08-20 18:57

Hi Dai_trying and thank you for your response.

I have of course previously searched the net to find a solution, but unfortunately without success. I have also tried the method in your link, which I could not get to work either.
Chris
 
Posts: 16
Joined: 2017-07-07 18:05

Re: How to Auto Reset DVB-card after suspend ?

Postby Chris » 2019-08-20 19:55

Hi Stevepusser and thank you for your response.

I need something more concrete than what you are advocating, but I am also pretty sure that Debian V10, which uses SYSTEMD, is not working with /etc/pm solutions.
Chris
 
Posts: 16
Joined: 2017-07-07 18:05

Re: How to Auto Reset DVB-card after suspend ?

Postby stevepusser » 2019-08-20 23:03

I think you will have to write a systemd service file that will call a script that unloads and reloads that module. You could use the service file for iuvolt as a template.

https://github.com/tiziw/iuvolt/blob/ma ... lt.service

Say you create foo.service. Then as sysadmin:

Code: Select all
cp foo.service /etc/systemd/system/
systemctl enable foo.service
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Calibre 3.48.0, QMPlay2 19.09.03, wine-staging 4.16, Telegram-desktop 1.8.8, Pale Moon 28.7.1, Waterfox 56.2.14
User avatar
stevepusser
 
Posts: 11098
Joined: 2009-10-06 05:53

Re: How to Auto Reset DVB-card after suspend ?

Postby Chris » 2019-08-21 09:03

Stevepusser - Thank you for your post.
I don't think I have the knowledge of Linux to be able to make the file Foo.Service with the correct commands at this time. In any case, I was more on the look-out for a way to automatically run my simple bash script "reset.sh " by awakening from suspend and or hibernate, which has the following content and works upon activation from a terminal window:
_______________________________

#!/bin/bash
sudo rmmod cx23885
sudo modprobe cx23885 card = 51
_______________________________
Chris
 
Posts: 16
Joined: 2017-07-07 18:05


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable