Bumblebee-Project/Bumblebee — Issue #90: High cpu usage from programs launched with optirun
Author: Telekhan
Created: 2012-02-24 23:18:52+00:00
State: open

I have a lightweight application that uses around 1-2% cpu on a single core when run using the integrated graphics, or on other computers. When launched with optirun the same program consumes nearly 100% of a single core, this seems to be a common theme among many applications launched with optirun, though it's difficult to tell with many, as they naturally use a fairly large amount of cpu.

The programs themselves run smoothly, so I'm unsure as to whether or not this is a bug, but it is the application process itself experiencing the extremely high cpu usage.

Another detail that may be worth mentioning is that the applications take 10 seconds or more to launch with optirun, and during that time optirun itself uses an entire core.

I'm using a Dell XPS15 with an i7 2670qm processor and nvidia gt540m card.

Here is the output of /var/log/syslog during a run:

Feb 24 23:16:26 xps-laptop kernel: [ 2113.519642] bbswitch: enabling discrete graphics
Feb 24 23:16:26 xps-laptop kernel: [ 2113.993145] pci 0000:01:00.0: power state changed by ACPI to D0
Feb 24 23:16:26 xps-laptop kernel: [ 2113.993155] pci 0000:01:00.0: power state changed by ACPI to D0
Feb 24 23:16:26 xps-laptop kernel: [ 2113.993183] pci 0000:01:00.0: restoring config space at offset 0x1 (was 0x100006, writing 0x100003)
Feb 24 23:16:26 xps-laptop kernel: [ 2113.993199] pci 0000:01:00.0: power state changed by ACPI to D0
Feb 24 23:16:26 xps-laptop kernel: [ 2113.993203] pci 0000:01:00.0: power state changed by ACPI to D0
Feb 24 23:16:26 xps-laptop kernel: [ 2113.993211] pci 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Feb 24 23:16:26 xps-laptop kernel: [ 2113.993216] pci 0000:01:00.0: setting latency timer to 64
Feb 24 23:16:26 xps-laptop kernel: [ 2114.045650] nvidia 0000:01:00.0: power state changed by ACPI to D0
Feb 24 23:16:26 xps-laptop kernel: [ 2114.045654] nvidia 0000:01:00.0: power state changed by ACPI to D0
Feb 24 23:16:26 xps-laptop kernel: [ 2114.045662] nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Feb 24 23:16:26 xps-laptop kernel: [ 2114.045667] nvidia 0000:01:00.0: setting latency timer to 64
Feb 24 23:16:26 xps-laptop kernel: [ 2114.045671] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none
Feb 24 23:16:26 xps-laptop kernel: [ 2114.045782] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 295.20 Mon Feb 6 21:07:30 PST 2012
Feb 24 23:16:26 xps-laptop acpid: client connected from 4263[0:1001]
Feb 24 23:16:26 xps-laptop acpid: 1 client rule loaded
Feb 24 23:16:34 xps-laptop acpid: client connected from 4263[0:1001]
Feb 24 23:16:34 xps-laptop acpid: 1 client rule loaded
Feb 24 23:16:49 xps-laptop kernel: [ 2136.519780] nvidia 0000:01:00.0: PCI INT A disabled
Feb 24 23:16:49 xps-laptop kernel: [ 2136.522727] bbswitch: disabling discrete graphics
Feb 24 23:16:49 xps-laptop kernel: [ 2136.522860] bbswitch: Result of Optimus _DSM call: 11000059
Feb 24 23:16:49 xps-laptop kernel: [ 2136.535353] pci 0000:01:00.0: Refused to change power state, currently in D0
Feb 24 23:16:49 xps-laptop kernel: [ 2136.567371] pci 0000:01:00.0: power state changed by ACPI to D3