suspend to ram fails wenn the vbox modul is loaded
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
Me just came up some probably useful information:
to allow mutiple s2ram + resume in the host operating system I had to:
a) disable "usb-legacy support" in the BIOS of the MoBo.
b) blacklist the module "snd-usb-audio" which does not have a suspend/resume script.
(this module is otherwise loaded automaticallyfor the microphone in my Web-Cam)
Without these 2 configurations together the host would only suspend+resume once, the second attempt to suspend will fail (already without VBox installed).
c) unloading usblp (as currently done for suspend) is probably only optional, I did that becaus usblp does not have a suspend/resume script.
So, if VBox is gathering information on attached USB-devices directly from the devices, it could probably recognize the audio-device in the webcam, which of course does not have a module loaded in the host?
With best regards,
Ingo
to allow mutiple s2ram + resume in the host operating system I had to:
a) disable "usb-legacy support" in the BIOS of the MoBo.
b) blacklist the module "snd-usb-audio" which does not have a suspend/resume script.
(this module is otherwise loaded automaticallyfor the microphone in my Web-Cam)
Without these 2 configurations together the host would only suspend+resume once, the second attempt to suspend will fail (already without VBox installed).
c) unloading usblp (as currently done for suspend) is probably only optional, I did that becaus usblp does not have a suspend/resume script.
So, if VBox is gathering information on attached USB-devices directly from the devices, it could probably recognize the audio-device in the webcam, which of course does not have a module loaded in the host?
With best regards,
Ingo
-
- Volunteer
- Posts: 1699
- Joined: 13. Sep 2008, 02:18
Re: suspend to ram fails wenn the vbox modul is loaded
Problem: tg3 (Debian Lenny) needs unload/reload for working network after resumeFrank Mehnert wrote:fixedwheel: Can you explain your problem and the solution again? Did I understand you correctly that you unloaded/re-loaded the tg3 module for suspend/resume and that this made the networking stop working and that is actually not necessary?
Fix: /etc/pm/config.d/module
Code: Select all
# If you need to unload any modules to suspend/resume, add them here.
SUSPEND_MODULES="tg3"
No fix (i'm lazy and lame) did /etc/init.d/networking restart manually when missed to "savestate close" the guest before suspend
Solution: this might have been a Linux kernel bug (google: linux tg3 suspend resume) thats fixed now (2.6.39-2 Debian Wheezy) no need for /etc/pm/config.d/module any more
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
Today I gave it another try:
a) did not unload usblp for suspend (removed in /etc/pm/config.d/unload_modules)
b) upgraded to 4.0.10
This made things even worse:
s2ram + resume performed only once, then mouse got dead in the guest shortly after resume.
So this really could be an indication for USB issues. Back to 4.0.4 and all is fine again.
a) did not unload usblp for suspend (removed in /etc/pm/config.d/unload_modules)
b) upgraded to 4.0.10
This made things even worse:
s2ram + resume performed only once, then mouse got dead in the guest shortly after resume.
So this really could be an indication for USB issues. Back to 4.0.4 and all is fine again.
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
Here some info obtained with VBox 4.0.4 which beheaves well with usblp unloaded for s2ram, gathered with
After booting up the host:
going into suspend (s2ram):
and here the enrties from resume from s2ram:
Code: Select all
cat /var/log/messges | grep usblp
Code: Select all
Jul 9 13:37:56 pp kernel: [ 6.580096] usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1004
Jul 9 13:37:56 pp kernel: [ 6.582095] usbcore: registered new interface driver usblp
Jul 9 13:37:58 pp kernel: [ 11.802359] usb 2-3: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Code: Select all
Jul 9 14:41:03 pp kernel: [ 3796.188060] usbcore: deregistering interface driver usblp
Jul 9 14:41:03 pp kernel: [ 3796.188334] usblp0: removed
Code: Select all
Jul 9 14:50:11 pp kernel: [ 3811.369234] usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1004
Jul 9 14:50:11 pp kernel: [ 3811.369268] usbcore: registered new interface driver usblp
Jul 9 14:51:08 pp kernel: [ 3867.857068] usblp0: removed
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: suspend to ram fails wenn the vbox modul is loaded
I just checked my own Host based on your module and I found out that your module is loaded for printers. If you don't have your printer connected or turned on, it should not load and your s2ram should work fine, because the module isn't loaded. But once you do turn on your printer, the module will get loaded and stay loaded.
Solution? I think that part is at the developer of the usb printer module, usblp. But maybe VB can work around the problem with the module in some way. That is, if you can find a link between VB and the module. So what happens if no VB module is loaded and you suspend a few times with the usb printer module loaded? Any problems?
Solution? I think that part is at the developer of the usb printer module, usblp. But maybe VB can work around the problem with the module in some way. That is, if you can find a link between VB and the module. So what happens if no VB module is loaded and you suspend a few times with the usb printer module loaded? Any problems?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
Basically you are rigtht, the usblp module should have a suspend_resume script. My printer is permanently attached to the PC via USB. Normally it is in standby and is fired up as soon as I send a print job. Both, PC and Printer are attached to the APC-UPS. Even if printer is in standby it reports itself and communicates/can be activated via USB.Sasquatch wrote: Solution? I think that part is at the developer of the usb printer module, usblp.
All is perfectly working without VBox installed, and with VBox <= 4.0.4. I can suspend any time and resume as often as I like - no problems.But maybe VB can work around the problem with the module in some way. That is, if you can find a link between VB and the module. So what happens if no VB module is loaded and you suspend a few times with the usb printer module loaded? Any problems?
This usblp issue not having a suspend_resume script exists since kernel 2.6.32 in Lucid and in Squeeze. I doubt that it will be cured in future? And please don't forget: it was fine throughout earlier VBox-Versions.
Best regards,
Ingo
Last edited by ingo2 on 9. Jul 2011, 19:34, edited 1 time in total.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: suspend to ram fails wenn the vbox modul is loaded
How often do you print? If it's not that often, then you may consider turning the printer off. I have mine off all the time unless I want to print something. Other work around would be to make it a network printer so you don't have to turn it off all the time. Of course, these are only patches to a problem that should not exist as you noted. A complete fix should still be required because I'm sure other users will have a USB printer they rarely use, but when they do and they want to suspend, they hit this problem.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Posts: 22
- Joined: 22. Jan 2009, 19:16
Re: suspend to ram fails wenn the vbox modul is loaded
I made a photo of the error message (sorry for bad quality): http://i56.tinypic.com/s18fh4.jpgpico_c_nickel wrote:I'm suffering from the same issue. Additionaly machine doesn't switch off after init 0, I have to do it manually with the power switch. Instead a kernel panic appears regarding vboxdrv (sorry, don't have time to post exact error message).
This occurs if I want to shutdown my machine. The same seems to happen during suspend.
If I change the default stop runlevels in /etc/init.d/vboxdrv from "0" to "0 1 6" machine shuts down properly again! What's the reason for not using the defaults here?
Regarding suspend/resume, if I add "vboxnetadp vboxnetflt vboxpci vboxdrv" to /etc/pm/config.d/module machine suspends/resumes properly again!
If you need further information, please ask.
Regards
Last edited by pico_c_nickel on 10. Jul 2011, 10:38, edited 1 time in total.
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
Turning off the printer is not as easy as you assume. It is a good old and reliable hp DeskJet 970cxi. It has a button to turn it off, but that is just putting it in standby/soft-off with very low power consumption, but still allows wake-up via USB - which printer today does have a real mains switch??? I would have to unplug the power cable from my UPS!Sasquatch wrote:How often do you print? If it's not that often, then you may consider turning the printer off.
This indicates that usblp module is designed to be loaded and unloaded on demand - so a special suspend/resume function appears obsolet in the view of the kernel developers?Sasquatch wrote:But once you do turn on your printer, the module will get loaded and stay loaded.
Without unloading usblp I get following enty in /var/log/messages each time I perform s2ram:
Code: Select all
kernel: [ 146.895035] usblp 2-3:1.0: no reset_resume for driver usblp?
With best regards,
Ingo
What about a pragmatic solution: split VBox into a desktop edition (which also takes care of suspend/resume) and a server/workstation edition where such properties are not needed?
- Attachments
-
- var.log.messages-VBox4.0.4-mit_s2ram.txt
- Just for your information:
"messages" with VBox 4.0.4 and suspent+resume which works fine with usblp unloaded - (83.28 KiB) Downloaded 23 times
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: suspend to ram fails wenn the vbox modul is loaded
My printer, an HP PSC 2175, has a soft touch power button too, no hard switch like thing. It doesn't wake on USB and when I press the button, it does turn on or off completely.ingo2 wrote:It has a button to turn it off, but that is just putting it in standby/soft-off with very low power consumption, but still allows wake-up via USB - which printer today does have a real mains switch???
No idea, but when I turned the printer off, the module was still loaded. If it would be loaded and unloaded on demand, I would expect the module to be unloaded automatically when the system is send to suspend, be it ram or disk. If the kernel devs would think it is obsolete, it's not programmed very well IMO.ingo2 wrote:This indicates that usblp module is designed to be loaded and unloaded on demand - so a special suspend/resume function appears obsolete in the view of the kernel developers?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
Hi Sasquatch,
I now made an experiment which probably took me a bit further:
According to CUPS-documentation here https://wiki.archlinux.org/index.php/CU ... ting_usblp in paragraph
USB printers under CUPS 1.4.x
I blacklisted 'usblp' and found that my printer works fine without that module using 'libusb'. So the "old" way via /dev/usb/lpX is no longer used.
With this configuration I again upgraded VBox to 4.0.10 and -> The mouse problem is immediately observed after 1st suspend+resume!
Exactly the same situation as if I let usblp load at boot-up and do not unload for suspend, leaving usblp inoperative after resume.
Downgrading to 4.0.4 makes it disapper completely - right now I have done > 5 suspend+resume with 4.0.4 and all is fine.
So, my understanding now is VBox > 4.0.4 somehow blocks/looses the printer device after resume, which here is /dev/bus/usb/002/003 (or races with cupsd for catching that device???)
It has permissions 664 owner=root, group=lp
The problem is now seen immediately after resume because CUPS does no longer have the alternative to print via 'usblp' as before, where I had to perform several suspends until I could observe the mous problem in VBox guests.
Probably this will help technicans to pin it further down (affected is Lucid and Squeeze). If more info is needed, please let me know,
Ingo
I now made an experiment which probably took me a bit further:
According to CUPS-documentation here https://wiki.archlinux.org/index.php/CU ... ting_usblp in paragraph
USB printers under CUPS 1.4.x
I blacklisted 'usblp' and found that my printer works fine without that module using 'libusb'. So the "old" way via /dev/usb/lpX is no longer used.
With this configuration I again upgraded VBox to 4.0.10 and -> The mouse problem is immediately observed after 1st suspend+resume!
Exactly the same situation as if I let usblp load at boot-up and do not unload for suspend, leaving usblp inoperative after resume.
Downgrading to 4.0.4 makes it disapper completely - right now I have done > 5 suspend+resume with 4.0.4 and all is fine.
So, my understanding now is VBox > 4.0.4 somehow blocks/looses the printer device after resume, which here is /dev/bus/usb/002/003 (or races with cupsd for catching that device???)
Code: Select all
ls -l /dev/bus/usb/002/003
crw-rw-r--+ 1 root lp 189, 130 10. Jul 17:41 /dev/bus/usb/002/003
Code: Select all
lsusb
Bus 002 Device 005: ID 046d:c404 Logitech, Inc. TrackMan Wheel
Bus 002 Device 004: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 002 Device 003: ID 03f0:1004 Hewlett-Packard DeskJet 970c/970cse
Probably this will help technicans to pin it further down (affected is Lucid and Squeeze). If more info is needed, please let me know,
Ingo
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
I have now set up a separate test installation of Squeeze-amd64, VBox 4.0.4 + 2 VM's and taken full backup for fast restore (takes only minutes). Blacklisted modules: usblp, snd-usb-audio.
Upgrading to 4.0.10, 1x s2ram and printing on a USB-printer with a VM running causes the "mouse problems". So my conclusion is that it has somehow to do with USB.
Please let me know which additional information you need, this is a test system where I cand do almost anything.
Best regards,
Ingo
Upgrading to 4.0.10, 1x s2ram and printing on a USB-printer with a VM running causes the "mouse problems". So my conclusion is that it has somehow to do with USB.
Please let me know which additional information you need, this is a test system where I cand do almost anything.
Best regards,
Ingo
-
- Posts: 192
- Joined: 28. Feb 2008, 14:15
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: OS/2, WinXP-10, Linux
- Location: Germany
Re: suspend to ram fails wenn the vbox modul is loaded
So, I just got the guest in the VM to freeze.
With VM up and running and the USB-WebCam attached to the host running and displaying in "Cheese", I did:
a) suspend the host
b) resume the host - WebCam continuing to work smoothly as expected.
c) close "Cheese" which switches off the WebCam as well
Guest in the VM freezes with full CPU load and 1 core of the host as well, see output from top:
I now closed the VM with saving its state (host is still running smoothly with low CPU-usage). This VM is now dead!
d) I now removed/backuped all existing log files and started-up the VM, what ends in the "frozen state" of it.
e) close and save the VM again. I do attach the machine's log from this cycle.
Please note that the VM is configured without any USB adapter!
This VM is still available on my test system, please advise what additional information is needed.
With VM up and running and the USB-WebCam attached to the host running and displaying in "Cheese", I did:
a) suspend the host
b) resume the host - WebCam continuing to work smoothly as expected.
c) close "Cheese" which switches off the WebCam as well
Guest in the VM freezes with full CPU load and 1 core of the host as well, see output from top:
Code: Select all
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2760 ingo 20 0 750m 196m 169m S 108 3.3 62:18.18 VirtualBox
2148 root 20 0 136m 48m 19m S 2 0.8 11:16.03 Xorg
d) I now removed/backuped all existing log files and started-up the VM, what ends in the "frozen state" of it.
e) close and save the VM again. I do attach the machine's log from this cycle.
Please note that the VM is configured without any USB adapter!
This VM is still available on my test system, please advise what additional information is needed.
- Attachments
-
- VBox.log
- Boot up and subsequent shutdown (save) a frozen VM. Host Squeeze-amd64
- (56.95 KiB) Downloaded 21 times
-
- Posts: 49
- Joined: 28. Aug 2009, 00:24
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: windows 98se, 2k, xp, 7, solaris, opensolaris, reactos, ubuntu, debian,...
- Contact:
Re: suspend to ram fails wenn the vbox modul is loaded
still a problem with beta 2 (just modprobing vboxdrv and s2r is enough), can't try beta 3 because of http://forums.virtualbox.org/viewtopic.php?f=15&t=43142
is it possible to print some debug messages to the screen when doing s2r? maybe that could give some hints why it fails.
is it possible to print some debug messages to the screen when doing s2r? maybe that could give some hints why it fails.