Zorin stuttering after blank screen

Hello!

I’ve been using Zorin Core for a couple of months now on my desktop and laptop. This is my first Linux distro that I’m attempting to use full time. So far, it’s been an enjoyable experience! :blush:

I do however keep getting the following issue with my laptop:

Each time the screen goes blank and I wake the device I find that Zorin is stuttering every couple of seconds. After I restart the device everything starts working as normal. I have done some searching and reading online and tested different graphics driver options offered in the additional drivers but have had no success. I’m hoping a post here on the forum might get me pointed in the right direction to resolve this issue.

Laptop Specs:
OS: Zorin Core 15.3
CPU: Intel i7 10750H
RAM: 16GB
Storage: 500GB NVME
GPU: RTX 2070 (also with an Intel integrated GPU)
Manufacture: MSI GL65 Leopard

Is anyone able to offer some guidance on how I can troubleshoot this issue? Thanks in advance.

Can you describe your issue in depth?
It is very tricky to describe visualizations. Would you say that "stutter" is comparable to the word "lag"? Or more comparable to the word "flickering?"

You mentioned PC and Notebook- are you experiencing this problem on just one or both?

Does the stutter occur only on Wake from Suspend? Or also from startup or Logout /login? Or by wake from "screen goes dark" are you referring to Power Management timeout that locks the screen after a period of inactivity- and does it only occur then?

Can you relay your kernel version:

uname -a

Can you relay the grub parameters that you are using currently?

sudo nano /etc/default/grub

Just these lines:

GRUB_DEFAULT=
GRUB_TIMEOUT_STYLE=
GRUB_TIMEOUT=
GRUB_DISTRIBUTOR=
GRUB_CMDLINE_LINUX_DEFAULT=
GRUB_CMDLINE_LINUX=

Hi Aravisian,

Thanks for getting back to me so quickly.

To describe the stutter, it seems to be like the entire operating system freezes for a millisecond then continues like normal and this repeats every couple of seconds until I restart the machine. The stutter seems to effect all programs irrespective of what I am doing.

I have created a short gif to try and capture the stutter to hopefully help show you the issue.

https://imgur.com/a/R3NmRgD

You will see I am able to drag the calculator around normally but then it stutters and you will see it quickly catch-up. (stutter appears about 11 seconds into the gif)

If it's not clear I am happy provide a few more examples.

As for your questions:

  • I am experiencing this issue on both my laptop and desktop.

  • My typical use case when I experience this issue is from inactivity locking the machine then the screen goes blank. After I wake the machine from inactivity I get the stuttering. My current settings are to blank the screen after 10 minutes with automatic suspend disabled.

  • Kernel Version: Linux 5.4.0-66-generic #74~18.04.2-Ubuntu SMP Fri Feb 5 11:17:31 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  • Grub parameters:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Hello Mr. Lom!

I'd like to thank you for providing as much details with us as you can, and for providing the animated GIF that shows the stutter.

I myself have had a once every second stutter in some games, while using Linux. It took me a very long time to figure out what the issue is, and as it turned out, I've had 2-different issues in one.

The first time I had this issue, it was due to my mouse polling rate being set too high for the CPU, to be able to handle. The second time I doubt with this issue, it was due to, too much strain on my Nvidia GPU.

Considering that your not dealing with this issue while in game, I am less likely to believe that the issue is due to your GPU, especially if you are using the proprietary drivers for your GPU.

Lets start with something simple, lets adjust your mouse polling rate.

CTL ALT F2 to enter terminal

Type this code into terminal and hit enter.

sudo gedit /sys/module/usbhid/parameters/mousepoll

Then change the poll rate to 500 and save the file. Then unplug your mouse, then plug it back in. See how things operate then.

1 Like

Do both machines carry the same Nvidia graphics card?

When you installed - did you replace RST with AHCI in BIOS (or UEFI)? This is necessary.

On this grub paramter:

GRUB_CMDLINE_LINUX=""

Have you tried adding to it (and we now see it reverted to default)?
Here is a list of parameters that have been shown to potentially help with this issue:
acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1 scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep

So for example:

GRUB_CMDLINE_LINUX=“nouveau.blacklist=1 acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1 scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep”
1 Like

Hi StarTreker,

I have made the changes to the polling speed and will let you know if this makes a difference. (I had to reboot to check the UEFI for Aravisian so currently I have no stutter)

I'll keep this thread updated. Thanks for the help so far :slight_smile:

Hi Aravisian,

  • Both machines have Nvidia graphics cards. (Laptop: RTX 2070, Desktop: GTX 1050Ti)

  • I just checked the UEFI and SATA mode is AHCI on both machines.

  • I have updated the Grub command line with the values you have recommended and rebooted the laptop. I did not change the command line value prior to this forum post so did I miss something in the installation which sets these values?

I'll keep you posted on the stutter to see if this resolves the issue. Thanks again for your help!

1 Like

No, you did not miss anything. I was checking to see if you had tried any of those parameters while seeking a solution.

Hi Aravisian,

I woke the laptop this morning from the blank screen to find that the stutter has returned with the new grub values set and a longer polling speed on the cursor.

I was running a stopwatch to see if the stutters kept happening every x seconds. I found that this showed the stutter very clearly so I'll attach another gif for you to see.

https://imgur.com/a/42lqZ3x

Do you have any other recommendations?

Also here are the grub values that I used when I rebooted yesterday:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="nouveau.blacklist=1 acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1 scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep"

What Nvidia driver are you currently using?

Hi Aravisian,

I have attached a screenshot below with the current graphics driver selected.

Have you tested the Nouveau driver?

Hi Aravisian,

Yes, I did try the Nouveau driver when troubleshooting on my own and found it still made the OS stutter. I can test it again with the grub changes and I'll keep you posted.

Many thanks.

I am sorry for the short replies and delays- I am testing some things and all over the place like a wildman.

Nvidia- Is notorious about being very fickle on Linux. You can find some entertaining images on a Web Search of Linus Torvalds reactions to Nvidia.
I will be honest - I do not expect that we will just pop and this is fixed.

A couple things: Is hardware acceleration enabled or disabled?

Have you tested your onboard graphics? Many people use Onboard, then in Nvidia Settings Popup window, switch to Nvidia for intense visual programming, gaming or rendering.

CTR ALT F2 to enter terminal. Copy paste this code below to install gnome tweaks.

sudo apt install gnome-tweak-tool

Type this code to launch tweaks...

gnome-tweaks

Look for Keyboard & Mouse. Go to acceleration profile. Select FLAT.

Mouse acceleration is an evil thing on Linux cause it don't like to work correctly, so turning that off, is the right thing to do.

1 Like

Hi Aravisian,

Where would I need to check for the hardware acceleration settings? Is there a specific feature in the UEFI or is this a setting in Zorin?

As for the onboard GPU, do I just need to select the option "Continue using a manually installed driver" in the Additional Drivers? I'm not sure how to force the Intel GPU to be used instead of Nvidia?

Hi StarTreker,

I've made the changes to the mouse acceleration profile.

I'll keep you posted if this resolves the issue with the stutter.

Thanks for the suggestion :slight_smile:

Through Nvidia X Server Settings
This guide by Linuxbabe should have all the details needed

Check if Hardware Accleration is enabled in terminal:

glxinfo | grep "direct rendering"

If return is "Yes" then it is enabled.

HardwareEnablement is included in the Mainline kernel with the HWE id on it. Zorin OS comes with that included. Otherwise, you can

sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

sudo apt full-upgrade

Hi Aravisian,

Thanks for the information. Unfortunately the previous changes above have not resolved the stutter in Zorin. (just a quick update)

I was able to check the direct rendering and it is enabled on the machine. Would you like me to disable it?

I have also enabled the Intel GPU in the Nvidia X Server settings and will test this to see if it can remove the stutter.

I'll keep you posted. Thanks for all the help so far! :slight_smile:

Twiddling knobs and seeing what happens. It's Science!

Normally, I would suggest that upgrading your kernel (yours is at 5.4) would be the first option. With Zorin OS 16 nearing release, though... It may be worthwhile to wait on that. Only you can decide how you feel about that...