[SOLVED] Ubuntu 14.04 - Huge (10x) performance loss after power failure

Guys,

I would like to say that this is the second time this bug has happened. I have played several games on this laptop for 7-8 months using Ubuntu 14.04 and nVidia 840M with no issues (Dota 2, L4D 2, Bioshock Infinite)

The first time this bug happened was after a power failure. The 3D performance went from excellent to awful, unplayable-frame-by-frame performance. I reformatted the machine, reinstalled an old version of Ubuntu (14.04.01) and initially the problem persisted, but as soon as I installed L4d 2 (not sure is this fixed it) and restarted everything went back to normal (maybe I changed something).

The second time, same thing, power failure; I wake up with the notebook turned off (suspended? Not sure) and same thing happens again. Awful performance degradation with no easy way to know why. I tried purge reinstall 331 to no avail, xorg-edgers drivers did not work (black screen).

I really don’t want to reinstall Ubuntu again, reinstall drivers and hope that installing some random application will solve this issue. The driver is detected, PowerMizer is set to Maximum Performance, dmesg seems to indicate everything is fine. HALP!

Additional information below


~ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) ~ lspci | grep 3D
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)


$ glxheads
glxheads: exercise multiple GLX connections (any key = exit)
Usage:
glxheads xdisplayname …
Example:
glxheads :0 mars:0 venus:1
Name: :0
Display: 0x2609120
Window: 0x4600002
Context: 0x261ea70
GL_VERSION: 4.4.0 NVIDIA 331.113
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 840M/PCIe/SSE2


Loading new nvidia-331-331.113 DKMS files…
First Installation: checking all kernels…
Building only for 3.13.0-49-generic
Building for architecture x86_64
Building initial module for 3.13.0-49-generic
Done.


$ glxinfo | grep rendering
direct rendering: Yes


$ glmark2

glmark2 2012.08

=======================================================
OpenGL Information
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 840M/PCIe/SSE2
GL_VERSION: 4.4.0 NVIDIA 331.113

[build] use-vbo=false: FPS: 99 FrameTime: 10.101 ms

                              glmark2 Score: 99 

=======================================================


dmesg | grep --ignore-case nvidia
[ 1.972905] nvidia: module license ‘NVIDIA’ taints kernel.
[ 1.977001] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 1.982287] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[ 3.787830] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
[ 3.787835] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 331.113 Mon Dec 1 21:08:13 PST 2014
[ 4.419967] nvidia 0000:01:00.0: irq 53 for MSI/MSI-X


$ dmesg | grep bbswitch
[ 4.047098] bbswitch: version 0.7
[ 4.047104] bbswitch: Found integrated VGA device 0000:00:02.0: _SB_.PCI0.GFX0
[ 4.047109] bbswitch: Found discrete VGA device 0000:01:00.0: _SB_.PCI0.PEG0.PEGP
[ 4.047181] bbswitch: detected an Optimus _DSM function
[ 4.047188] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

nvidia-bug-report.log.gz (59.6 KB)

Installed 340.~ from xorg edgers. Same issue.

Help, even the intel integrated graphics card has (far) superior performance. I need to understand this issue.

Try removing the battery from the laptop, for a minute.

The BIOS can get into a bad state (e.g. preventing bootup), and this can clear it.

You are on point! This has been bugging me for weeks, and you solved it just like that (This looks like a House episode).

I have no words! Thanks! Truly thanks! Case closed!

=======================================================
glmark2 2012.08

OpenGL Information
GL_VENDOR:     NVIDIA Corporation
GL_RENDERER:   GeForce 840M/PCIe/SSE2
GL_VERSION:    4.4.0 NVIDIA 331.113

=======================================================
[build] use-vbo=false: FPS: 2672 FrameTime: 0.374 ms

                              glmark2 Score: 2672 

=======================================================

What model of laptop?

Check whether a BIOS upgrade for your laptop is available.

It is a relatively cheap custom made laptop, the BIOS is less than one year old I’ll see about updates for it.

sudo dmidecode -s bios-release-date
05/23/2014
sudo dmidecode -s baseboard-product-name Type2 - Board Product Name1 sudo dmidecode -s baseboard-manufacturer
Type2 - Board Vendor Name1

Titanium B153 MAX

Processor
Intel Core i5 Haswell - 4200M 2.5 GHz, 3MB Cache (3.1 GHz com Max Turbo)
Memory
8 GB HyperX Impact DDR3 (1600 MHZ) / ( 2 x 4 GB )
HARD DISK (HDD), SSD ou SSHD
SSD 120 GB SATA III
Optic Drive
Leitor/Gravador DVD 8X DVD±R/RW/4X +DL Super-Multi Drive & Software
Video Board
Nvidia GeForce 840M GPU com 2GB Video Dedicado