27

I have a Laptop with a GeForce GTX 1050 Ti. Additionally, I have connected two displays to my Laptop via Displayport and installed the nvidia driver via sudo apt-get install nvidia-384 nvidia-settings. When I use the "Intel power saving mode" , then the mouse extremely flickers in some cases (usually only on the main screen of the laptop, but sometimes also on the others). Now I tried to switch to the "Nvidia performance mode" via prime-select nvidia. However, now I have the problem that there is a lagging box around the cursor, which does not show the updated graphics beneath the mouse and still is there for about a second when moving the mouse away. I made a screenshot, where I marked the text and unmarked it; the graphics of the marked text is still there:

enter image description here

The rest is working fine (no mouse flickering) and I would like to keep the nvidia mode. How can I solve the problem?

One addition: The box goes away after disconnecting the displayport (i.e. removing the two additional displays).

Rolch2015
  • 428
  • 1
  • 5
  • 11

11 Answers11

17

I also had this annoying problem, and I was able to solve it by running:

sudo service lightdm restart

(This was suggested in a comment by m00am. At first I had tried to restart sddm, but it displayed a message saying I did not have that service. Installing the sddm package didn't help, but finally chosing the lightdm service worked.)

I clicked OK, and my computer restarted. Finally the lagging and cursor not updating problems were solved.

Eliah Kagan
  • 119,640
leileilei
  • 181
7

I had this problem with an AOC portable monitor in Linux Mint 19.1. The solution to restart lightdm worked for me but it was annoying to restart on after every fresh boot. Hence I figured that lightdm is starting too early in the boot sequence, so I modified systemd service config files for a less annoying solution.

In /lib/systemd/system/displaylink-driver.service:

Changed the line After=display-manager.service to Before=display-manager.service

In /etc/systemd/system/display-manager.service:

Modified ExecStartPre to

ExecStartPre=/bin/sh -c '/bin/sleep 10 && [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ]'

For Ubuntu 18.04 you can do the same edit, except to /lib/systemd/system/lightdm.service

Tom Berghuis
  • 219
  • 4
  • 9
6

Environment: Ubuntu 18.04 GTX1650 nvidia-430-driver(installed from ubuntu software)

Fixed the square around mouse problem by:

sudo apt install lightdm

Configure lightdm as default and reboot

sudo dpkg-reconfigure lightdm
sudo reboot

After rebooting, you will still see the square around mouse, then

sudo apt remove lightdm
sudo reboot

After rebooting, you will be in commandline.

sudo service gdm start

it will bring you into graphical mode again, and you will find that the square around mouse disappear

sudo dpkg-reconfigure gdm3

Then you do not need to type sudo service gdm start every time.

Hope it can help.

4

Restarting sddm worked for me, artifacts gone.

sudo systemctl restart sddm

This will terminate your current session, log you out, and restart the display manager. After logging back in, the problem are gone.

(source)

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Oleksii
  • 49
3

I had the same issue in parallel to having the issue described in here: External monitor turns off for several seconds every 5-10 minutes

After setting my refresh rate to 58 Hz and logging out/logging in the lagging box around my mouse disappeared. External screen timeout persists though, but that's another issue.

This worked for me, YMMV. I'm using Ubuntu 16.04 and Nvidia drivers.

3

Solutions working for me are the following...

ON KUBUNTU (KDE) :

  • use XRender instead of OpenGL
  • or with OpenGL, disable "vsync"

display properties window

ON UBUNTU (GNOME) :

  1. Install CompizConfiguration Settings Manager (CCSM) with Aplication Center
  2. Run CompizConfig
  3. Check both "Composite" and "OpenGL" !

Compiz Config Manager

  1. Let's go in "Composite" tab, uncheck the "automatic refresh detection" and fix your refresh rate to 60.

composite config

Hope it help someone.

Note: I'm using Lenovo L380 Intel Graphics on Kubuntu 18.10 Cosmic, with 3 VGA displays (1 USB-C Lenovo Docking Station + 2 DisplayLink adapters).

Meloman
  • 271
  • 4
  • 9
2

I had this exact issue on ubuntu 18.04 with unity desktop and nvidia-390 driver, and the solution of restarting lightdm worked for me.

I didn't like having to always open a terminal, run the command, then re-login, so I wanted a permanent fix. I figured if everything works, just not if lightdm is started at it's usual time, then it must be a timing issue.

I added 1 second delay into the launch of lightdm by changing the ExecStartPre= line in /lib/systemd/system/lightdm.service from

ExecStartPre=/bin/sh -c '[ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ]'

to

ExecStartPre=/bin/sleep 1 ; /bin/sh -c '[ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ]'

(just adding /bin/sleep 1 ; before what was already there)

works for me :)

Jeremy
  • 31
1

And another tip:

If you use a laptop computer when you unplugged the USB3.0 cable for some cases and you try to plug the USB3.0 again. If the DisplayLink does not work maybe you can try shutdown your computer and power off your display machine(for me, I use pluggable UD-3900). then it will work. unfortunately, you have to :sudo service lightdm restart again. This is useful for me. Because my DisplayLink does not work after taking my computer for a presentation in another room and at the same time I installed some other software. and when I came back, it did not work. I thought it was because of the updates and newly installed software. So I reinstalled Linux(I installed yesterday), it still did not work. So I POWERED OF my laptop and powered off my UD-3900, then start both computer and UD-3900. It works.

leileilei
  • 181
0

Go to additional driver and then change the radio button selection from Nvidia to any other (whichever present in your dialogue box). Apply and restart your system.

0

In the meantime I have upgraded to Ubuntu 18.04, installed the newest Displaylink driver (https://www.displaylink.com/downloads/ubuntu) and the nvidia-390 driver. Furthermore, I selected the nvidia-driver via sudo prime-select nvidia. Now it works fine, and the lagging box has also vanished. However, it did not work with the nvidia-410 driver, which currently is the recommended one. In contrast to the situation before, it now works smoothly with the nvidia-driver, and the intel-driver produces some annoying mouse glitches on the secondary and tertiary screen. The other solution suggested here did not work for me. Maybe they work for others.

Rolch2015
  • 428
  • 1
  • 5
  • 11
0

On Ubuntu 20.04, you have to do

sudo systemctl gdm restart

The screens will flash for about one minute and then everything will work.