Opened 4 years ago

Closed 3 years ago

#10306 closed defect (fixed)

A new File Browser window launches in every suspend cycle when a USB/SDcard is attached.

Reported by: mavrothal Owned by: martin.langhoff
Priority: normal Milestone: 11.2.0-M4
Component: gnome-desktop Version: Development build as of this date
Keywords: os851 Cc:
Blocked By: Blocking:
Deployments affected: Action Needed: no action
Verified: no

Description

In os850, powerd 26, gnome desktop for both XO-1 and X0-1.5 the autobowse function of nautilus launched a new window of the device (usb/sdcard) in every suspend cycle. With a 15sec timeout setting can be very annoying.
Setting "File Browser Preferences -> media -> Browse media when inserted" to false (unckeck box) remedies that.
Either powerd or file browser settings should be fixed.

Attachments (2)

10306-not-reproduce-dmesg.log (37.5 KB) - added by Quozl 4 years ago.
fail to reproduce dmesg, quozl's blue usb stick
10306-reproduce-dmesg.log (43.2 KB) - added by Quozl 4 years ago.
reproducd dmesg, quozl's white usb stick

Download all attachments as: .zip

Change History (20)

comment:1 Changed 4 years ago by Quozl

  • Summary changed from A nwe File Browser window launches in every suspend cycle when a USB/SDcard is attached. to A new File Browser window launches in every suspend cycle when a USB/SDcard is attached.

comment:2 Changed 4 years ago by Quozl

  • Action Needed changed from never set to diagnose
  • Keywords os851 added

Reproduced.

comment:3 Changed 4 years ago by Quozl

Related #10295. (The filesystem is mounted by the media becoming available, yet is not mounted on suspend).

comment:4 Changed 4 years ago by Quozl

  • Milestone changed from Not Triaged to 10.1.2
  • Priority changed from normal to blocker

comment:5 Changed 4 years ago by Quozl

  • Priority changed from blocker to high

Not a regression. Still bad.

comment:6 Changed 4 years ago by Quozl

Reproduced day before yesterday, and just now, on an XO-1.5 HS with build os850 and a specific USB device.

Failed to reproduce just now on an XO-1.5 with build os851 using four different devices.

Reproduced just now on XO-1.5 with build os851 using the first USB device.

The symptom follows a specific USB device, which contains a FAT32 partition. At console, after waiting for idle suspend, typing df to wake, repeating it, shows the filesystem is momentarily not mounted and then mounted. dmesg shows a "FAT: bread failed in fat_clusters_flush".

Changed 4 years ago by Quozl

fail to reproduce dmesg, quozl's blue usb stick

Changed 4 years ago by Quozl

reproducd dmesg, quozl's white usb stick

comment:7 Changed 4 years ago by Quozl

An attempt was made to reproduce with affected and unaffected USB stick, and the dmesg output attached. The dmesg output was trimmed and diff'd, and the only relevant changes were the USB stick SerialNumber and these lines reported after resume:

@@ -604,3 +686,8 @@
 Restarting tasks ... 
 hub 1-0:1.0: over-current change on port 2
 done.
+FAT: bread failed in fat_clusters_flush
+sd 0:0:0:0: [sda] 7856127 512-byte logical blocks: (4.02 GB/3.74 GiB)
+sd 0:0:0:0: [sda] Assuming drive cache: write through
+sd 0:0:0:0: [sda] Assuming drive cache: write through
+ sda: sda1

comment:8 Changed 4 years ago by Quozl

Using single-user mode and rsync, but without reformatting the filesystems, I swapped the filesystem content between the affected and unaffected USB sticks. Both USB sticks became affected.

comment:9 Changed 4 years ago by Quozl

I'm fairly sure this is not a problem with powerd or nautilus settings, although both things things could be changed to alleviate the symptom; powerd by not suspending when a filesystem is mounted, nautilus by not mounting filesystems automatically. I'm not suggesting either of those changes, though the original poster thinks the solution is with those components.

It seems more likely to be a problem with the kernel handling of FAT filesystems for devices that are momentarily offline. As such, it might occur on directed suspend, such as lid close or power button press.

Tested directed suspend with affected USB devices. Lid close or power button did not cause the symptom of launching a new window for the filesystem. Idle suspend continued to show the symptom.

comment:10 Changed 4 years ago by Quozl

  • Milestone changed from 10.1.2 to 10.1.3

comment:11 Changed 4 years ago by martin.langhoff

This is nasty.

Could it be related to "aggressive/parallelized USB resume"? We need it for fast resume, but it can trip up flaky devices.

It's spooky that your content test led to both devices being affected. Maybe it's the footprint of directory entries? Does a fsck.vfat find any corruption?

comment:12 Changed 4 years ago by Quozl

There was no corruption detected by fsck.vfat that I recall. Given the message about FAT clusters, it is probably related to usage or filling of the filesystem, or a certain amount of cluster allocation.

Google for

"bread failed in fat_clusters_flush" lkml suspend resume

... one of those patches might be relevant. It probably doesn't happen on recent kernels. It may have been patched on the Fedora 11 kernel; I gather we are using the upstream Linus kernel. I don't think it has anything to do with OLPC's changes.

comment:13 Changed 4 years ago by Quozl

  • Component changed from power manager (powerd) to gnome-desktop
  • Owner changed from pgf to martin.langhoff

comment:14 Changed 4 years ago by dsd

  • Milestone changed from 11.2.0-M3 to 11.2.0-M4

comment:15 Changed 3 years ago by dsd

  • Priority changed from high to normal

I think our idle suspend model is asking for trouble with USB devices, see my comment in #10295.

This bug also mentions SD cards; I'm surprised that this happens there, as I expect SD power to be maintained during suspend so that mounts should not change. I might be missing something. Need to investigate like has been done above for USB.

comment:16 Changed 3 years ago by mavrothal

I think this bug should be closed since newer builds/powerd do _not_ have this problem. A new window manager window does not open although "Browse media when inserted" is on in Nautilus preferences

The only remaining issue is that if a USB stick is unmounted but not removed, it auto-remounts and the file manager window opens upon wakeup from idle-suspend
This is _not_ the case for SDcards

comment:17 Changed 3 years ago by godiard

  • Action Needed changed from diagnose to test in build

Tested in 872, I think can be closed. Open only one window if the device is attached and not mounted, and don not open more windows.

comment:18 Changed 3 years ago by Quozl

  • Action Needed changed from test in build to no action
  • Resolution set to fixed
  • Status changed from new to closed

Agreed, the symptom no longer occurs, when I test for it as I did before; by leaving the filesystem mounted over suspend you no longer get multiple windows containing the same view. If you use the Eject option or icon before the idle suspend, then after the resume a new window is opened.

Note: See TracTickets for help on using tickets.