AdamWeiss
Posts: 37
Joined: Tue Sep 06, 2016 6:18 pm

GPU not being used?

Tue Nov 22, 2016 3:22 am

I'm not sure how to debug this.
I've been working on an application for quite some time, and it's been working fine.
It uses 25% CPU, and uses the GPU for 2D rendering (from SFML/OpenGL).

I copied the image off my SD card and wrote it to a larger SD card.
In the process, I changed one file (boot_config.txt) because I had a bug in the old copy.

However, now I'm using 95% CPU.
And when I do a top -H, I can see my threads are spending all their time in llvmpipe, which suggests that the CPU is doing all the rendering.

Any ideas on how I can begin to debug this?
I still have the old SD card.

Thanks!

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: GPU not being used?

Tue Nov 22, 2016 6:14 pm

The answer's in the question.

What changed?
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

User avatar
bensimmo
Posts: 4577
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: GPU not being used?

Tue Nov 22, 2016 6:16 pm

What OS?

If Raspian are you using the beta 3D driver.
Did you update the system.

What did you remove from that file?

AdamWeiss
Posts: 37
Joined: Tue Sep 06, 2016 6:18 pm

Re: GPU not being used?

Tue Nov 22, 2016 11:23 pm

Well, a little digging.
For some reason, I had to re-enable the GL driver from raspi-config.
Once I did that, it worked, and I'm back to 25% CPU.

One thing that's weird though.
I'm using the official LCD, and no matter what, I can't get the screen to rotate.

Previously, putting "rotate_display=2" would fix that.
But now it seems that it's being ignored.

The line I had removed from the config.txt was "gpu_memory=6"....I apparently had started to make a change, and it got left in there.
With that line in there, the system would not boot on the LCD screen, but would on HDMI.
I've been debugging 2 issues. First was the LCD not booting (I just switched to using it, and got that figured out).
Second was this.

So, I'm almost 100% back up and running.
I'm running and booting successfully with the LCD, GL is working, but screen won't rotate.

AdamWeiss
Posts: 37
Joined: Tue Sep 06, 2016 6:18 pm

Re: GPU not being used? [SOLVED]

Tue Nov 22, 2016 11:31 pm

Apparently, lcd_rotate=2 is different from display_rotate=2.
At least with the experimental GL driver.

After making that change, everything is working!

Return to “Advanced users”