logout is slow, profiling reveals lots of CPU time in nouveau_connector_detect

Bug #1191426 reported by Adam Dingle
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Fix Released
Medium
Unassigned
Unity
Fix Released
Medium
Unassigned
linux (Ubuntu)
Invalid
Medium
Unassigned
unity (Ubuntu)
Fix Released
Medium
Unassigned
xserver-xorg-video-nouveau (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

I'm running Ubuntu 13.10 (Saucy) on a MacbookPro9,1, which has both an Nvidia GeForce GT 650M and an integrated Intel HD Graphics 4000 controller. I boot with EFI and use the Nouveau driver.

On this machine logging out is slow, taking maybe 10 seconds or so. 'top' shows that the X server process uses lots of CPU during logout. I ran sysprof and it attributes much of the CPU time to nouveau_connector_detect, called via the following:

system_call_fastpath [48.98%]
 sys_ioctl [41.90%]
  do_vfs_ioctl [41.87%]
   drm_ioctl [41.47%]
    drm_mode_getconnector [34.14%]
     drm_helper_probe_single_connector_modes [34.14%]
      nouveau_connector_detect [28.84%]
      nouveau_connector_detect_lvds [3.83%]
      intel_crt_detect [1.48%]

The percentages above are of the total CPU time used in the shutdown sequence, so I think several seconds of time is being spent in the path above. That doesn't seem right.
---
ApportVersion: 2.10.2-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: adam 1744 F.... pulseaudio
 /dev/snd/controlC0: adam 1744 F.... pulseaudio
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
DistUpgraded: Fresh install
DistroCodename: saucy
DistroRelease: Ubuntu 13.10
DistroVariant: ubuntu
DkmsStatus:
 bcmwl, 6.30.223.30+bdcom, 3.9.0-4-generic, x86_64: installed
 bcmwl, 6.30.223.30+bdcom, 3.9.0-5-generic, x86_64: installed
 bcmwl, 6.30.223.30+bdcom, 3.9.0-6-generic, x86_64: installed
ExtraDebuggingInterest: Yes, including running git bisection searches
GraphicsCard:
 Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Apple Inc. Device [106b:00fb]
 NVIDIA Corporation GK107M [GeForce GT 650M Mac Edition] [10de:0fd5] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Apple Inc. Device [106b:00fc]
HibernationDevice: RESUME=UUID=97a27f76-3baf-42fe-b6fc-5bee91c831ca
InstallationDate: Installed on 2013-06-10 (5 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130609)
MachineType: Apple Inc. MacBookPro9,1
MarkForUpload: True
NonfreeKernelModules: wl
Package: xserver-xorg-video-nouveau 1:1.0.8-0ubuntu1
PackageArchitecture: amd64
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB:
 0 nouveaufb
 1 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.9.0-6-generic root=UUID=3ca362e9-34d3-4c77-8a5a-07ecf66b8619 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.9.0-6.13-generic 3.9.6
RelatedPackageVersions:
 linux-restricted-modules-3.9.0-6-generic N/A
 linux-backports-modules-3.9.0-6-generic N/A
 linux-firmware 1.109
Tags: saucy saucy ubuntu reproducible
Uname: Linux 3.9.0-6-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 08/08/2012
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP91.88Z.00D3.B08.1208081132
dmi.board.asset.tag: Base Board Asset Tag#
dmi.board.name: Mac-4B7AC7E43945597E
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro9,1
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-4B7AC7E43945597E
dmi.modalias: dmi:bvnAppleInc.:bvrMBP91.88Z.00D3.B08.1208081132:bd08/08/2012:svnAppleInc.:pnMacBookPro9,1:pvr1.0:rvnAppleInc.:rnMac-4B7AC7E43945597E:rvrMacBookPro9,1:cvnAppleInc.:ct10:cvrMac-4B7AC7E43945597E:
dmi.product.name: MacBookPro9,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.
version.compiz: compiz 1:0.9.9~daily13.04.18.1~13.04-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.45-2ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 9.1.3-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 9.1.3-0ubuntu2
version.xserver-xorg-core: xserver-xorg-core 2:1.13.3-0ubuntu12
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu2b2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.1.0-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.21.9-0ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.8-0ubuntu1
xserver.bootTime: Sat Jun 15 20:09:48 2013
xserver.configfile: default
xserver.errors:
 Failed to load module "nvidia" (module does not exist, 0)
 Failed to load module "nvidia" (module does not exist, 0)
xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.13.3-0ubuntu12
xserver.video_driver: nouveau

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1191426

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Adam Dingle (adam-yorba) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected reproducible saucy ubuntu
description: updated
Revision history for this message
Adam Dingle (adam-yorba) wrote : BootDmesg.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : BootLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : CRDA.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : Dependencies.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : DpkgLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : GconfCompiz.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : IwConfig.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : Lspci.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : Lsusb.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : ProcModules.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : PulseList.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : RfKill.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : UdevDb.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : UdevLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : WifiSyslog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : XorgLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : XorgLogOld.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : xserver.devices.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : xserver.outputs.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Did this issue occur in a previous version of Ubuntu, or is this a new issue?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.10 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10-rc6-saucy/

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Adam Dingle (adam-yorba) wrote :

I'm not sure whether this is new in Saucy, since I got this MacBook Pro only after I had upgraded to Saucy.

I tested with the upstream kernel you specified and the behavior is exactly the same: logging out is very slow, taking perhaps 10 seconds or more. And once again profiling showed lots of time in nouveau_conector_detect() - in fact, this time 41.35% of all CPU time during the entire logout sequence was spent in that function, which seems way high.

tags: added: kernel-bug-exists-upstream
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report[0]? That will allow the upstream Developers to examine the issue, and may provide a quicker resolution to the bug.

Please follow the instructions on the wiki page[0]. The first step is to email the appropriate mailing list. If no response is received, then a bug may be opened on bugzilla.kernel.org.

Once this bug is reported upstream, please add the tag: 'kernel-bug-reported-upstream'.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Adam Dingle (adam-yorba) wrote :

Joseph,

I'm not convinced that a kernel bug report would be appropriate here. As I've pointed out, a surprising amount of CPU time is being spent in nouveau_connector_detect which is presumably in the Nouveau kernel driver. The Nouveau project tracks its bugs separately from the Linux kernel; see http://nouveau.freedesktop.org/wiki/Bugs/. I thought about filing this at Nouveau, but that Web page says

   If you are using packages from your distribution, send the bug reports to your distribution and not directly to us.

And so that's what I did.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xserver-xorg-video-nouveau (Ubuntu):
status: New → Confirmed
Revision history for this message
Doug McMahon (mc3man) wrote :

log out is 800% slower than usual (pre 13.10), now around 10 sec.
On nvidia hardware, 8400m gs, doesn't matter if nouveau or nvidia, (currently 3.10 kernel, 319 drivers), current, newer or older kernels inc. raring's, lightdm or gdm, ect., 10 secs on/with all combos.

Didn't happen early on in 13.10 but has existed for some time now, whatever you all where doing with systemd, upstart *may * have been around when first seen

Revision history for this message
Doug McMahon (mc3man) wrote :

Also to note - on same hardware using ubuntu-gnome image log outs are as normal for here - 1 - 1.5 sec.'s

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Since this bug is only reproducible under Unity, this is the affected project.

Changed in unity:
status: New → Confirmed
Changed in xserver-xorg-video-nouveau (Ubuntu):
importance: Undecided → Medium
affects: unity → ubuntu
affects: ubuntu → unity (Ubuntu)
Changed in unity (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Changed in linux (Ubuntu):
status: Triaged → Invalid
Changed in xserver-xorg-video-nouveau (Ubuntu):
status: Confirmed → Invalid
Changed in hundredpapercuts:
status: New → Confirmed
assignee: nobody → Paper Cuts Ninja (papercuts-ninja)
Revision history for this message
Doug McMahon (mc3man) wrote :

At least here on previously affected machine this is longer an issue, log outs are back to about 1 sec. or so

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

If you find this bug is still affecting you, please set it back to a status of 'confirmed'. Thank you.

Changed in unity (Ubuntu):
status: Triaged → Fix Released
Changed in hundredpapercuts:
status: Confirmed → Fix Released
Changed in unity:
importance: Undecided → Medium
status: New → Fix Released
Changed in hundredpapercuts:
assignee: Papercuts Ninjas (papercuts-ninja) → nobody
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.