Mouse cursor changes size in some GTK2 applications

Bug #1304067 reported by Ryan Reamsbottom
116
This bug affects 32 people
Affects Status Importance Assigned to Milestone
Xfce4 Settings
Confirmed
Medium
elementary OS
Confirmed
Undecided
Unassigned
xfce4-settings (Ubuntu)
Confirmed
Undecided
Unassigned

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.

Revision history for this message
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)

Revision history for this message
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
Revision history for this message
Stephan Kristyn (nottinhill) wrote :

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

Revision history for this message
Stephan Kristyn (nottinhill) wrote :

Confirming the exact same Bug on Ubuntu 14.04.

Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
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).

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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!

Revision history for this message
Alex Chen (alx901) wrote :

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

Revision history for this message
Rachel (homulilly) wrote :

This solution from mousezero in https://bugs.launchpad.net/elementaryos/+bug/1622060 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
  /usr/share/icons/Adwaita/cursor.theme
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

Revision history for this message
Starbeamrainbowlabs (sbrl) wrote :

Also affects xfce4 on Arch (/Artix Linux).

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xfce4 (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Manuel Grießmayr (dccoder84) wrote :

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.

Revision history for this message
In , spike speigel (frail-knight) wrote :

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.

https://superuser.com/questions/768830/mouse-cursor-scaling-issues-in-xubuntu-14-04-with-xfce-4-10

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

https://bugzilla.xfce.org/show_bug.cgi?id=7415

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.

Revision history for this message
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?

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

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
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
In , Jamesdarrellwatson (jamesdarrellwatson) wrote :

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.

Revision history for this message
In , Theo Linkspfeifer (lastonestanding) wrote :

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: https://gitlab.gnome.org/GNOME/gtk/issues/1371

Revision history for this message
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 )

Revision history for this message
Josh Gale (thejvguru) wrote :

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

NUC7i7BNH on Juno (Ubuntu 18.04.2 LTS)

Revision history for this message
Adrian Carpenter (adriatic-c) wrote :

When your cursor is one size while hovering over the desktop, and another size while hovering over an application window, it's likely because the setting (Xcursor.size, an X resource) was set after your desktop environment was launched, like by a startup script or settings daemon. So some of the DE's windows (like panels or the desktop itself) will use the default cursor size setting which existed when they launched. A solution is to set Xcursor.size in a location which loads earlier than your DE settings daemon. An obvious place for this is ~/.Xresources.

Revision history for this message
Jake Vincent (jakewv) wrote :

Also experiencing this odd bug on a Dell XPS 13 9350 with an external monitor. My built-in display is 1920x1080, but my external monitor is a 4K 27" display (3840x2160). When I am experiencing the issue, the mouse pointer is just abnormally huge on both screens, *unless* the pointer is in a particular app, like Firefox.

The solution for me is not to power on the computer with the external display connected. If I power on the computer, get to the log in screen, and attach the external display at this point, then when I log in, everything is normal--I have a pointer that is an acceptable size, and it stays the same size no matter which monitor it's on or which app it's in. I haven't figured out what happens yet if I attach the external display after logging in.

Revision history for this message
Addison G (addisong) wrote :

This is still an issue on Ubuntu 18.04, 19.10 and 20.04.

4K monitor, GTX1070, Nvidia drivers 440.64.

Cursor is absolutely tiny on the desktop, but the cursor will grow when holding down click on the desktop. Cursor is normal size in other windows, such as Firefox, but still tiny when hovering on their menu-bar.

Super annoying that 4K isn't fully supported by any operating systems.

Changed in xfce4 (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Valentin Lab (vaab) wrote :

Same here, still an issue on 20.04 . Using 4k external display on laptop. Cursos become huge on some app (gnome settings) or even in different element of an app (for instance some bookmark toolbar folders and not other, some after click, size toggles on click) and this happens on both screens. No problem when running Unity 7.

Revision history for this message
Guy Stalnaker (gstalnaker) wrote (last edit ):

Confirm same issues with Kubuntu 20.04 (fully patched). Affects multiple applications inc. Konsole, Chromium, Firefox. Also confirm that following some of the suggestions in this archlinux HowTo *FIXED* the issues I was experiencing. NOTE that one does NOT have to reboot for these changes to take affect, simply logout and log back in (XWindows is not loaded before one boots, so changes to the X system configs requite logout/login).

I modifed .Xresources, .xinitrc, .local/, and .icons

Now the cursors are as I expect them to be.

https://bbs.archlinux.org/viewtopic.php?id=271672

Sean Davis (bluesabre)
affects: xfce4 (Ubuntu) → xfce4-settings (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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