Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU Issues on Linux - Legion 5 pro - Gen 8 #6

Open
hpramanik opened this issue Aug 20, 2023 · 9 comments
Open

GPU Issues on Linux - Legion 5 pro - Gen 8 #6

hpramanik opened this issue Aug 20, 2023 · 9 comments

Comments

@hpramanik
Copy link

hpramanik commented Aug 20, 2023

I tried installing multiple Linux distros like Ubuntu, Manjaro, Fedora, and Garuda but all of them are having the same issue with Display flickering, freezing, and crashing completely.

Installed the latest Nvidia proprietary drivers, but still no resolution.

It starts off fine but when I change any display-related settings for example refresh rate or start watching a 4k video on YouTube the issue appears randomly and then the display freezes with multi-color flickering lines and the only option then is to power it off by long pressing the power button.

Detailed Specification:
Lenovo Legion 5 pro Gen 8 (2023) [16ARX8]
Processor: AMD Ryzen™ 7 7745HX
GPU: NVIDIA® GeForce RTX™ 4060
RAM: 32GB DDR5 5200Mhz

Any help or suggestions for resolving the issue would be greatly appreciated. If it is not the right place to ask the question, please redirect me to the appropriate place.

Lenovo Community link

Thanks.

@hpramanik hpramanik changed the title Linux GPU Issues - Legion 5 pro - Gen 8 GPU Issues on Linux - Legion 5 pro - Gen 8 Aug 20, 2023
@cszach
Copy link
Owner

cszach commented Aug 22, 2023

Hello! I am sorry to hear that you are experiencing this issue.

I wonder if this is a hardware problem. Do you encounter the problem when using Windows? What about a tty terminal? If it is a hardware problem, you might want to get your laptop checked.

If not, does the issue persist if you switch to Nouveau?

@hpramanik
Copy link
Author

Hi @cszach,
It isn't a hardware issue, verified in Windows. Windows works fine.
After digging some more and prime-run(d-DGP Nvidia 4060) to any browser and running 4K videos causing almost no flickering issue, it seems the flickering in Linux was due to the integrated GPU of Ryzen 7745hx.
So I tried increasing the UMA Frame buffer size from UEFI to max i.e. 4GB (stock factory settings was 512MB). After this change, the flickering is reduced almost to none. It occurs rarely and for split seconds which is fine and doesn't bother much.

In short, it felt like a 512MB buffer size was not enough to handle Linux UI workloads via integrated GPU mode but strangely Windows worked fine with 512MB. Also validated this by swapping to multiple distros by live-booting them the issue almost disappeared after the UMA Frame buffer size increase.

@strtgbb
Copy link

strtgbb commented Oct 16, 2023

Hi, I found the same solution with the UMA Frame buffer. So far I have not found a difference between 2GB and 4GB.

I found that the display issues were primarily with QT and Electron apps, although GTK apps would also break given enough time.
The QT problem means KDE distros are a no-go. Even after the UMA buffer fix, Kubuntu live still misbehaves. I've had the best results fo far with Ubuntu GNOME.

I have not had many of the issues documented in the readme. Wifi works out of the box, brightness keys sometimes don't work on a live image but are fine after install. I have not had any issues with my external display being laggy, although I did need to install the proprietary drivers for it to work.

I have encountered a few GNOME issues. GNOME power mode does not sync with Fn-Q. Unplugging the monitor results in GNOME entering an unrecoverable state [edit: this was fixed by the UMA tweak], and something I did with the prime-* commands resulted in being unable to switch from mirror to join mode, similar to this 3-year-old display settings bug.

I have found that the laptop screen is warmer than my external monitor, despite my monitor's settings already being at the warmest preset. This difference can be distracting if I have a light-mode app open on both displays. I'm not sure how to fix this.

@ikus060
Copy link

ikus060 commented Nov 12, 2023

Hello, I'm running the latest version of PopOS with kernel 6.5.6-76060506-generic and nvidia driver 535.113.01.
Running on X11.

I get a couple of issue with the display.

  1. It doesn't recover from "sleep".
  2. It seams to flicker after some period of time.
  3. glxgears on external monitor is running 1FPS

Could you give me some details regarding how to increase the UMA Frame buffer ??

@hpramanik
Copy link
Author

Hello, I'm running the latest version of PopOS with kernel 6.5.6-76060506-generic and nvidia driver 535.113.01. Running on X11.

I get a couple of issue with the display.

  1. It doesn't recover from "sleep".
  2. It seams to flicker after some period of time.
  3. glxgears on external monitor is running 1FPS

Could you give me some details regarding how to increase the UMA Frame buffer ??

  1. Check if you have hibernate instead of sleep, it seems it doesn’t recover from hibernate but sleep works fine for me. (Nobara/Fedora 38)
  2. Set higher UMA frame buffer size and check if it helps.
  3. The option will be available inside bios. Default should be set to 512M increase it to 2 to 4 GB based on how much ram capacity you are currently having.

@ikus060
Copy link

ikus060 commented Nov 13, 2023

@hpramanik It really is "sleep" mode.

I came across something regarding "UMA frame buffer size". I did not know it was a setting in the BIOS. I will give it a trial later today...

Thanks for helping.

@ikus060
Copy link

ikus060 commented Nov 15, 2023

I've enhanced the UDM Frame Buffer to 2G in hybrid mode, and it appears to have a positive impact. The system is now more "usable," exhibiting increased stability and avoiding the crashes experienced previously. Check out the changes in performance in this screenshot:

image

However, there are still imperfections. For instance, when running glxgears on the internal display, it achieves 177 FPS, but upon moving it to an external display, the FPS drops to 1. The same issue arises with applications like Google Chrome. So I cannot really use the hybrid mode. Yet

Do you have any Idea what might cause that ?

EDIT: I found that running vblank_mode=0 glxgears is working, but I have no clue how to apply that changes on the whole system.

@strtgbb
Copy link

strtgbb commented Nov 15, 2023

Are you still on PopOS? I found the installer to be very slow on this hardware and it timed out during LUKS setup. I suggest trying plain Ubuntu like me or Nobara/Fedora like hpramanik.

@ikus060
Copy link

ikus060 commented Nov 15, 2023

@strtgbb I will give a shot to Ubuntu. But I don't see the reason why it would make a difference. PopOS is shipped with more recent version of Kernel (6.5.6 vs 6.5.0) and more recent version of nvidia driver (545 vs 535).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants