You are not logged in.
Hello. I have my laptop hooked up to two external monitors, and recently I decided to rotate one of them by 90°. This makes X think that the cursor needs to be 2-3 times its normal size in order to be visible. I am trying to correct this behaviour, but cannot seem to find a working solution.
This question has been already asked on this and other forums, and the suggested solutions seem to boil down to:
adding a configuration in `~/.config/gtk-3.0/settings.ini`:
I had to create an empty `settings.ini` file, also made it executable even thought I don't think it should be necessary.
I added the following lines:
[Settings]
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=32adding a configuration in `~/.Xresources`:
I have added the following line to the file:
Xcursor.size: 32I checked that the file was being loaded correctly by `xrdb`, and it looks like at some point during my installation/configuration of Arch `.xinitrc` has been autogenerated with the following:
userresources=$HOME/.Xresources
sysresources=/etc/X11/xinit/.Xresources
[...]
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
[...]Regardless of the actions that I take, the cursor behaves in exactly the same way. Here is a short video:
On top of most programs (e.g. Firefox, Alacritty) the cursor is always enlarged, while on top of the desktop (Qtile) and pure GTK programs (? I have tried pamac-manager & pulseeffects) the normal cursor has the correct size, and any other type (like ibeam, window-resize, hand) is scaled up. The cursor behaves normally if I don't use the rotated display.
Any idea on how to fix this? Appreciate the help.
Last edited by itsmeciao (2021-06-06 21:51:31)
Offline
The rotation likely screws the DPI calculation, let's see:
xrandr -q
xdpyinfo | grep resolutionOnline
Okay, this is going to sound incredibly stupid: it never occurred to me that I could have been using the wrong cursor size in my configuration files. Most forum posts regarding this issue were suggesting to set the cursor size to 32 or larger, so that is what i went with. I realized this just now, I still had the `.Xresources` file configured and when I went to disconnect the rotated monitor to get the different resolution in `xdpyinfo`, i noticed that even after rebooting the cursor wasn't going back to it's regular size.
Now I have set the manual size in `~/.Xresources` and in `~/.config/gtk-3.0/settings.ini` to 16, and it seems to work everywhere except in LightDM at the very start. I probably just need to call `xrdb` from its startup script (and maybe fix the systemwide .Xresources file with the new manual cursor size as well, instead of using the one that belongs to my user?), I will update after I have tried.
For reference, here is the info that you asked for.
Here the laptop is "docked", only the external monitors are active and one of them is rotated, as you can see with `xrandr -q`=
Screen 0: minimum 8 x 8, current 3000 x 1920, maximum 32767 x 32767
LVDS1 connected (normal left inverted right x axis y axis)
1920x1080 60.01 + 59.93 40.01
[...]
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+420 (normal left inverted right x axis y axis) 530mm x 300mm
1920x1080 60.00*+ 50.00 59.94
[...]
VGA1 connected 1080x1920+1920+0 right (normal left inverted right x axis y axis) 530mm x 300mm
1920x1080 60.00*+
[...]
VIRTUAL1 disconnected (normal left inverted right x axis y axis)`xdpyinfo | grep resolution` gives
resolution: 96x96 dots per inchWhen only the internal LVDS is active: `xrandr -q`=
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
LVDS1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
1920x1080 60.01*+ 59.93 40.01
[...]
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected primary (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)`xdpyinfo | grep resolution` gives:
resolution: 97x97 dots per inchThanks for the reply, sorry that I requested your attention for such a silly mistake ![]()
Offline
No problem.
The resolution is obviously not misdetected because of the rotated output.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Online
Indeed, I just had to create a new `.Xresources` file for root, I put it in `/etc/X11/xinit/`, then add a line to call `xrdb /etc/X11/xinit/.Xresources` in my display manager's startup script.
The only issue that I am facing now is that the cursor is changing theme depending on which application is is hovering on, even after I added a line `Xcursor.theme: Adwaita` in `.Xresources` to match the other configuration in `.config/gtk-3.0/settings.ini`. According to the Arch Wiki, I also need to create the path and file `~/.icons/default/index.theme`, and in the file add the following:
[icon theme]
Inherits=AdwaitaIf this doesn't work, the wiki also says to create a symlink from `~/.icons/default/cursors` to `.local/share/icons/cursor_theme_name/cursors`. I don't think that that path exists in my system, but I do have `/usr/share/icons/Adwaita/cursors`, so that's what I have tried to link to.
The cursor still has two different themes even after these changes, so I'll need to spend a little more time on it to figure this out. But if you do know what could help, I'd appreciate the tip ![]()
I'm otherwise marking the topic as solved, since I figured out a solution to the original issue.
Last edited by itsmeciao (2021-06-07 07:11:06)
Offline
The cursor still has two different themes even after these changes, so I'll need to spend a little more time on it to figure this out.
So, today I came back to the computer and therefore booted it up a second time since the last changes (the symlink mentioned in my last post), and now the Adwaita cursor theme seems to be applied everywere...
I don't know if this information is going to be useful to anyone in the future, but it's all I have, good luck.
Offline