Blur Busters Forums

Who you gonna call? The Blur Busters! For Everything Better Than 60Hz™ Skip to content

[Fixed] BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Adjusting BENQ Blur Reduction and DyAc (Dynamic Acceleration) including Blur Busters Strobe Utility. Supports most BenQ/Zowie Z-Series monitors (XL2411, XL2420, XL2720, XL2735, XL2540, XL2546)

[Fixed] BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby fred » 17 Jan 2018, 04:54

I have tried to seek help on the Linux Gaming reddit but to no avail. I am hoping to perhaps find GNU/Linux users with 240 Hz monitors on here.

I recently obtained this monitor and running it on Debian via an AMD R9 Fury.

When I try to set the monitor at 1920 x 1080 @ 240 Hz it will show distortion on the right side of the screen.

This does not happen on Windows. I have tested this on Debian stable, Debian testing, Solus and Ubuntu 17.10, with all expressing the same result.

A picture and video of the problem can be found here in a bug ticket I have opened:
https://bugs.freedesktop.org/show_bug.cgi?id=104655

Any other users tried running 240 Hz on any graphics card and monitor combination here with GNU/Linux? And if so, what was the result?
fred
 
Posts: 5
Joined: 17 Jan 2018, 04:47

Re: BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby Chief Blur Buster » 17 Jan 2018, 15:15

Generally, you need to configure your Linux modeline to use exactly the same numbers displayed in ToastyX CRU.

1. Boot in Windows mode
2. Load ToastyX CRU
3. Write down all numbers
(Front Porch/Active/Back Porch/Sync/Total) for both (Horizontal/Vertical). And just in case, also write down the Horizontal Scan Rate, Vertical Refresh Rate, and Dotclock (Pixel Clock) too.
4. Reboot to Linux
5. Punch in the same numbers into a modeline for your X Window manager or other graphics manager. You'll have to do some math
6. Ideally, you've fixed your distortion.

The XFree86 modeline format is on Wikipedia.

The format of converting Windows ToastyX into compatible Linux modelines (originally XFree86, now used by most Linux graphics):

Code: Select all
Modeline "1920x1080"  [Dotclock in Mhz = Pixel Clock divided by 1000000] [Vert Active] [SUM(Vert Active+Vert Front Porch)] [SUM(Vert Active+Vert Front Porch+Vert Sync)] [Vert Total] [Horiz Active] [SUM(Horiz Active+Horiz Front Porch)] [SUM(Horiz Active+Horiz Front Porch+Horiz Sync)] [Horiz Total]


Brackets represent one number each (with brackets omitted). A typical 1600x1200 60Hz mode looks like these numbers:

Code: Select all
Modeline "1600x1200"  155  1600 1656 1776 2048 1200 1202 1205 1263


Use a Windows Custom Resolution Utility (CRU) app such as ToastyX or NVIDIA Custom Resolution to port a Windows mode to Linux.
155 = "Pixel Clock" in Mhz from CRU (e.g. 155000000 dotclock rate = 155 MHz) (decimals may be allowed. Otherwise, roundoff)
1600 = "Horizontal Active" from CRU
1656 = "Horizontal Active" plus "Horizontal Front Porch" from CRU
1776 = "Horizontal Active" plus "Horizontal Front Porch" plus "Horizontal Sync" from CRU
2048 = "Horizontal Total" from CRU
1200 = "Vertical Active" from CRU
1202 = "Vertical Active" plus "Vertical Front Porch" from CRU
1205 = "Vertical Active" plus "Vertical Front Porch" plus "Vertical Sync" from CRU
1263 = "Vertical Total" from CRU
Credit: BlurBusters.com

Different graphics managers (e.g. Linux console versus XFree86) often piggybacks off the same old-fashioned XFree86 modeline formats which are easy to compute from equivalent Custom Resolution Utility software such as ToastyX, using the above formulas I've written.

If you don't have a Windows PC, borrow one. Or ask someone over the Internet to send you a screenshot of their Custom Resolution screen for their 240Hz mode. Remember to credit BlurBusters.com for instructions on converting ToastyX to Linux modelines. No flags needed for DisplayPort modes (e.g. +hsync is not needed).

There are also Custom Resolution Utility (CRU)-like GUI's such as xrandr, which your window manager might have installed. Instructions will vary, but all of them saves configuration files that uses the same old-fashioned Linux modelines that I have edited since circa year 1993. And I still remember Entech Taiwan's PowerStrip CRU in the days long before AMD/NVIDIA/ToastyX provided similar Custom Resolution Utilities.

P.S. Please credit Blur Busters for this info! Thanks :)
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors
User avatar
Chief Blur Buster
Site Admin
 
Posts: 5078
Joined: 05 Dec 2013, 15:44

Re: BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby RealNC » 17 Jan 2018, 17:37

Modes are read directly from the EDID. To see the current mode, run the "xrandr" command-line utility. It will output something like:

Code: Select all
$ xrandr
Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
   2560x1440     59.95 + 144.00   120.00*   99.95    84.98    23.97 
   1024x768      60.00 
   800x600       60.32 
   640x480       59.94


You can also add new modes with xrandr. You can test modelines live and see if they work, by testing a new mode for a few seconds, by chaining the "sleep" command in the same command. More info here:

https://wiki.archlinux.org/index.php/Xrandr

The "troubleshooting" section is especially of interest, and it also shows in detail how to test new modes and how to add them to the xorg.conf.d directory.
TwitterSteamGitHubStack Overflow

The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.
User avatar
RealNC
 
Posts: 2076
Joined: 24 Dec 2013, 18:32

Re: BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby fred » 18 Jan 2018, 05:16

These are the values I obtain from Windows:

My calculation based on the values from the image:
"1920x1080" 594.27 1920 1948 1980 2040 1080 1137 1145 1215


Image

This is the mode present in the monitor's EDID data:

Detailed timing #4....... 1920x1080p at 240Hz
Modeline............... "1920x1080" 594.270 1920 1948 1980 2040 1080 1137 1145 1215 +hsync -vsync


This is what I can calculate and use on GNU/Linux (with the screen distortion issue):

user@fdt:~$ cvt -r 1920 1080 240
1920x1080 239.79 Hz (CVT) hsync: 291.35 kHz; pclk: 606.00 MHz
Modeline "1920x1080R" 606.00 1920 1968 2000 2080 1080 1083 1088 1215 +hsync -vsync


I have to use the -r option for reduced blanking modeline otherwise trying to activate the resolution will result in "xrandr: Configure crtc 0 failed".
Attachments
Untitled.png
Untitled.png (56.41 KiB) Viewed 1013 times
fred
 
Posts: 5
Joined: 17 Jan 2018, 04:47

Re: BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby fred » 18 Jan 2018, 08:19

I believe the default refresh rate used under GNU/Linux is the same as present in the EDID information. The more I look into this the more I come to think that this is a GPU driver issue.
fred
 
Posts: 5
Joined: 17 Jan 2018, 04:47

Re: BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby Chief Blur Buster » 18 Jan 2018, 14:28

Sometimes EDID is incorrect, or ignored when the numbers look "weird". For example, I think there's some filters for nonsensical EDIDs, but the filter may have falsed on the 240Hz modes since the original authors never anticipated the ranges of numbers that 240Hz provides.

My 240Hz mode uses a Vertical Total of 1160, not 1215, but it is very monitor-dependant.

But yes, now seeing this, it may be a GPU driver issue.

You might try to workaround this by shifting between Front Porch and Back Porch to reposition the image. If the screen distortion is only simply a mispositioning of image, you can subtract 1 from one and add 1 from other, to reposition. Vertical porch transfers will vertically reposition, and Horizontal porch transfers will horizontally reposition. Sync, Active and Totals remain the same. Rerun the calculations everytime you do a pixel transfer between Front and Back (Porches) for forced image-repositionings.

If your corruption is distortion rather than image repositioning, that may not work, but see what happens if:

fred wrote:These are the values I obtain from Windows:

My calculation based on the values from the image:
"1920x1080" 594.27 1920 1948 1980 2040 1080 1137 1145 1215


Image

This is the mode present in the monitor's EDID data:

Detailed timing #4....... 1920x1080p at 240Hz
Modeline............... "1920x1080" 594.270 1920 1948 1980 2040 1080 1137 1145 1215 +hsync -vsync


...Try EDID omitting the +hsync -hsync

Code: Select all
"1920x1080" 594.270 1920 1948 1980 2040 1080 1137 1145 1215


...Try the horizontal calculations of EDID with the vertical calculations of CVT (but keep all Totals and Pixel Clock unchanged), and see what happens:

Code: Select all
"1920x1080" 606.00 1920 1948 1980 2080 1080 1137 1145 1215


...And try the dotclock of 606.00 with the other (EDID at the CVT-recommended dotclock):

Code: Select all
"1920x1080" 606.00 1920 1948 1980 2040 1080 1137 1145 1215


Does any of the three work?
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors
User avatar
Chief Blur Buster
Site Admin
 
Posts: 5078
Joined: 05 Dec 2013, 15:44

Re: BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby fred » 18 Jan 2018, 15:11

Here is a picture of the issue:
https://bugs.freedesktop.org/attachment.cgi?id=136802

I am going to install Ubuntu 16.04 and attempt to install the AMDGPU-PRO driver on it to see what that gives. I have tried doing so on Ubuntu 17.10 but the system would not boot anymore after installation of the driver.
fred
 
Posts: 5
Joined: 17 Jan 2018, 04:47

Re: BenQ XL2546 240 Hz on GNU/Linux = screen distortion

Postby fred » 23 Jan 2018, 13:54

With the aid of an AMD developer I was able to find a solution. It can be found in the bug report ticket in the first post.
fred
 
Posts: 5
Joined: 17 Jan 2018, 04:47

[Fixed] Re: BenQ XL2546 240 Hz on GNU/Linux = screen distort

Postby Chief Blur Buster » 23 Jan 2018, 14:00

Fantastic to hear that AMD has come to the rescue!
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors
User avatar
Chief Blur Buster
Site Admin
 
Posts: 5078
Joined: 05 Dec 2013, 15:44


Return to BENQ/Zowie Tweaking — Strobe Utility / Blur Reduction / DyAc

Who is online

Users browsing this forum: No registered users and 5 guests