4

A square area around my mouse pointer is being rendered incorrectly. Instead of rendering the window it is supposed to render, it seems to be rendering the window underneath instead.

It is very clear in this screenshot, which omits the mouse pointer itself, but in which you can see part of my gray desktop background “through” the all-white Konsole window:

konsole window with midding blog

If I log out and then log in again, without rebooting, the problem goes away.

Here are a couple more screenshots, cropped to the areas of interest: Here the pointer is hovering over the Firefox tab with the blue “J”; the black popup is the tool tip for the tab, part of it is missing and you can see the main Firefox window instead:

enter image description here

Here the pointer is hovering over the Firefox “try again” button, but X has rendered a bit from the Spectacle window that is underneath Firefox:

enter image description here

My X server is:

X.Org X Server 1.19.3 Release Date: 2017-03-15 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.4.0-87-generic x86_64 Ubuntu Current Operating System: Linux avocet 4.10.0-33-generic #37~16.04.1-Ubuntu SMP Fri Aug 11 14:07:24 UTC 2017 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.10.0-33-generic root=UUID=19f82f72-a807-4624-a7aa-8297febd0f5a ro quiet splash vt.handoff=7 Build Date: 25 July 2017 01:30:08PM xorg-server 2:1.19.3-1ubuntu1~16.04.2 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.33.6

The OS is: Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial

The window system is KDE. The hardware is a Lenovo Thinkpad T460p laptop.

I'm not sure which parts of the system configuration are relevant. Here's the compositor configuration:

enter image description here

Here's part of the output of lshw that seems relevant:

    *-pci:1
         description: PCI bridge
         product: Sky Lake PCIe Controller (x4)
         vendor: Intel Corporation
         physical id: 1.2
         bus info: pci@0000:00:01.2
         version: 07
         width: 32 bits
         clock: 33MHz
         capabilities: pci pm msi pciexpress normal_decode bus_master cap_list
         configuration: driver=pcieport
         resources: irq:121 ioport:d000(size=4096) memory:f1000000-f1ffffff ioport:c0000000(size=301989888)
       *-display
            description: 3D controller
            product: GM108M [GeForce 940MX]
            vendor: NVIDIA Corporation
            physical id: 0
            bus info: pci@0000:02:00.0
            version: a2
            width: 64 bits
            clock: 33MHz
            capabilities: pm msi pciexpress bus_master cap_list
            configuration: driver=nvidia latency=0
            resources: irq:130 memory:f1000000-f1ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:d000(size=128)
    *-display
         description: VGA compatible controller
         product: Intel Corporation
         vendor: Intel Corporation
         physical id: 2
         bus info: pci@0000:00:02.0
         version: 06
         width: 64 bits
         clock: 33MHz
         capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
         configuration: driver=i915 latency=0
         resources: irq:126 memory:f0000000-f0ffffff memory:e0000000-efffffff ioport:e000(size=64) memory:c0000-dffff

How should I proceed in trying to diagnose and fix this?

If I should be reporting a bug, then to whom should I report it, and how?

[ Added 2017-SEP-18: This appears to be a bug, described here. Restarting sddm with sudo systemctl restart sddm works around the problem. ]

9
  • Are you using the Intel or the Nvidia card for display? Have you tried switching between software and hardware cursor rendering using xorg.conf?
    – dirkt
    Sep 17 '17 at 13:11
  • @dirkt I think I'm using the Nvidia card for display; the ServerLayout of my xorg.conf file has Screen 0 "nvidia" and Inactive "intel", and Xorg.0.log contains messages that appear to come from the NVIDIA driver. I tried adding Option "SWCursor" "on" and then also Optoin "HWCursor" "off" to the Screen "nvidia" section of my xorg.conf file, with no obvious effect. The Xorg.0.log file indicates that the options are being read and recognized. Sep 18 '17 at 19:00
  • 2
    Seems relevant: askubuntu.com/questions/947375/… . The workaround suggested there works for me: run sudo systemctl restart sddm from a console fixes the problem. Sep 18 '17 at 19:25
  • Mark Dominus: Turn that into an answer and accept it?
    – dirkt
    Sep 19 '17 at 5:53
  • @dirkt I still don't understand which component is at fault, or why restarting sddm fixes it. Sep 19 '17 at 13:52
2

I found comment on bug report and it helped me (KDE NEON + nvidia driver)

Crippling your system (switching to xrender and much slower nouveau driver) is not a solution.
What works for me flawlessly for more than a week on KDE Neon:
In file:
/lib/systemd/system/sddm.service
Add:
ExecStartPre=/bin/sleep 10
After [Service]
The problem apparently is that something SDDM needs is not initialized before is starts, so delaying SDDM by 10 sec is adequate workaround. Perhaps it could be less, but it doesn't bother me as long as I don't have to log out/log in manually.

1
  • 1
    Thanks very much. I haven't noticed any problems with the nouveau driver, and I'm not going to mess around with a working X configuration unless I have to. But if I encounter the same problem on a different system I'll try this simple solution first. Sep 12 '18 at 17:27
1

This issue is reported on Launchpad: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-384/+bug/1684240

If you have an account there, mark it as affecting you too and subscribe for notifications to get updates. More people marking it as affecting them increases chances for a quicker fix.

1

I just recently struggled with this weird cursor box shadow issue myself on a new (to me) Dell XPS laptop that I was installing Fedora 30 on (though this problem is clearly not specific to Fedora - plenty of reports on Ubuntu and a few others as well). The laptop has both the NVidia GeForce GTX 1050 and an Intel 915 controller.

I now believe the problem is directly related to the fact there are TWO video controllers, perhaps fighting each other somehow. The BIOS on this particular laptop has no control over the video controllers so I can't just disable the Intel.

Also, on this system, the nouveau driver completely hangs (the X server starts and hard locks - though in hindsight, perhaps it's the same issue). Anyway, "switching to the nouveau driver" just was not an option due to the hard hang!

So, after a day full of experimenting with the Nvidia drivers (installing, uninstalling, building from Nvidia direct, uninstalling, reinstalling from RPM Fusion, etc, etc - UGH!), I finally found the magic incantation that made everything work without the super annoying cursor box!

The solution is definitely not intuitive! And, as with all things like this, YMMV (or more likely it's "Your Mileage WILL Vary")!

Basically, you need to control the video controller through kernel boot parameters. Here's what worked:

(First, if you are using the nouveau driver - GOOD LUCK, and STOP reading here)

1) Make sure the xorg-x11-drv-nouveau driver is not on your system - uninstall/remove it.

2) Make sure the nouveau kernel module is not going to get loaded by creating a blacklist modprobe file (even though you removed the X driver, the kernel still has a driver module shipped with it). Put the following lines in a file called /etc/modprobe.d/blacklist-nouveau.conf:

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

3) Then make extra sure the nouveau driver is not going to sneak in at boot time by adding the following to your kernel boot parameters: rd.driver.blacklist=nouveau modprobe.blacklist=nouveau. If you run grub, then the quickest thing to do is modify /etc/default/grub and add those parameters to the GRUB_CMDLINE_LINUX variable and re-run grub2-mkconfig. Note: if you install the RPM Fusion nvidia drivers, it will also add these lines as well.

Okay, with the nouveau driver good and disabled, you now just have to configure to choose between the i915 driver and the nvidia drivers...

If you haven't already, get and install the Nvidia drivers (however you want - I ended up just using the RPM Fusion drivers).

After installing the Nvidia drivers, you might notice that the kernel boot parameters get modified to include "nvidia-drm.modeset=1", basically telling the kernel to use the Nvidia driver for it's video output - makes sense, right? THIS IS THE PROBLEM.

--> At this point, change those boot parameters to nvidia-drm.modeset=0 and add i915.modeset=1.

This seems VERY counter-intuitive since you want to USE the Nvidia controller. However, what may be happening is a conflict when X starts up. I accidentally discovered this configuration while starting to uninstall the Nvidia drivers for the 4th time. I had rebooted with the i915.modeset=1 and was removing the drivers when I saw the X server was still running against the Nvidia driver and my cursor was fine. I then finished uninstalling, rebooting back to Intel, then installing and breaking it again. It was then that I realized that perhaps the kernel modeset's needed to be backwards.

Anyway, once you've booted into this configuration, the X server will start and it should automatically detect the Nvidia card and use it. If that doesn't automatically happen, then you may need to make an X11 configuration that configures the Nvidia controller (you can try the nvidia-xconfig tool if you need to - which I did at one point in this whole nightmare, but in the end I did not need even need that configuration).

To finish, perhaps run a glmark2 benchmark to test that your performance looks correct (it will also show the GPU being used).

3
  • Thanks for this detailed and helpful reply. If the problem recurs I will certainly try your suggestions. Aug 28 '19 at 5:48
  • this didn't work for me :( Still struggling.
    – gdlin
    Feb 14 '20 at 20:24
  • My laptop has only one video card and this issue happens as well (I didn't read your whole answer) Sep 2 '20 at 19:24
0

Switching from the NVidia driver to the Nouveau driver solved the problem. The Nouveau driver does indeed support rotated monitors.

Doing the switch was a little fussy, because the NVidia driver blacklists certain kernel modules that are needed by Nouveau. I think I followed directions at https://wiki.archlinux.org/index.php/nouveau#Keep_NVIDIA_driver_installed or something similar.

0

I had almost the same problem, but it was caused by a bug with the zoom feature. When I deactivated it, it went away. (running Pop OS which is Debian/Ubuntu-based)

Link to the bugreport

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.