Bug 376245

Summary: Mouse cursor changes size when pointer on Kwin window title bar
Product: [Plasma] kwin Reporter: kzhou97
Component: coreAssignee: David Edmundson <kde>
Status: RESOLVED DUPLICATE    
Severity: normal CC: asem.arafa, bugseforuns, eric.donkersloot, eric.lemoussu, heri+kde, humufr, jgrulich, kde, marcel.isolt, notuxius, russianneuromancer, sachzky, skierpage, tomdworzanski, whgentoo
Priority: NOR    
Version: 5.8.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: This is a panel of three pictures. The left one illustrates the small cursor on title bar, middle on the main window cursor size, the last illustrate where I can select cursor size

Description kzhou97 2017-02-09 15:56:48 UTC
Created attachment 103923 [details]
This is a panel of three pictures. The left one illustrates the small cursor on title bar, middle on the main window cursor size, the last illustrate where I can select cursor size

When the cursor is hovering on the kwin managed title bar, the cursor changes its size to 24. But when the cursor is on the rest of the screen, it is of size 48. The problem can be resolved by selecting a fixed size cursor, that is 48, instead of resolution dependent cursor.Although this workaround works for me, I suspect kwin is not being dpi aware and is merely scaling the window title bar which makes the cursor thinks it is on a lower resolution? I have attached three screenshots.By the way, I forced my font dpi to 182 in the System-settings-> font
Comment 1 Martin Flöser 2017-02-09 16:41:46 UTC
Please provide the output of:
qdbus org.kde.KWin /KWin supportInformation

Are you using High-DPI setup?
Comment 2 kzhou97 2017-02-09 17:08:03 UTC
(In reply to Martin Gräßlin from comment #1)
> Please provide the output of:
> qdbus org.kde.KWin /KWin supportInformation
> 
> Are you using High-DPI setup?

Yes, I am. The output is as follows:
KWin Support Information:
The following information should be used when requesting support on e.g. http://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like http://paste.kde.org instead of pasting into support threads.

==========================

Version
=======
KWin version: 5.8.5
Qt Version: 5.7.1
Qt compile version: 5.7.1
XCB compile version: 1.12

Operation Mode: X11 only

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_INPUT: yes
HAVE_DRM: yes
HAVE_GBM: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes

X11
===
Vendor: Fedora Project
Vendor Release: 11901000
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0

Decoration
==========
Plugin: org.kde.breeze
Theme: 
Blur: 0
onAllDesktopsAvailable: true
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 2
decorationButtonsRight: 3, 4, 5
borderSize: 3
gridUnit: 18
font: Noto Sans,10,-1,0,50,0,0,0,0,0
smallSpacing: 4
largeSpacing: 18

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
glSmoothScale: 2
colorCorrected: false
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: true
glStrictBindingFollowsDriver: true
glCoreProfile: false
glPreferBufferSwap: 101
glPlatformInterface: 1
windowsBlockCompositing: true

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 150
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  no
Number of Screens: 1

Screen 0:
---------
Name: eDP-1
Geometry: 0,0,2560x1440
Refresh Rate: 59.9991


Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) 
OpenGL version string: 3.0 Mesa 13.0.3
OpenGL platform interface: GLX
OpenGL shading language version string: 1.30
Driver: Intel
GPU class: Unknown
OpenGL version: 3.0
GLSL version: 1.30
Mesa version: 13.0.3
Linux kernel version: 4.9.7
Direct rendering: Requires strict binding: yes
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  no

Loaded Effects:
---------------
zoom
slidingpopups
kwin4_effect_login
kwin4_effect_windowaperture
kwin4_effect_fadedesktop
screenshot
minimizeanimation
kwin4_effect_translucency
desktopgrid
kwin4_effect_maximize
kwin4_effect_morphingpopups
kwin4_effect_fade
presentwindows
highlightwindow
kwin4_effect_dialogparent
blur
contrast
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------
blur
contrast

Effect Settings:
----------------
zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1

slidingpopups:
fadeInTime: 150
fadeOutTime: 250

kwin4_effect_login:

kwin4_effect_windowaperture:

kwin4_effect_fadedesktop:

screenshot:

minimizeanimation:

kwin4_effect_translucency:

desktopgrid:
zoomDuration: 300
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

kwin4_effect_maximize:

kwin4_effect_morphingpopups:

kwin4_effect_fade:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 150
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

highlightwindow:

kwin4_effect_dialogparent:

blur:
blurRadius: 12
cacheTexture: true

contrast:

startupfeedback:
type: 1

screenedge:

kscreen:
Comment 3 kzhou97 2017-02-09 17:11:55 UTC
Yes I am running HiDPi. The log is here: https://paste.kde.org/pli925sfw
Comment 4 kzhou97 2017-02-09 17:16:03 UTC
Sorry my last reply was a bit messy. Not sure if that comment can be deleted. I apologize.
Comment 5 kzhou97 2017-02-10 01:49:00 UTC
The issue seem to go away when I edit the SDDM config file, see https://wiki.archlinux.org/index.php/SDDM#DPI_settings

The mouse cursor default to 24 instead of 48 when HiDPI setting is edited in the config file instead of force font dpi in system setting. This is still not as expected because I have a HiDPI screen and one would expect to get a default size of 48. Anyway, just something to sort out.
Comment 6 Martin Flöser 2017-02-10 06:44:20 UTC
@David: as our High-DPI expert: any ideas?
Comment 7 Nikos Chantziaras 2017-03-20 01:09:14 UTC
I have the same issue. In System Settings, I have "Resolution dependent" selected for the cursor size, but KWin doesn't use it. In fact, it doesn't use it even if I specify a size manually. If I select "32", KWin still uses 24.

I'm using a 27" 2560x1440 monitor. X11 reports:

  $ xdpyinfo | grep -B 2 resolution
  screen #0:
    dimensions:    2560x1440 pixels (602x341 millimeters)
    resolution:    108x107 dots per inch

This is the output of "qdbus org.kde.KWin /KWin supportInformation":

https://paste.kde.org/p1o81y41e
Comment 8 asem.arafa 2017-07-29 13:34:04 UTC
I had the same issue on Arch Linux KDE 5.10.4  
I think the issue is that KDE config doesnt overwrite X config when setting the cursor theme  
a workaround is to manually create ~/.icons/default/index.theme and set the cursor theme like in KDE  

[icon theme] 
Inherits=breeze_cursors


i use HiDPI setup and use Scaling value 2 in KDE which set the KDE DPI to 192, X must have the same DPI so that the cursor size 48 is selected
Comment 9 Alexander Mentyu 2017-08-16 13:11:51 UTC
Confirming this bug on KDE neon developer unstable iso 20170813
Screen: 1366x768
Session: Wayland
Video card: Intel 4500MHD
Comment 10 Eric Donkersloot 2017-09-12 20:52:30 UTC
Same issue here:

Lenovo Thinkpad X1 Carbon (2560x1440)
DPI settings desktop: 168
SDDM settings: ServerArguments=-nolisten tcp -dpi 168
Plasma: 5.10.5
KDE Frameworks: 5.38.0
Arch Linux
Comment 11 Eric Donkersloot 2017-09-12 21:19:34 UTC
Output ofqdbus org.kde.KWin /KWin supportInformation

https://paste.kde.org/p9abxm9fw/7ptqql
Comment 12 Eric Donkersloot 2017-09-14 12:31:06 UTC
Is this a duplicate of bug #372451 ?
Comment 13 Martin Flöser 2017-09-14 15:20:06 UTC
(In reply to Eric Donkersloot from comment #12)
> Is this a duplicate of bug #372451 ?

no it would be the other way around. The bug is in kwin and not in systemsettings as that bug indicates.
Comment 14 Eric Donkersloot 2017-09-20 11:06:42 UTC
I tried both workarounds listed in this bug report:

1. Setting the cursor size to a fixed value (36)
2. Create ~/.icons/default/index.theme and set the cursor theme like in KDE

But they both have no effect. I've posted the output of "qdbus org.kde.KWin /KWin supportInformation" again here: https://paste.kde.org/pjoxuk9ej/w7hv2v
Comment 15 Christoph Feck 2017-09-27 19:22:43 UTC
*** Bug 372451 has been marked as a duplicate of this bug. ***
Comment 16 wazyk 2017-10-26 06:30:02 UTC
Same issue for me.
Here is my log for qdbus org.kde.KWin /KWin supportInformation : https://paste.kde.org/pcywygpcm

Is it a missing Wayland implementation in kwin issue or a pure Waland problem ?
Comment 17 Martin Flöser 2018-02-01 20:09:22 UTC
*** Bug 371384 has been marked as a duplicate of this bug. ***
Comment 18 wazyk 2018-02-09 06:31:53 UTC
Still the same on KDE Plasma 5.12 :(
Comment 19 David Edmundson 2018-02-17 22:50:51 UTC

*** This bug has been marked as a duplicate of bug 368723 ***
Comment 20 Marcel 2018-02-22 18:14:32 UTC
The mouse cursor normally worked fine on my laptop with a 4K screen. But I got the similar issue when I changed the theme. After that, the cursor size will be smaller when hovered on the title bar.

I found that if I delete all the theme related files in ~/.cache fold (likely these named with plasma-theme-***, maybe also the icon-cache.kcache file), then the cursor will act normally. I'm not sure if this is the solution for the other issues reported in this post.
Comment 21 Marcel 2018-02-24 15:21:43 UTC
I got this issue again, and solved it by deleting the ./cache/icon-cache.kcache file.