Yesterday, 01:03 AM
I was able to get wake from suspend working with the Hauppauge 2250 on Ubuntu 24.04 Linux.
The driver in use is saa7164.
The driver would lock up once the system went to suspend so resume would result in an unusable system.
I would have to completely power down the system to get it working again.
I thought I had it solved by unloading the driver, but the driver would fail when trying to reload upon resume.
Solution was to clear memory cache before suspend.
Solution:
/usr/lib/systemd/system-sleep/saa7164_driver_handler.sh
Need execute permissions on the script:
(-rwxr-xr-x 1 root root 584 Jan 7 23:23 saa7164_driver_handler.sh)
#!/bin/bash
DRIVER="saa7164" # Replace driver_name with your specific driver
case "${1}" in
pre)
# Actions to take BEFORE suspend
echo "Stopping nextpvr-server..."
systemctl stop nextpvr-server
echo "Unloading $DRIVER modules..."
modprobe -r $DRIVER
sync
echo 3 > /proc/sys/vm/drop_caches
;;
post)
# Actions to take AFTER resume
echo "Loading $DRIVER modules..."
modprobe $DRIVER
echo "Starting nextpvr-server..."
systemctl start nextpvr-server
;;
esac
I also required the devices to be loaded before the nextpvr-server would be allow to start
In /usr/lib/systemd/system/nextpvr-server.service
[Unit]
Description=NextPVRServer
After=network-online.target
Wants=dev-dvb-adapter0-frontend0.device
After=dev-dvb-adapter0-frontend0.device
Wants=dev-dvb-adapter1-frontend0.device
After=dev-dvb-adapter1-frontend0.device
The driver in use is saa7164.
The driver would lock up once the system went to suspend so resume would result in an unusable system.
I would have to completely power down the system to get it working again.
I thought I had it solved by unloading the driver, but the driver would fail when trying to reload upon resume.
Solution was to clear memory cache before suspend.
Solution:
/usr/lib/systemd/system-sleep/saa7164_driver_handler.sh
Need execute permissions on the script:
(-rwxr-xr-x 1 root root 584 Jan 7 23:23 saa7164_driver_handler.sh)
#!/bin/bash
DRIVER="saa7164" # Replace driver_name with your specific driver
case "${1}" in
pre)
# Actions to take BEFORE suspend
echo "Stopping nextpvr-server..."
systemctl stop nextpvr-server
echo "Unloading $DRIVER modules..."
modprobe -r $DRIVER
sync
echo 3 > /proc/sys/vm/drop_caches
;;
post)
# Actions to take AFTER resume
echo "Loading $DRIVER modules..."
modprobe $DRIVER
echo "Starting nextpvr-server..."
systemctl start nextpvr-server
;;
esac
I also required the devices to be loaded before the nextpvr-server would be allow to start
In /usr/lib/systemd/system/nextpvr-server.service
[Unit]
Description=NextPVRServer
After=network-online.target
Wants=dev-dvb-adapter0-frontend0.device
After=dev-dvb-adapter0-frontend0.device
Wants=dev-dvb-adapter1-frontend0.device
After=dev-dvb-adapter1-frontend0.device