20

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).

10 Answers 10

10

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.

  • 2
    This worked for me (using NVIDIA 390.30 driver). Simply rebooting does not help, the lightdm restart is needed. – BourbonCreams Jun 5 '18 at 10:57
  • 2
    18.04 has no lightdm though. – Velkan Jul 23 '18 at 8:43
  • no, it can not work in ubuntu 18.04. I use linux mint19 now, can not restart lightdm service any more – leileilei Oct 12 '18 at 19:17
  • Please read this link:forums.linuxmint.com/viewtopic.php?f=59&t=278666 – leileilei Oct 21 '18 at 13:40
  • 3
    This is mental, so now I'll need to reset lightdm on each boot :O – Jamie Hutber Jan 7 at 11:16
2

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.

  • With 18.04 can't logout/login. It either restarts or goes into login screen loop. – Velkan Jul 23 '18 at 8:45
  • I don't know if the logout/login did the trick or that I applied a new refresh rater, restored the original rate and then performed a logout/login, but it did the trick. – TylersSN Mar 27 at 14:31
2

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)

  • 2
    I am running Ubuntu 17.04 with the standard display manager lightdm. When I try to restart the sddm service, it states that there is no such service. Restarting lightdm does not help either. – Rolch2015 Sep 8 '17 at 11:09
  • try to reinstall xserver-xorg* packages, restarting sddm is anyway not a permanent solution. I had to reinstall xorg packages in order to make it work with nvidia card – user1320115 Sep 8 '17 at 15:25
  • 2
    Please edit the answer to include the relevant bits. Links tends to go away with time, rendering such answers useless. – Hi-Angel Sep 8 '17 at 18:21
  • Unfortunately, it's not an option when I have two user accounts running simultaneously and the square appears every time I launch the second session. – int_ua Nov 23 '17 at 16:01
2

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" ]'
  • 1
    Hi Tom! I think your answer may be good to fix this annoying issue, but I'm not sure what to change, nor I find these lines in the files you mention. Could you check the answer is correct? And could you elaborate on what are the changes doing? Thanks! Edit: I managed to fix it I believe. Mainly problem is the files are swapped (first line is from the second file), and the second line has a "to to `Before=display-manager.service" which shouldn't be there I believe. – cgc512 Jul 8 at 18:30
  • Yes I did mix up the lines. Fixed answer thanks. – Tom Berghuis Jul 9 at 10:35
  • 1
    Perfect, it worked perfect for me, thank you very much for finding this! – cgc512 Jul 9 at 13:54
2

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.

  • In the second last command, by lightm3, do you mean gdm3 or lightdm? – Kulfy Oct 11 at 20:01
  • sorry, it was a typo – Yang Zhou Oct 12 at 21:05
1

Solutions working for me are :

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

display properties window

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).

1

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 :)

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.

  • OP said they wanted to keep the Nvidia drivers. – dsstorefile1 Mar 3 '18 at 4:18
0

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.