How to solve the Ubuntu 18.04 display issues (lagging, flickering)?
Assuming the nVidia is causing the issue, a workaround is to run on the Intel IGD exclusively. The following steps achieve this in increasing order of 'exclusivity'. You could check for improvement after each step.
1. Configure Xorg to prefer the Intel
Create file /etc/X11/xorg.conf.d/10-intel.conf
(this may require mkdir /etc/X11/xorg.conf.d
), containing:
Section "OutputClass"
Identifier "Intel"
MatchDriver "i915"
Driver "intel"
EndSection
2. Disable modeswitching out of IGD
Edit /etc/default/grub
and add xdg.force_integrated=1
to GRUB_CMDLINE_LINUX
. When done, run sudo update-grub
before rebooting.
3. Blacklist the nouveau
kernel driver
Edit /etc/default/grub
and add modprobe.blacklist=nouveau
to GRUB_CMDLINE_LINUX
. When done, run sudo update-grub
before rebooting.
4. Uninstall the Xorg nouveau driver
sudo apt remove xserver-xorg-video-nouveau
This will trigger removal of the xserver-xorg-video-all
meta-package, which by default is installed. That is alright, as long as xserver-xorg-video-intel
remains installed. To be sure:
sudo apt remove xserver-xorg-video-all
sudo apt install xserver-xorg-video-intel
Related videos on Youtube
Alexandre V.
Updated on September 18, 2022Comments
-
Alexandre V. over 1 year
How to improve the display on Ubuntu 18.04? I have tried many different approaches presented on this website and none of them have worked.
I have a MSI GS60 Ghost Pro with integrated Intel GPU and NVIDIA GTX 970M, and I'm having the lagging effect when scrolling web pages (on Chrome, Firefox) and very noticeable flickering effect when moving windows.
The hardware and drivers:
alex@alex-ubuntu:~$ lspci | egrep ' VGA|3D' 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) 01:00.0 3D controller: NVIDIA Corporation GM204M [GeForce GTX 970M] (rev a1)
NVIDIA GPU:
alex@alex-ubuntu:~$ glxinfo | grep OpenGL OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 970M/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 390.77 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.6.0 NVIDIA 390.77 OpenGL shading language version string: 4.60 NVIDIA OpenGL context flags: (none) OpenGL profile mask: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.77 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 OpenGL ES profile extensions: alex@alex-ubuntu:~$ lsmod | grep drm_kms_helper drm_kms_helper 172032 2 i915,nvidia_drm syscopyarea 16384 1 drm_kms_helper sysfillrect 16384 1 drm_kms_helper sysimgblt 16384 1 drm_kms_helper fb_sys_fops 16384 1 drm_kms_helper drm 401408 6 i915,nvidia_drm,drm_kms_helper
Intel GPU:
alex@alex-ubuntu:~$ glxinfo | grep OpenGL OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5 OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.0 Mesa 18.0.5 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 OpenGL ES profile extensions: alex@alex-ubuntu:~$ lsmod | grep drm_kms_helper drm_kms_helper 172032 2 nouveau,i915 syscopyarea 16384 1 drm_kms_helper sysfillrect 16384 1 drm_kms_helper sysimgblt 16384 1 drm_kms_helper fb_sys_fops 16384 1 drm_kms_helper drm 401408 9 nouveau,i915,ttm,drm_kms_helper
I have tested the following approaches:
-
zwets almost 6 yearsCould you provide some links to the things you have tried already?
-
Alexandre V. almost 6 yearsYes, I have updated the question with the references.
-
zwets almost 6 yearsAre you using the (default) Ubuntu session? Was this a fresh install or upgrade from 16.04? If it is an upgrade, you could try creating a new (temporary) user account and see if the issues occur also for that user. If not, then the issues may be due to 'old' user settings in
~/.local
,~/.config
, and possibly~/.cache
. -
Alexandre V. almost 6 years@zwets, I'm using the default Ubuntu session. It's a fresh install from the 18.04 ISO image.
-
zwets almost 6 yearsYou mention "the problem is more prominent when using the nVidia", does this mean it is also there when you run exclusively on the Intel IGD? Note that the nVidia may still be used by X while the IGD drives the display. What nVidia driver you are using? What is the output of
lsmod | grep drm_kms_helper
? (Please edit your question to add these.) -
Alexandre V. almost 6 yearsYes, it's happening with Intell IGD too, but much less noticeable. I have updated the comments.
-
-
Alexandre V. almost 6 yearsThanks for sharing this, but it hasn't improved. I think there should be a fix for the NVIDIA driver. We have a powerful GPU and can't use it because of the exposed issues.