ionutbortis / gnome-bedtime-mode

Home of the "Bedtime Mode" :zzz: GNOME Shell Extension.
GNU General Public License v3.0
78 stars 12 forks source link

Possible Nvidia Graphics Driver Issues #33

Open Provisional9448 opened 2 years ago

Provisional9448 commented 2 years ago

I reported issues on the GNOME Extensions page and was told to follow-up on GitHub. The extension has graphics instability issues on my hardware and I'm not sure why. I have disabled all other extensions to try to isolate the issue, but I'm still experiencing the same problem.

The hardware I'm running Fedora 36 on is a Thinkpad T480 with a disabled Nvidia MX150 GPU. I disabled the Nvidia GPU by blacklisting Nouveau in /etc/default/grub. I did discover that I have Nvidia firmware nvidia-gpu-firmware-20220913-140.fc36.noarch.rpm installed via the Fedora updates repo. I'm not sure if that particular firmware is affecting the graphics at all, but I'm doubtful because I don't have Nvidia graphics drivers installed.

One note about the Thinkpad T480: as I understand it, only the integrated GPU is wired to display outputs, meaning the iGPU would still be handling outputs even if Nvidia graphics drivers were installed.

ionutbortis commented 2 years ago

Hello!

I'm not very familiar with nvida graphics card as I'm currently using an Asus laptop with some AMD one... This is the only PC I'm able to run and test the Bedtime Mode extension.

I created a test gnome extension that only adds a simple grayscale effect to the gnome shell => https://github.com/ionutbortis/gnome-clutter-issues

Can you please checkout that repo and install the test extension?

I added a very explanatory description on how to do that on the github page.

I want to check if your issues with the Bedtime Mode extension are also occurring when using this small test extension.

If yes, then I can follow up with someone from the gnome shell development team so they could at least tell us if this is a driver issue and maybe suggest some possible fixes.

Please follow up here with your findings, thanks!

Provisional9448 commented 2 years ago

I have confirmed that I still experience bugginess with the test extension.

One clue that I discovered while testing is that when I disable my internal display and output to an external monitor, the bug goes away. However, when I use both the internal display and the external monitor, the bug comes back. So it seems to have something to do with handling multiple displays. I can use either internal or external displays but not both.

ionutbortis commented 2 years ago

Hmm. If your issues are reproducible also with the test extension it means that the problem might be somewhere in the gnome shell code or/and video drivers.

If you want I can try to reach someone from the Gnome development team and ask them if we need to file an issue over there or if there are any workarounds.

Do you want me to do that? If yes, please provide some kind of screen recording that outlines the display issues.

Also, some additional info might help:

Provisional9448 commented 2 years ago

OS: Fedora Linux 36 (Workstation Edition) Host: 20L5CTO1WW ThinkPad T480 Kernel: 5.19.16-200.fc36.x86_64 Uptime: 1 hour, 16 mins Packages: 2396 (rpm), 33 (flatpak) Shell: bash 5.2.2 Resolution: 1920x1080 DE: GNOME 42.5 WM: Mutter WM Theme: Adwaita Theme: Adwaita [GTK2/3] Icons: Adwaita [GTK2/3] Terminal: gnome-terminal CPU: Intel i7-8650U (8) @ 4.200GHz GPU: NVIDIA GeForce MX150 GPU: Intel UHD Graphics 620 Memory: 5312MiB / 64178MiB Windowing System: Wayland

I have uploaded a few videos reproducing some of the bugs mentioned.

ionutbortis commented 2 years ago

@anthony-y-chan

Unfortunately the guys from the Gnome channel weren't of much help :grimacing:

I had another idea today, to create a test extension using the other Clutter effect used, Clutter.BrightnessContrastEffect.

Can you spare a few moments from your time and test this extension also? => https://github.com/ionutbortis/gnome-clutter-issues/tree/method2

It's the same repo, but a different git branch. If you follow the README guide from the above link, you would get the "method2" branch code and install that one.

If the issues are not reproducible with this version, then the problem is caused by Clutter.DesaturateEffect.

Please let me know of your findings. Thanks!

Provisional9448 commented 2 years ago

Interestingly, I was able to reproduce the bug but only if I had both my internal laptop display and my external display enabled. Things seemed to be working fine if I turned off the internal display and only used the external display.

ionutbortis commented 2 years ago

@anthony-y-chan

What about the "method2" of the test extension? Do you get the same behavior even with the slight sepia color filter? (https://github.com/ionutbortis/gnome-clutter-issues/tree/method2)

Provisional9448 commented 2 years ago

Yes, I was able to observe the same bug with the sepia color filter. But only with both displays enabled.

ionutbortis commented 2 years ago

Yes, I was able to observe the same bug with the sepia color filter. But only with both displays enabled.

Hmm, that's unfortunate :sweat_smile:

I mean, it shows that the performance issues are actually in Gnome Shell and not caused by the Bedtime Mode extension code, that's good from my side. But I was hoping that there would be some difference between those two effects so we can open a compelling issue on the Gnome Shell side.

I'm afraid that if we're to open just a generic performance issue, it will be buried and forgotten :disappointed:

Things you could do going further:

I know Wayland is better, it has the nice touchpad gestures and so on but you could just test this out and if something is different in your multi monitor setup.

As I'm reading online, Gnome seems notorious for performance issues and by using two displays at the same time, maybe it doesn't have the PC resources to handle them properly. By enabling you second GPU maybe it could leverage some of the work to that.

Mutter patches => https://copr.fedorainfracloud.org/coprs/calcastor/gnome-patched/ Gnome tripple buffering patch => https://copr.fedorainfracloud.org/coprs/shrisha/

Applying both of them could be problematic, I would use just one of them at the time. They have rollback commands, but I would backup my system beforehand.

I'm on Gnome 3.36.8 with X11 and using the glxgears command line tool I don't get frame drops when using the Bedtime Mode extension.

I don't have a separate monitor but I just tested out with a Full HD TV and Gnome Shell really struggles to push normal 1080p resolution to the TV. The framerate on the laptop screen is around 60 FPS but when I move the glxgears window to the TV it drops to 23 FPS. The framerate on the TV is bad no matter of the Bedtime Mode state, active or not.

Lastly, you could add an issue to Gnome Shell and explain there the multi monitor setup problem. If you do this please post the issue link here so I can follow it.