New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 475718 link

Starred by 9 users

Issue metadata

Status: Fixed
Closed: Feb 2017
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocked on:
issue 360334

Sign in to add a comment

The coordinates send to input method on Hi-DPI Linux environment are not scaled

Reported by, Apr 9 2015

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.10 Safari/537.36

Steps to reproduce the problem:
1. Use input method under linux
2. Type anything that will trigger a input method window

What is the expected behavior?
The popup input method window is shown at the cursor's position.

What went wrong?
After some simple test, seems the coordinates send to input method is not scaled together with DPI, on my (single) screen setup with 228 DPI, the popup input method window's X and Y coordinates are always about half of the correct value.

Did this work before? N/A 

Chrome version: 43.0.2357.10  Channel: dev
OS Version: 3.19
Flash Version: Shockwave Flash 17.0 r0
Labels: Needs-Feedback
wengxt@ - Could you please provide the screen cast for this issue including any sample file or URL if there, So that we can check the issue from our end and will help you further.

Comment 2 by, Apr 12 2015

Because any page can reproduce this bug, I just randomly picked one.

As you can see, when I type in the input box, the input box should appear at the cursor's position.

I also tried to change the cursor's position in the video, and you can see the popup window moved about half of the cursor movemoent (probably because scale factor is 2).
2.9 MB Download

Comment 3 by, Apr 13 2015

Labels: Cr-UI-Input-Text-IME

Comment 4 by, Nov 4 2015

wengxt@: Could you please confirm if this is still an issue on the latest stable(46.0.2490.80) as well. If yes, please let us know the User configuration set under 'Input method configuration' dialog.

CC-ing more folks who would be interested in.
Oops, fixed a typo in the address.

Comment 7 by, Nov 7 2015

The problem still exists.

But where's the 'Input method configuration' dialog?
@wengxt: Could you please check the attached video for the 'Input Method Configuration' and update us your settings.

Thank you.
2.9 MB Download

Comment 9 by, Jan 14 2016

That's only for debian/ubuntu and it's only used for setting input method environment variables and I don't use ubuntu.

I develop and use fcitx, BTW.
Please check if the coordinates passed to gtk_im_context_set_cursor_location it is scaled with dpi.
Status: Assigned
Looks like the  issue 360334  is related to this. I can do the investigation.

wengxt@, is it possible for you to try the latest Chrome code on Linux?

In M49, there is a flag --enable-use-zoom-for-dsf.
I'm wondering whether this issue can still repro with the flag enabled.

Btw, how to change the DPI setting on Ubuntu?

Comment 12 by, Jan 14 2016


Just tested, it doesn't change anything on this issue.

I don't know about ubuntu, but theoratically using xrdb change value of Xft.dpi and use xrandr --dpi would work.

Comment 13 by, Aug 14 2016

This still affects Chrome 54.0.2824.0 dev (tested on Ubuntu 16.04) and makes Chrome+Linux+hidpi not very useful for entering Japanese or Chinese text.
Hi guys

I faced the same issue on Chrome 54.0.2837.0 dev (tested on Arch Linux) with uim-mozc and fcitx-mozc.
The DPI is configured 144 and my display resolution is WQHD(2560x1440)
 Issue 616124  has been merged into this issue.
Same Issue with chrome 55.0.2883.75 on manjaro linux with fcitx-sogoupinyin.
A 3200x1800 display with DPI=200
Blockedon: 360334
I haven't correctly set/changed my Goobuntu screen DPI, which has been blocking the fix for this issue. Can anyone help? Thanks.

$ xdpyinfo | grep -B2 dots
screen #0:
  dimensions:    1920x1200 pixels (338x211 millimeters)
  resolution:    96x96 dots per inch

$ xrandr --dpi 48
<now the screen flashed once, but the dpi/fonts seemed no change. However, the xdpyinfo reported 48x48 dots per inch>.

$ xrandr --dpi 192
$ echo 'Xft.dpi: 192' | xrdb -override

This doesn't seem to affect already-open windows, so please start new programs to see the effect.

Not sure if something in Ubuntu may change it back silently.
Thanks for your instructions. But it doesn't work for me. :-(

Comment 23 by, Dec 20 2016

I don't think you have to change DPI to see this bug in action; you can just start Chrome with --force-device-scale-factor=1.5 for example.

The place to change your DPI settings will depend on the desktop environment.  In XFCE4, it's xfce4-settings-manager -> Appearance -> Fonts -> DPI -> Custom DPI setting

In GNOME 3, it might be gnome-tweak-tool -> Windows -> HiDPI -> Window scaling -> 2
Status: Started (was: Assigned)
Thanks ivan@, --force-device-scale-factor=1.5 works perfectly for me.

I'm now working on the fix.

Project Member

Comment 25 by, Feb 22 2017

The following revision refers to this bug:

commit da4307a16fe8c0bbecc8158e21ffef8190e23623
Author: shuchen <>
Date: Wed Feb 22 10:38:44 2017

Use the physical-pixel space for native IME on linux platform.

What's more, this cl makes a clear spec for the coordinates system in

BUG= 475718 , 360334 

Cr-Commit-Position: refs/heads/master@{#451980}


Status: Fixed (was: Started)

Sign in to add a comment