Mouse cursor changes size in some GTK2 applications

Bug #1304067 reported by Ryan Reamsbottom on 2014-04-07
This bug affects 29 people
Affects Status Importance Assigned to Milestone
elementary OS
xfce4 (Ubuntu)

Bug Description

After installing and opening Firefox, when the cursor is over the browser window it is a smaller version of the default cursor.

I'm unable to capture this in a screenshot as it always captures the cursor as the same size regardless of how it looks on screen. Best way to see the issue is by hovering over the window decorations on the Firefox window and moving down to the tab bar, large cursor appears over window decorations is replaced by smaller cursor inside the actual Firefox window.

Small cursor appears over top of Firefox and Steam windows, but GIMP is unaffected. I originally thought it was an issue with gtk2, but since GIMP has the correct larger version of the cursor I'm no longer sure. GTK3 applications display the correct cursor.

A minor issue to be sure, but a matter of visual consistency.

Stephan Kristyn (nottinhill) wrote :

I also have this issue.

To be exact: The mouse pointer has become huge on the Desktop of ElementOS and the mouse pointer becomes the normal size when hovering any application.

I think ElementaryOS is based on GNOME3, so I cannot attest to the GTK 2 statement by Ryan.

(This is not just a cosmetic issue in my opinion, it's a deal breaker, sorry to say)

Stephan Kristyn (nottinhill) wrote :

Presumably this is Pantheons or Switchboard's fault and since I could repro your problem, this need further attention by the developers of ElementaryOS and probably Pantheon in particular.

For the time being, I devised this workaround:

Open a Terminal Window and type:

1) sudo update-alternatives --config x-cursor-theme
2) Select "6" for White
3) Go back to 1) but this time select "5"
4) sudo apt-get install dconf-tools
5) dconf-editor
6) Goto Org -> Gnome -> Desktop -> Interface, change whatever String there is in "cursor-theme" to "DMZ-Black".
7) make sure "curser-size" is set to "24".
8) Reboot

Your Mouse Cursor should be back to normal now.

Changed in elementaryos:
assignee: nobody → Stephan Kristyn (nottinhill)
assignee: Stephan Kristyn (nottinhill) → nobody
status: New → Confirmed
Stephan Kristyn (nottinhill) wrote :

Applying Workaround from 2014-05-08, however, after reboot the mouse cursor is back to being gigantic. Please fix this!

Stephan Kristyn (nottinhill) wrote :

Confirming the exact same Bug on Ubuntu 14.04.

Ivan Vrljić (vrlja92) wrote :

I have similar problem. In Chrome my pointer is different (see attachment). Tried to change cursor theme from tweaks, from dconf and with sudo update-alternatives --config x-cursor-theme nothing seems to work. Any idea?

Ivan Vrljić (vrlja92) wrote :

Sorry for spam. It seems that chrome uses default settings from /home/(user)/.icons/ so i edited default to use elementary theme.

Kevin de Bie (abramech) wrote :

I have the same problem.
My working resolution is 3840x2160. Using Nvidia GTX 960 (and nvidia drivers).
Funny thing: the mouse cursor also changes to normal in non-elementary native applications like Vivaldi and Libre Office (calc, writer, does not matter).

Kevin de Bie (abramech) wrote :

The workaround in #2 seems to be the cock for dolly here. Not sure how it will survives updates or changes in the future.

Daniel J Blueman (watchmaker) wrote :

I see this on ElementaryOS 0.4 release with updates as of 2017-01-15 and have been for a while.

In my case, my Dell XPS 13 9360 has a 13.3" 3200x1800, so high-dpi resizing works fine on everything including all cursors in all apps.

When plugging in an external monitor, it removes the high-dpi resizing on everything except the mouse pointer in certain apps, eg gedit.

Thomas W. (nexus86) wrote :

I have the same problem on two maschines. Every machine has an nvidia gfx card with current drivers and resolution of 2560x1440.

Gofer83 (goferto) wrote :

Same bug on my machine.

System: Host: krzemowarakieta Kernel: 4.4.0-66-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Gnome (Gtk 3.18.9-1ubuntu3.2) Distro: elementary 0.4 loki
Machine: Mobo: ASUSTeK model: Z170-DELUXE v: Rev 1.xx Bios: American Megatrends v: 1902 date: 06/27/2016
CPU: Quad core Intel Core i7-6700K (-HT-MCP-) cache: 8192 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 32066
           clock speeds: max: 4300 MHz 1: 800 MHz 2: 800 MHz 3: 800 MHz 4: 800 MHz 5: 800 MHz 6: 3820 MHz
           7: 800 MHz 8: 932 MHz
Graphics: Card: NVIDIA Device 1b80 bus-ID: 01:00.0
           Display Server: X.Org 1.18.4 drivers: nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce GTX 1080/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 367.57 Direct Rendering: Yes
Audio: Card-1 NVIDIA Device 10f0 driver: snd_hda_intel bus-ID: 01:00.1 Sound: ALSA v: k4.4.0-66-generic
           Card-2 Intel Sunrise Point-H HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
Network: Card-1: Intel Ethernet Connection (2) I219-V driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6
           IF: enp0s31f6 state: up speed: 100 Mbps duplex: full mac: <filter>
           Card-2: Broadcom BCM4360 802.11ac Wireless Network Adapter driver: wl bus-ID: 07:00.0
           IF: wlp7s0 state: down mac: <filter>
           Card-3: Intel I211 Gigabit Network Connection driver: igb v: 5.3.0-k port: c000 bus-ID: 0b:00.0
           IF: enp11s0 state: down mac: <filter>
Drives: HDD Total Size: 2520.5GB (0.6% used) ID-1: /dev/sda model: Samsung_SSD_850 size: 256.1GB temp: 0C
           ID-2: /dev/sdb model: Samsung_SSD_850 size: 1024.2GB temp: 0C
           ID-3: /dev/sdc model: WDC_WD1002FAEX size: 1000.2GB temp: 31C
           ID-4: /dev/sdd model: KINGSTON_SH100S3 size: 120.0GB temp: 26C
           ID-5: /dev/sde model: KINGSTON_SV300S3 size: 120.0GB temp: 26C
Partition: ID-1: / size: 110G used: 14G (14%) fs: ext4 dev: /dev/sde1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 29.8C mobo: 27.8C gpu: 0.0:53C
           Fan Speeds (in rpm): cpu: 0
Info: Processes: 259 Uptime: 22 min Memory: 1752.1/32090.4MB Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.461) inxi: 2.2.35

Michael (randomrarehunter) wrote :

May have found a possible fix you guys can try. I had a similar problem on Deepin OS, where the mouse cursor changed size depending on what application you hovered over, and sometimes it would just be big no matter what. First make sure that your cursor is set using the --config x-cursor-theme method above, then

Edit "/etc/X11/Xresources/x11-common" with nano and add "Xcursor.size: 24". Or add whatever size you want instead of 24. Then reboot. This MAY fix the problem if you're willing to give it a try. I can't test it as I'm running a Ryzen system and it doesn't play nice with older kernels.

Hope this helps! Good luck!

Alex Chen (alx901) wrote :

Thanks Michael, but your solution not work for me. :-(

Rachel (homulilly) wrote :

This solution from mousezero in worked for me. You can also install/use a different cursor theme as long as you change it in both places. The problem seems specific to the Elementary cursor theme rather than a larger problem with the desktop environment.

1. In a terminal type
  sudo update-alternatives --config x-cursor-theme
2. Select the number for
3. install "dconf Editor"
  sudo apt-get update
  sudo apt-get install dconf-editor
4. in the editor go to
  org -> gnome -> desktop -> interface
5. change the entries for
cursor-size = 24
cursor-theme = Adwaita
6. restart your computer

Starbeamrainbowlabs (sbrl) wrote :

Also affects xfce4 on Arch (/Artix Linux).

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4 (Ubuntu):
status: New → Confirmed

When I startup Xubuntu 18.04 beta on my 4K TV (connected by HDMI) the cursor is much too big. The system will boot into Full HD resolution and not 4K. If I then go to the Xfce Mouse settings under the tab "mouse themes" to change the cursor size I only need to change the size of the cursor 1 pixel up and down and everything is fine again and the cursor has again the correct size. In my case I change the cursor size from 24 to 25 and then back to 24.

I just installed a fresh copy of Xubuntu 18.04 on a new system with a 4k screen, and I am having the same issue.

When I boot and login the mouse is huge when on the desktop, but changes sizes when hovering over certain applications. As was mentioned by Manuel, if I change the cursor size setting or simply change the cursor theme from "Default" to "DMZ (Black)" and then back to "Default", the problem disappears.
 The size is normal and constant no matter what application I hover over.

I found this older post from someone who was using Xubuntu 14.04 a few years ago, and I believe it to be the same bug. The images and behavior accurately describe what we are seeing in 18.04.

I'm also wondering if the issue is somehow related to this bug:

In that instance I see no mention of size changes, but they similarly have changes in the applied cursor theme based on whether the mouse is hovering over the desktop or other applications.

Marcus H (marcvs) wrote :

For me this is reproducably happening, when I extend the "y" direction of my screens, and thereon only for new windows. I.e.:
- using only my notebook screen (1920/1080) => cursor fine
- using two external screens (2*1920/1080) => cursor fine
- using two external screens, one of them tilted (1920x1080 + 1080x1920) => cursor slightly larger on new windows
- using tow external, one of them tilted, plus notebook below (1920x1080 + 1080x1920 + 1920x1080 yielding 3000 x 2160) gives me huge mouse pointers.

Is it possible, that some automatism mistakenly sets the cursor size as part of the total screen dimension?

The Xfce related report is bug 1770948.

Also, there is bug 157447 which addresses mouse cursor inconsistencies unrelated to the screen resolution.

Changed in xfce4 (Ubuntu):
status: Confirmed → Invalid
Changed in xfce4-settings:
importance: Unknown → Medium
status: Unknown → Confirmed
Doaa (doaa.altarawy) wrote :

I have the same problem on a fresh install of Ubuntu 18.04 when connected to an external 4k DELL monitor. Changing cursor-size in dconf-editor is not reflected in browsers and some other apps (PyCharm, slack, drawing apps, .. ), the pointer is tiny.

Stephan Kristyn (nottinhill) wrote :

Confirmed on XFCE4 on Manjaro Linux (4.14.74-1-MANJARO). Have small Mouse cursor if hovered over Firefox, but big mouse cursor on desktop. Using HiDPI xfce theme.

Stephan Kristyn (nottinhill) wrote :

Solved this by simply going into XFCE Mouse Settings under the Main Configurations Panel and changed the Mouse Pixel Size to some value. This seems to set things right for all apps.

Need to find out what files the xfce settings panel is changing. Then we could probably fix this once and for all.

I have been having this problem for like a year now. I have a 4K screen on my laptop but resolution is usually 1920x1080 or 1600x900. Anytime I'm not using the 4K resolution, on boot up my cursor size is huge. To fix it all I have to do is what's said above, change cursor size up 1 and back down 1 (what it was set at) and it'll reset to what it's supposed to be. It's getting annoying for like a whole year everytime I boot the computer up I have to go into mouse settings and fix it.

The cursor size is internally set to 0 (default size). Changing the size via the mouse settings will set it explicitly to the chosen value.

Related GTK3 issue:

Stanislav Petrov (slavpetroff) wrote :

Hello guys! I was having the same issue each time i freshly install ElementaryOS 5.0 Juno.
Tried all the suggests for edit of gconf and settings but nothing have helped me at all.
The only thing that i can reproduce and fix the issue always is:

1) `sudo add-apt-repository ppa:noobslab/macbuntu`
2) `sudo apt-get install macbuntu-os-ithemes-v1804` ( for you the version could be different, just install one that shows up when you tab on `sudo apt-get install macbuntu-os-ithemes` )
3) `sudo apt-get install macbuntu-os-icons-v1804` ( do the same as above with the tab to select the version which is up )
4) Open Elementary Tweaks and select a random theme from `macbuntu` ones, for `GTK+`, `cursor` and `icons`.
5) Reboot
6) Enjoy ( and now you can set the themes whatever you like )

Josh Gale (thejvguru) wrote :

#26 solution is the only one that worked for me.

NUC7i7BNH on Juno (Ubuntu 18.04.2 LTS)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.