tomsom / yoga-linux

Run Linux on the Lenovo Yoga 7 14 (14ARB7) with AMD Ryzen 6800U (Rembrand).
https://github.com/tomsom/yoga-linux/wiki
56 stars 2 forks source link

Bad 3d performance under Linux? #45

Open AltreanGH opened 1 year ago

AltreanGH commented 1 year ago

First of all thank you for all the documentation in this repo! Because of this I could finally switch to Linux as the main OS on this laptop.

The one remaining issue I seem to face besides #9 (i am planning to replace the ssd) is that the performance of the laptop, especially in 3d games, seems to be a lot worse than on Windows.

Maybe it is just an issue with my install. Also, performance mode is set to 'Performance' in Gnome quick-settings (seems to also change the Lenovo performance mode to 'Extreme Performance').

I followed all relevant guides in the Wiki including changing to AMD pstate and installing the mesa-freeworld drivers.

Some performance metrics:

SuperTuxKart @ 1440x900 and graphics level 6 without vsync Windows: ~75FPS; Linux: ~61FPS

Crusader Kings III native version on Steam with low settings @ 1920x1200 with Vulkan (OpenGL is almost the same FPS-wise) Windows: >30FPS (playable); Linux: ~5-10FPS (not playable) - game has no built-in performance metrics AFAIK No real measurements because I shrank the Windows partition so that I can't reinstall the game on Windows

Laptop: Yoga 7 14ARB7 with Ryzen 6600U and 512GB SSD OS: Fedora 38 with Gnome 44.2 under Wayland (most recent updates) Kernel: 6.3.11

It may also be worth mentioning that hardware acceleration doesn't seem to work in Firefox for me (see #41).

AltreanGH commented 1 year ago

This seems to be more of an GPU issue. In a CPU-bound game like Minecraft, Linux performs even better than Windows while standing still (130 on Win; 280 on Lin). Could be just a coincidence or me messing something up.

stuarthayhurst commented 1 year ago

Did you do the tests while the laptop was plugged in? Setting it to performance can hurt GPU performance when unplugged from my testing, I'd assume that's because the CPU steals more of the limited power budget when unplugged in performance mode.

AltreanGH commented 1 year ago

Did you do the tests while the laptop was plugged in? Setting it to performance can hurt GPU performance when unplugged from my testing, I'd assume that's because the CPU steals more of the limited power budget when unplugged in performance mode.

While I did my test when not plugged in that doesn't seem to change anything. Also the difference between the Performance modes seems to be minimal (3-4FPS in SuperTuxKart).

What could also be important is that the Vitals extension reports about 25W of power usage when gaming which seems low considering the CPU alone can pull 27W according to AMD (maybe it just measures the CPU power).

The fans also seem more quiet than in Windows (maybe related to #40)

stuarthayhurst commented 1 year ago

If you benchmark with Unigine Superposition, Valley or Heaven, I can compare your results to mine. (Plugged in, set to performance in GNOME)

EDIT: You might need to tweak the VRAM size in BIOS, if it's not already set to 2GB, or the benchmarks may fail to launch

AltreanGH commented 1 year ago

Screenshot from 2023-07-10 14-24-06

stuarthayhurst commented 1 year ago

image

Well my results look a bit better than yours, but I am running a slightly newer kernel, and possibly a newer version of mesa (23.1.3).

Either way, I'll benchmark again on Windows this time and see if there's a significant difference.

stuarthayhurst commented 1 year ago

The benchmark seems broken on Windows with OpenGL, so I had to run it with DirectX instead.

Score 2948, Min 13.44, Avg 22.05, Max 27.28.

That's quite a difference, I don't think all of that is down to DirectX vs OpenGL.

AltreanGH commented 1 year ago

image

Well my results look a bit better than yours, but I am running a slightly newer kernel, and possibly a newer version of mesa (23.1.3).

Either way, I'll benchmark again on Windows this time and see if there's a significant difference.

AFAIK Kernel 6.4 intruduced the 'AMD P-State Guided Autonomous Mode' which might explain the performance difference.

stuarthayhurst commented 1 year ago

I'm not sure, as I have amd_pstate set to regular active mode at the moment, instead of guided.

AltreanGH commented 1 year ago

So the problem doesn't seem to be my system. With every extension disabled and only the benchmark running I also got 1324 points

stuarthayhurst commented 1 year ago

I guess we just have to sit tight and wait for performance improvements in mesa. Valve seems to be putting a lot of effort into the AMD graphics drivers on Linux now, so I'm sure we'll see gradual performance lifts. It's also relatively new hardware, so I guess it hasn't had as long as older architectures to mature.

grimthorpe commented 11 months ago

I don't know how much difference a 6800U vs 6600U makes, but I doubt it influences it this much. I guess 3d performance has improved. Superposition_Benchmark_v1 1_3581_1691355077

stuarthayhurst commented 11 months ago

The 6800U has a 680M, whereas the 6600U has a 660M. I know my screenshot shows a 680M, it's misidentified.

Hopefully it has improved, but it's difficult to tell between 2 different laptops and setups.

deikatsuo commented 11 months ago

on windows

Superposition_Benchmark_v1 1_3503_1691287828 Superposition_Benchmark_v1 1_4037_1691287576

stuarthayhurst commented 11 months ago

Interesting, maybe it's been fixed then, or there was a configuration issue to start.

Thanks for testing :)

AltreanGH commented 11 months ago

Since the last time I reinstalled Fedora 38, updated the kernel and enabled the guided autonomous mode. But my result barely improved. There seems to be a significant gap in performance from the 660M (which I use) to the 680M however (different benchmark). But not as big as 2x. Screenshot from 2023-08-07 13-07-54

image source

alomsimoy commented 10 months ago

On openSuse with kernel 6.3.9 and amdgpu driver works great.

AMD P-State is enabled, which clearly affected on my battery life (for better), but I didn't test performance before.

image

Akinzekeel commented 10 months ago

image

Interesting that my score is slightly lower despite the GPU reporting more VRAM

grimthorpe commented 10 months ago

I re-ran the benchmark last night and got 2 different values varying by around 500 (~4000 then ~3500), so it might not be the most accurate thing to use.

stuarthayhurst commented 10 months ago

I re-ran the benchmark last night and got 2 different values varying by around 500 (~4000 then ~3500), so it might not be the most accurate thing to use.

I picked the benchmark because I knew it was a modern benchmark that would run on Windows and Linux. It's probably not the world's most accurate benchmark sure, but laptops are already a pain to benchmark because they're very dependent on power and thermal conditions.

Either way, from the looks of things, the 680M seems to be pretty close to Windows, while there's a huge gap between Windows and Linux for the 660M.