Ubuntu

Serial port stops working after suspend

Reported by Dima Ryazanov on 2007-04-11
10
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Andy Whitcroft

Bug Description

Binary package hint: linux-image-2.6.20-1-generic

When my laptop wakes up after suspend, the serial port doesn't seem to work anymore. Programs can read from and write to it as before, but the data doesn't seem to be actually transmitted.

I don't know of any way to check the status of the serial port. After searching Google, I saw other people mention that the serial port uses IRQ 4, and its entry disappears from /proc/interrupts. But in my case, it doesn't appear there in the first place.

Also, the serial port driver is built into the kernel, and not compiled as a module. So I can't even try removing it and loading it again.

I'm using a Thinkpad T20, with ACPI enabled.

Antti P Miettinen (apm) wrote :

I can confirm partly - for me the serial /dev/ttyS0 is used for the wacom pen (Thinkpad X60 tablet). After resume from RAM the pen does not work and "serial" has dissappeared from /proc/interrupts. I tried creating a /etc/acpi/resume.d/20-setserial.sh containing s setserial command as suggested by ThinkWiki but that does not help.

The setserial command reports:

/dev/ttyS0, Line 0, UART: undefined, Port: 0x0200, IRQ: 5
        Baud_base: 921600, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test

and stty gives:

speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 10;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

Wacom survives suspend to disk & resume.

I'm currently using linux-image-2.6.20-15-generic version 2.6.20-15.27.

Antti P Miettinen (apm) wrote :

I managed to work around the lost wacom pen after resume. For me the /etc/acpi/resume.d/20-setserial.sh with "setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig" is not enough. In addition the serial port needs to be initialized in boot. I noticed that I can rescue the serial by stopping X and doing the setserial it in text mode. After that the wacom pen is functional also after suspend/resume. So I dpkg-reconfigured setserial to manual and created /etc/serial.conf with "/dev/ttyS0 port 0x0200 irq 5 autoconfig". So apparently the serial port needs some of the magic done by setserial before xorg opens the device.

But during testing this I noticed a more disturbing issue. Sometimes resume from RAM reboots! Eek. Is there an existing bug for this kind of behavior?

Thank you for taking the time to report this bug and helping to make Ubuntu better. Now that the 7.10 Gutsy Gibbon release of Ubuntu is out, we were wondering if you can still reproduce this issue. Could you please download and try the new version of Ubuntu from http://www.ubuntu.com/getubuntu/download and report back your results. If the issue is still present in the new release, please attach the following information:

* uname -a > uname-a.log
* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

Please be sure to attach each file as a separate attachment. For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies . Thanks again and we appreciate your help and feedback.

Changed in linux-source-2.6.20:
status: New → Incomplete
Antti P Miettinen (apm) wrote :

For me (Thinkpad X60 tablet) the wacom stylus seems to survive suspend/resume (ram&disk) in gutsy.

ssparko (eric-go4acs) wrote :

Please don't close this bug, I did not have this bug when using Kubuntu 7.04 but it appeared after upgrading to 7.10. Using Toshiba Tecra S3 laptop. I use the serial port in vmware, it reports:

serial0: The "/dev/ttyS0" file does not appear to be a serial port: Input/output error.

Failed to connect virtual device serial0.

Rebooting corrects the problem.

Hi Ssparko,

The Hardy Heron Beta release is currently available. It would be helpful if you could test and report back your results: http://www.ubuntu.com/testing . Thanks.

That may take me some time.... I'll let you know what I find.

Thank you,
Eric Sparks
Absolute Communication Solutions
530-271-0332 x 202 Voice
530-271-0335 Fax

----- Original Message -----
From: "Leann Ogasawara" <email address hidden>
To: <email address hidden>
Sent: Friday, April 4, 2008 6:14:55 PM GMT -08:00 US/Canada Pacific
Subject: [Bug 105380] Re: Serial port stops working after suspend

Hi Ssparko,

The Hardy Heron Beta release is currently available. It would be
helpful if you could test and report back your results:
http://www.ubuntu.com/testing . Thanks.

** Changed in: linux (Ubuntu)
Sourcepackagename: linux-source-2.6.20 => linux

--
Serial port stops working after suspend
https://bugs.launchpad.net/bugs/105380
You received this bug notification because you are a direct subscriber
of the bug.

Status in Source Package "linux" in Ubuntu: Incomplete

Bug description:
Binary package hint: linux-image-2.6.20-1-generic

When my laptop wakes up after suspend, the serial port doesn't seem to work anymore. Programs can read from and write to it as before, but the data doesn't seem to be actually transmitted.

I don't know of any way to check the status of the serial port. After searching Google, I saw other people mention that the serial port uses IRQ 4, and its entry disappears from /proc/interrupts. But in my case, it doesn't appear there in the first place.

Also, the serial port driver is built into the kernel, and not compiled as a module. So I can't even try removing it and loading it again.

I'm using a Thinkpad T20, with ACPI enabled.

Loris Caren (loris-caren) wrote :

I've got a similar problem with 7.10 on a Toshiba Tecra A9. If I suspend or hibernate the ttyS0 no longer works.
Doing stty < /dev/ttyS0 says std input: Input/output error. Setserial /dev/ttyS0 still sees it. Using setserial to (re)set the irq, port etc doesn't seem to do much.

Changed in linux:
status: Incomplete → Confirmed

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Can anyone confirm this is still an issue with Intrepid Ibex 8.10? If so, can you then test the latest Alpha for the upcoming Jaunty release? http://cdimage.ubuntu.com/releases/jaunty/ Please let us know your results. Thanks.

Changed in linux:
status: Confirmed → Incomplete
Andy Whitcroft (apw) wrote :

This bug report is being closed because we received no response to the previous inquiry for information. Please reopen if this is still an issue in the current Ubuntu release, Jaunty Jackalope 9.04 - http://www.ubuntu.com/getubuntu/download. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers