Bumblebee-Project / Bumblebee

Bumblebee daemon and client rewritten in C
http://www.bumblebee-project.org/
GNU General Public License v3.0
1.29k stars 142 forks source link

glxsheres64 performance drops to 1 fps after 5 min #1046

Closed rugubara closed 3 years ago

rugubara commented 4 years ago

in fact, I observe such decrease of performance with any app I run with optirun. glxspheres64 is just a good benchmark, allows to measure the time until the performance drop.

59.958787 frames/sec - 66.914006 Mpixels/sec
60.015071 frames/sec - 66.976819 Mpixels/sec
59.997218 frames/sec - 66.956895 Mpixels/sec
7.210923 frames/sec - 8.047390 Mpixels/sec
1.000310 frames/sec - 1.116346 Mpixels/sec
0.999793 frames/sec - 1.115769 Mpixels/sec
0.999973 frames/sec - 1.115970 Mpixels/sec

The drop happens in 300 secs from the start. It happens using both VirtualGL and primus bridges. I'm happy to do more testing provided I have some guidance.

I run on thinkpad P52 (with Nvidia Quadro P2000)

Linux PF16W6Y2 5.3.12-gentoo #1 SMP PREEMPT Thu Nov 21 15:55:52 MSK 2019 x86_64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz GenuineIntel GNU/Linux

x11-base/xorg-server-1.20.5 x11-drivers/nvidia-drivers-440.31 x11-misc/bumblebee-3.2.1_p20170130 x11-misc/primus-0.2

arpie42 commented 4 years ago

I spotted exactly this same issue yesterday using blender3d. I tested using glxgears and see the same performance drop as you, down to 1fps after exactly 5 minutes.

One thing to add is that the system power usage reported by powertop drops from 40W to less than 20W at exactly the same time as the frame rate drop.

I'm assume this is linked to new power-management code in a recent kernel update (I updated my system a few days ago). But that is pure speculation.

Also happy to help test where I can.

rwirth commented 4 years ago

I have a similar problem after upgrading my Arch distribution, which updated the kernel. After some time the frame rate drops. I haven't timed it, but the time to the frame rate drop seems to vary quite a bit. I'm currently using the nvidia-xrun scripts to start a separate X session as a workaround.

The current kernel and package versions are Linux 5.3.12-arch1-1 #1 SMP PREEMPT Wed, 20 Nov 2019 19:45:16 +0000 x86_64 GNU/Linux xorg-server 1.20.6-1 nvidia 440.31-3 bumblebee 3.2.1-20 bbswitch 0.8-265 virtualgl 2.6.2-1

The previous kernel was 5.3.1-arch1-1-ARCH

GFdevelop commented 4 years ago

I have the same issue on archlinux but after 10 minutes, the kernel can't be because I have tried on linux 5.4 and on linux-lts 4.19. I can see this issue if I run the game with optirun, primusrun or pvkrun.

This is the output of optirun glxspheres64 after 10 minutes:

...
216.067227 frames/sec - 190.493510 Mpixels/sec
214.684778 frames/sec - 189.274688 Mpixels/sec
113.857249 frames/sec - 100.381105 Mpixels/sec
0.999754 frames/sec - 0.881423 Mpixels/sec
1.000306 frames/sec - 0.881910 Mpixels/sec
0.999735 frames/sec - 0.881406 Mpixels/sec
0.999854 frames/sec - 0.881511 Mpixels/sec
...
mihkel-t commented 4 years ago

Workaround / possible solution: https://devtalk.nvidia.com/default/topic/1067676/linux/440-36-with-bumblebee-drops-to-1-fps-after-running-for-10-minutes/post/5409047/#5409047

GFdevelop commented 4 years ago

Workaround / possible solution: https://devtalk.nvidia.com/default/topic/1067676/linux/440-36-with-bumblebee-drops-to-1-fps-after-running-for-10-minutes/post/5409047/#5409047

Mmm thanks, I have some power saving setting to 10 minutes, in this time I don't remember all my settings, I use this usefull link as start point to debug...

EDIT: this work and now is in the archwiki https://wiki.archlinux.org/index.php/Bumblebee#Framerate_drops_to_1_FPS_after_a_fixed_period_of_time

arpie42 commented 4 years ago

Well, that has solved it for me. Thank you, @mihkel-t.

bluca commented 3 years ago

Fixed by https://github.com/Bumblebee-Project/Bumblebee/pull/1070