Bug 468746

Summary: Bluetooth modem connection fails after suspend
Product: [Fedora] Fedora Reporter: thepiratekings
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: bnocera, dwmw2, itamar, kernel-maint, marcel, quintela
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 14:23:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
messages log when problem occurs none

Description thepiratekings 2008-10-27 19:47:58 UTC
Description of problem:

I use a bluetooth phone as a modem.  When I suspend and resume, I get the error "
Device Cingular: The serial port could not be locked." when trying to open a connection.  I am also no longer able to browse the device via the bluetooth menu in my system tray.

Version-Release number of selected component (if applicable):

Fedora 9, updated as of 10/27/08

How reproducible:

Suspend my thinkpad, resume, /sbin/ifup ppp0


Steps to Reproduce:
1. Suspend
2. /sbin/ifup ppp0
3. cry
  
Actual results:

Device Cingular: The serial port could not be locked.


Expected results:

Connection to the internet via cellphone modem

Additional info:

I noticed this problem after the wireless driver for my ath5k chipset was integrated into the kernel, they may be competing for the radio in some way.  Also, rfcomm tells me that channel 8 is closed after the suspend.  I'm using a Lenovo thinkpad x60s.

Comment 1 Bastien Nocera 2008-10-27 19:57:53 UTC
How do you create the rfcomm connection in the first place?

Comment 2 thepiratekings 2008-10-28 06:40:22 UTC
I'm not sure what level of detail you're after.

Aside from the actual device address, my rfcomm.conf file looks like

rfcomm0 {
#	# Automatically bind the device at startup
#	bind no;
	bind yes;
#	# Bluetooth address of the device
#	device 11:22:33:44:55:66;
	device <my device address removed>
#
#	# RFCOMM channel for the connection
	channel 8; 
#	# Description of the connection
	comment "LG CU400";
}

does that help?

Comment 3 Emilio Scalise 2009-01-01 20:22:44 UTC
Created attachment 328046 [details]
messages log when problem occurs

I have also this problem, I've attached the dmesg relative to the problem.
The log is relative to a boot, ppp 3g connection over an rfcomm bluetooth serial port, suspend, resume and then a reload of the bluetooth init script.
After reloading the bluetooth init script the rfcomm serial port starts to work again.

Here is my quick and dirty workaround to the problem:

Place in /etc/pm/sleep.d/bt-suspendfix.sh and make it executable (chmod +x).

-----------------
#!/bin/bash
case $1 in
    hibernate)
        true
        ;;
    suspend)
	echo "Unloading bt for suspend"
        /etc/init.d/bluetooth stop
	/usr/bin/rfcomm release /dev/rfcomm0
        ;;
    thaw)
	true
        ;;
    resume)
	echo "Reloading bt after suspend"
        /etc/init.d/bluetooth start
	/usr/bin/rfcomm bind /dev/rfcomm0
        ;;
    *)  echo "somebody is calling me totally wrong."
        ;;
esac

-----------------

There is obviously something wrong in the bluetooth stack kernel code for suspend handling.

Comment 4 Bastien Nocera 2009-04-24 13:30:52 UTC
(In reply to comment #3)
<snip>
> There is obviously something wrong in the bluetooth stack kernel code for
> suspend handling.  

There's nothing wrong in the Bluetooth kernel code. Your TCP connections will also die when they timeout due to your computer being suspended. Same thing here.

I don't believe the serial service in bluetoothd has that sort of problems.

Though those errors are kernel problems, and are most likely already fixed in newer kernels.
Dec 31 15:38:24 puffopc kernel: pm_op(): usb_dev_resume+0x0/0xa returns -19
Dec 31 15:38:24 puffopc kernel: PM: Device 3-1 failed to resume: error -19

Reassigning

Comment 5 Bug Zapper 2009-06-10 03:06:03 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Bug Zapper 2009-07-14 14:23:58 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.