Before moving on and start reading, have in mind that all I've wanted to do was just to make my laptop perform at 100% for games (That applies to the system altogether), and for that I wanted to use the 'performance' governor.
So after failed attempts, I finally came to the conclusion I was going nowhere if I kept on using very old tips and hints. I asked for help in groups, teams (from googlemail, which refused all my emails claiming I was sending them a virus) and Hexchat (really, I know the community from #linuxmint wants to help, but they have NO CLUE what they're talking about). So I investigated much further on my own and, after countless hours, several documentations and much frustration, I connected a few dots and this is my solution: the linux kernel does a horrible job at scaling up the cpu frequency when my laptop's running on battery. It won't do what it's supposed to do. Let me show you:
Tools used: CPU Frequency Scaling Monitor [Mate panel applet]
CPUFrequtils, libcpufreq0
Remember, these are AMD A12's frequency steps: 1.4Ghz, 1.8Ghz, 2.3Ghz and 2.7Ghz
We already know ondemand and powersave downclock the processor.
But if I want to game on Linux and laptop is discharging, 'performance' should max out everything in order to run heavy duty apps or games. Otherwise, there's no reason for it to exist. But all it does is sit on 1.8Ghz, no more or less. Pathetic.
At this point I was certain the tools I was using won't do any different, so I was focusing on BIOS restrictions. That could be it. This is what I came up with as a workaround:
sudo nano /sys/module/processor/parameters/ignore_ppc
That basically ignores BIOS restrictions and lets the kernel scale cpu frequency higher than 1.8Ghz. I changed it from 0 (default) to 1. After choosing 'performance' from CPU Frequency panel applet, it came up. But I wasn't convinced. So I did
xrandr --setprovideroffloadsink 0x44 0x79
In order for Xrandr to offload graphics task to my dGPU. And then:
DRI_PRIME=1 glmark2
Check this out:
//tested with 'performance' governor, running on battery, after setting ignore_ppc to 1
rodolfo@rodolfo-Aspire-A515-41G:~$ DRI_PRIME=1 glmark2
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: X.Org
GL_RENDERER: Radeon 500 Series (POLARIS12 / DRM 3.23.0 / 4.15.0-38-generic, LLVM 6.0.0)
GL_VERSION: 3.0 Mesa 18.0.5
=======================================================
[build] use-vbo=false: FPS: 447 FrameTime: 2.237 ms
[build] use-vbo=true: FPS: 504 FrameTime: 1.984 ms
[texture] texture-filter=nearest: FPS: 477 FrameTime: 2.096 ms
[texture] texture-filter=linear: FPS: 480 FrameTime: 2.083 ms
[texture] texture-filter=mipmap: FPS: 487 FrameTime: 2.053 ms
[shading] shading=gouraud: FPS: 498 FrameTime: 2.008 ms
[shading] shading=blinn-phong-inf: FPS: 495 FrameTime: 2.020 ms
[shading] shading=phong: FPS: 493 FrameTime: 2.028 ms
[shading] shading=cel: FPS: 485 FrameTime: 2.062 ms
[bump] bump-render=high-poly: FPS: 465 FrameTime: 2.151 ms
[bump] bump-render=normals: FPS: 502 FrameTime: 1.992 ms
[bump] bump-render=height: FPS: 501 FrameTime: 1.996 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 464 FrameTime: 2.155 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 354 FrameTime: 2.825 ms
[pulsar] light=false:quads=5:texture=false: FPS: 491 FrameTime: 2.037 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 346 FrameTime: 2.890 ms
[desktop] effect=shadow:windows=4: FPS: 453 FrameTime: 2.208 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 224 FrameTime: 4.464 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 251 FrameTime: 3.984 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 301 FrameTime: 3.322 ms
[ideas] speed=duration: FPS: 484 FrameTime: 2.066 ms
[jellyfish] : FPS: 449 FrameTime: 2.227 ms
[terrain] : FPS: 120 FrameTime: 8.333 ms
[shadow] : FPS: 472 FrameTime: 2.119 ms
[refract] : FPS: 247 FrameTime: 4.049 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 491 FrameTime: 2.037 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 482 FrameTime: 2.075 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 475 FrameTime: 2.105 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 473 FrameTime: 2.114 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 480 FrameTime: 2.083 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 482 FrameTime: 2.075 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 479 FrameTime: 2.088 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 483 FrameTime: 2.070 ms
=======================================================
glmark2 Score: 434
Now, lets compare it to the next result:
//tested with 'performance' governor, running on battery, no changes to ignore_ppc
rodolfo@rodolfo-Aspire-A515-41G:~$ DRI_PRIME=1 glmark2
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: X.Org
GL_RENDERER: Radeon 500 Series (POLARIS12 / DRM 3.23.0 / 4.15.0-38-generic, LLVM 6.0.0)
GL_VERSION: 3.0 Mesa 18.0.5
=======================================================
[build] use-vbo=false: FPS: 443 FrameTime: 2.257 ms
[build] use-vbo=true: FPS: 492 FrameTime: 2.033 ms
[texture] texture-filter=nearest: FPS: 482 FrameTime: 2.075 ms
[texture] texture-filter=linear: FPS: 484 FrameTime: 2.066 ms
[texture] texture-filter=mipmap: FPS: 482 FrameTime: 2.075 ms
[shading] shading=gouraud: FPS: 487 FrameTime: 2.053 ms
[shading] shading=blinn-phong-inf: FPS: 489 FrameTime: 2.045 ms
[shading] shading=phong: FPS: 482 FrameTime: 2.075 ms
[shading] shading=cel: FPS: 483 FrameTime: 2.070 ms
[bump] bump-render=high-poly: FPS: 455 FrameTime: 2.198 ms
[bump] bump-render=normals: FPS: 495 FrameTime: 2.020 ms
[bump] bump-render=height: FPS: 494 FrameTime: 2.024 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 460 FrameTime: 2.174 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 354 FrameTime: 2.825 ms
[pulsar] light=false:quads=5:texture=false: FPS: 485 FrameTime: 2.062 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 346 FrameTime: 2.890 ms
[desktop] effect=shadow:windows=4: FPS: 455 FrameTime: 2.198 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 212 FrameTime: 4.717 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 247 FrameTime: 4.049 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 298 FrameTime: 3.356 ms
[ideas] speed=duration: FPS: 485 FrameTime: 2.062 ms
[jellyfish] : FPS: 447 FrameTime: 2.237 ms
[terrain] : FPS: 119 FrameTime: 8.403 ms
[shadow] : FPS: 474 FrameTime: 2.110 ms
[refract] : FPS: 247 FrameTime: 4.049 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 489 FrameTime: 2.045 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 480 FrameTime: 2.083 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 487 FrameTime: 2.053 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 482 FrameTime: 2.075 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 366 FrameTime: 2.732 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 477 FrameTime: 2.096 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 478 FrameTime: 2.092 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 482 FrameTime: 2.075 ms
=======================================================
glmark2 Score: 428
In a nutshell, all that extra headache for a mere 6 points in performance difference.
Even if it was worth it, it's ridiculous, to say the least, how much of a nightmare Linux Mint 19 puts you through just because you want your laptop to perform like it should when it's discharging. Do you think your distro does any different? I bet it doesn't.
Now, it's very easy to go out and tell your friends and the internet "Oh Linux is better than Windows", but it really isn't. This ISSUE with laptops has been there for YEARS! I saw it myself: topics from 2013, 2012, 2010, all the way back to 2007! Many distros have come and gone and they don't touch this because they just don't want to fix it. AND EVEN IF THEY DID, it's absurd: how come they would like more people to use Linux distros if there are no GUI to deal with system files and attributes?
You know Linux distros have a long way to go when you compare it to your cellphone:
You can game on your cellphone until the battery dies. It won't force you to deal with cpupower, cpufrequency, cpufreq, whatever. Nor will Windows, which is why I still have to dual-boot on this machine if I want to game. On Windows, you're just a few clicks away. 'There, I want MAX Performance when it's on battery'. Done. It gets the job done.
"Oh but why are you complaining about Linux, haven't you got what you were expecting?"
No! My laptop CRUSHES those results when it's charging! In other words, after all this time, all I got was a false solution. It just tells you that you've scaled up the cpu frequency, not the system overall performance.
This is what I'm talking about:
//Laptop being charged, 'performance' governor, no changes to ignore_ppc
rodolfo@rodolfo-Aspire-A515-41G:~$ DRI_PRIME=1 glmark2
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: X.Org
GL_RENDERER: Radeon 500 Series (POLARIS12 / DRM 3.23.0 / 4.15.0-38-generic, LLVM 6.0.0)
GL_VERSION: 3.0 Mesa 18.0.5
=======================================================
[build] use-vbo=false: FPS: 595 FrameTime: 1.681 ms
[build] use-vbo=true: FPS: 668 FrameTime: 1.497 ms
[texture] texture-filter=nearest: FPS: 649 FrameTime: 1.541 ms
[texture] texture-filter=linear: FPS: 651 FrameTime: 1.536 ms
[texture] texture-filter=mipmap: FPS: 649 FrameTime: 1.541 ms
[shading] shading=gouraud: FPS: 665 FrameTime: 1.504 ms
[shading] shading=blinn-phong-inf: FPS: 665 FrameTime: 1.504 ms
[shading] shading=phong: FPS: 666 FrameTime: 1.502 ms
[shading] shading=cel: FPS: 666 FrameTime: 1.502 ms
[bump] bump-render=high-poly: FPS: 672 FrameTime: 1.488 ms
[bump] bump-render=normals: FPS: 672 FrameTime: 1.488 ms
[bump] bump-render=height: FPS: 666 FrameTime: 1.502 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 661 FrameTime: 1.513 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 651 FrameTime: 1.536 ms
[pulsar] light=false:quads=5:texture=false: FPS: 637 FrameTime: 1.570 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 617 FrameTime: 1.621 ms
[desktop] effect=shadow:windows=4: FPS: 634 FrameTime: 1.577 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 239 FrameTime: 4.184 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 265 FrameTime: 3.774 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 294 FrameTime: 3.401 ms
[ideas] speed=duration: FPS: 587 FrameTime: 1.704 ms
[jellyfish] : FPS: 613 FrameTime: 1.631 ms
[terrain] : FPS: 411 FrameTime: 2.433 ms
[shadow] : FPS: 661 FrameTime: 1.513 ms
[refract] : FPS: 552 FrameTime: 1.812 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 646 FrameTime: 1.548 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 633 FrameTime: 1.580 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 644 FrameTime: 1.553 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 627 FrameTime: 1.595 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 629 FrameTime: 1.590 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 635 FrameTime: 1.575 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 629 FrameTime: 1.590 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 627 FrameTime: 1.595 ms
=======================================================
glmark2 Score: 599
In conclusion, I do NOT recommend using Linux on your laptop if you want to game on it.
It's a frustration-guaranteed experience. And that's not me talking out of my frustration, that's the truth. Maybe come back in 2037 and see if they will have developed a GUI to deal with cpupower, cpufreq, overall system performance, etc. But I highly doubt that.