This analysis is for two issues and was originally made for bug #303667 issue1: computer hangs 60 seconds after resume issue2: firmware does not get loaded after resume for dvb_usb_dib0700 with error (-2) but the origin of bug #303667 is a different one (firmware always fails to load on first attempt. so the analysis does better match for bug #388383 bug #279143 suggests that issue 2 (the "fw not found" problem) relies on the fact that firmware is not included in initrd. Even if I do not understand why initrd should be related to resume (as I just do s2ram) I did soem research. As written in #303667 - initially when booting up the OS, dvb firmware did load fine (fw file under /lib/firmware) but on resume from s2ram I got the 60 second delay and finally fw not found -2 (ENOENT) error. checking output of "sudo update-initramfs -k all -u -v" shows that neither the dvb_usb nor dvb_usb_dib0700 modules get included into initrd generally, nor their firmware in that case. my setting in /etc/initramfs-tools/initramfs.conf is: MODULES=most based on that, /usr/share/initramfs-tools/hook-functions function auto_add_modules() does not include dvb_usb. so first I did put the following into /etc/initramfs-tools/modules: dvb_usb dvb_usb_dib0700 and rebuilt initrd. modules are now included but firmware file still not. checking /usr/share/initramfs-tools/hook-functions shows that function manual_add_modules() normally includes firmware based on the fact if "modinfo -F firmware module" returns the name of the fw file or not. But even if loaded with correct firmware, module dvb_usb or dvb_usb_dib0700 does not show the firmware requirement: # sudo rmmod dvb_usb_dib0700 # sudo modprobe dvb_usb_dib0700 # dmesg|tail [ 5040.316774] usbcore: deregistering interface driver dvb_usb_dib0700 [ 5047.074395] dib0700: loaded with support for 9 different device-types [ 5047.074538] dvb-usb: found a 'Hauppauge Nova-TD-500 (84xxx)' in cold state, will try to load a firmware [ 5047.074543] usb 3-1: firmware: requesting dvb-usb-dib0700-1.20.fw [ 5047.077018] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw' [ 5047.278554] dib0700: firmware started successfully. [ 5047.780008] dvb-usb: found a 'Hauppauge Nova-TD-500 (84xxx)' in warm state. [ 5047.780039] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 5047.780273] DVB: registering new adapter (Hauppauge Nova-TD-500 (84xxx)) [ 5047.993369] DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)... [ 5048.163756] DiB0070: successfully identified [ 5048.163759] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 5048.163943] DVB: registering new adapter (Hauppauge Nova-TD-500 (84xxx)) [ 5048.301396] DVB: registering adapter 1 frontend 0 (DiBcom 7000PC)... [ 5048.471783] DiB0070: successfully identified [ 5048.471845] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1e.0/0000:04:00.2/usb3/3-1/input/input7 [ 5048.471874] dvb-usb: schedule remote query interval to 50 msecs. [ 5048.471877] dvb-usb: Hauppauge Nova-TD-500 (84xxx) successfully initialized and connected. [ 5048.472326] usbcore: registered new interface driver dvb_usb_dib0700 # sudo modinfo -F firmware dvb_usb dvb_usb_dib0700 # sudo modinfo dvb_usb dvb_usb_dib0700 filename: /lib/modules/2.6.31-7-generic-pae/kernel/drivers/media/dvb/dvb-usb/dvb-usb.ko license: GPL description: A library module containing commonly used USB and DVB function USB DVB devices author: Patrick Boettcher version: 1.0 srcversion: 04AF2E62E9F7C45F92FB838 depends: dvb-core vermagic: 2.6.31-7-generic-pae SMP mod_unload modversions 586 parm: debug:set debugging level (1=info,xfer=2,pll=4,ts=8,err=16,rc=32,fw=64,mem=128,uxfer=256 (or-able)). (debugging is not enabled) (int) parm: disable_rc_polling:disable remote control polling (default: 0). (int) parm: force_pid_filter_usage:force all dvb-usb-devices to use a PID filter, if any (default: 0). (int) filename: /lib/modules/2.6.31-7-generic-pae/kernel/drivers/media/dvb/dvb-usb/dvb-usb-dib0700.ko license: GPL version: 1.0 description: Driver for devices based on DiBcom DiB0700 - USB bridge author: Patrick Boettcher srcversion: 5AB3C6916716DD04A0438E7 alias: usb:v0CCDp10A1d*dc*dsc*dp*ic*isc*ip* ... alias: usb:v10B8p1E14d*dc*dsc*dp*ic*isc*ip* depends: dvb-usb,dib0070,dib3000mc,dib7000p,dib7000m vermagic: 2.6.31-7-generic-pae SMP mod_unload modversions 586 parm: force_lna_activation:force the activation of Low-Noise-Amplifyer(s) (LNA), if applicable for the device (default: 0=automatic/off). (int) parm: debug:set debugging level (1=info,2=fw,4=fwdata,8=data (or-able)). (debugging is not enabled) (int) parm: dvb_usb_dib0700_ir_proto:set ir protocol (0=NEC, 1=RC5 (default), 2=RC6). (int) parm: adapter_nr:DVB adapter numbers (array of short) a good example where fw requirement is detected would look like: #modinfo -F firmware e100 e100/d102e_ucode.bin e100/d101s_ucode.bin e100/d101m_ucode.bin and that would include the correct FW into initrd, example from updateinit-ramfs -v: ... Adding module /lib/modules/2.6.31-7-generic-pae/kernel/drivers/net/e100.ko Adding binary /lib/firmware/2.6.31-7-generic-pae/e100/d102e_ucode.bin Adding firmware e100/d102e_ucode.bin Adding binary /lib/firmware/2.6.31-7-generic-pae/e100/d101s_ucode.bin Adding firmware e100/d101s_ucode.bin Adding binary /lib/firmware/2.6.31-7-generic-pae/e100/d101m_ucode.bin Adding firmware e100/d101m_ucode.bin ... so I add the following script and chmod it 700 under /etc/initramfs-tools/hooks/dvb_usb (its just a bad hack for testing): #!/bin/sh PREREQ="" prereqs() { echo "$PREREQ" } case $1 in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions copy_exec "/lib/firmware/dvb-usb-dib0700-1.20.fw" looking into the initrd afterwards shows the fw file "dvb-usb-dib0700-1.20.fw" is now inside (after initrd rebuild) However, now I have the 60sec delay + fw file not found error even on boot: [ 4.473885] dib0700: loaded with support for 9 different device-types [ 4.474060] dvb-usb: found a 'Hauppauge Nova-TD-500 (84xxx)' in cold state, will try to load a firmware [ 4.474063] usb 3-1: firmware: requesting dvb-usb-dib0700-1.20.fw [ 64.472051] dvb-usb: did not find the firmware file. (dvb-usb-dib0700-1.20.fw) Please see linux/Documentation/dvb/ for more details on firmware-problems. (-2) a rmmod/modprobe during runtime works afterwards when the OS is booted: [ 1508.233828] dib0700: loaded with support for 9 different device-types [ 1508.234021] dvb-usb: found a 'Hauppauge Nova-TD-500 (84xxx)' in cold state, will try to load a firmware [ 1508.234026] usb 3-1: firmware: requesting dvb-usb-dib0700-1.20.fw [ 1508.237615] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw' [ 1508.439065] dib0700: firmware started successfully. I broke into the initrd before it mounts the rootfs and chroots to see what I can do. The correct fw file is under /lib/firmware, I also tried to copy it to /lib/firmware/${kernelversion} or into the directory of the dvb_usb_dib0700 module itself and different othe rlocations but in any case, modprobe does not find it with the same error above. I made sure the file has correct attributes but do not understand why dvb-usb does not find it. Based on the output "(-2)" it must error out at drivers/base/firmware_class.c function _request_firmware: 433 mutex_lock(&fw_lock); 434 if (!fw_priv->fw->size || test_bit(FW_STATUS_ABORT, &fw_priv->status)) { 435 retval = -ENOENT; <-----------------------------------------------here I probably get the -2 436 release_firmware(fw_priv->fw); 437 *firmware_p = NULL; 438 } this is called via: drivers/media/dvb/dvb-usb/dvb-usb-firmware.c function dvb_usb_download_firmware 78 int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_device_properties *props) 79 { 80 int ret; 81 const struct firmware *fw = NULL; 82 83 if ((ret = request_firmware(&fw, props->firmware, &udev->dev)) != 0) { 84 err("did not find the firmware file. (%s) " 85 "Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)", 86 props->firmware,ret); 87 return ret; 88 } 89 90 info("downloading firmware from file '%s'",props->firmware); So I do either have the FW_STATUS_ABORT bit set (as the filesize is definitely NOT zero) or have an udev problem and dvb_usb_download_firmware is called with a false udev pointer but when I was within initramfs I double checked that udev was running fine. Better instrumentation of the error message would be required to see why it thinks the file is not there. I was unable to find from the code where it does search for the file. Anyhow, drivers/media/dvb/dvb-usb/dvb-usb-firmware.c function dvb_usb_download_firmware could be modified to download firmware async by using request_firmware_nowait instead of request_firmware. This would at least fix the 60 sec hang until fw upload timed out in this case. I reverted back the initrd (removed dvb modules and firmware) and immediately the system did boot up normally again and the OS was successful in loading the dvb_usb_dib0700 firmware (now done past initrd). I did not mention it yet, but before when I know it failed downloading the fw from inside initrd - when the system was booted up it did load the fw fine after rmmod/modprobe as well. So in general the issue 2 problem does exist if a dvb_usb submodule (like dib0700) is loaded prior suspend in hot state but does not exists if in cold state. As a workaround I suggest to put a quirk script into /etc/pm/sleep.d