Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-06-06 Thread Norman Golisz
On Wed May  1 2019 14:53, Daniel Bolgheroni wrote:
> On Wed, May 01, 2019 at 04:43:09PM +, Jonathan Gray wrote:
> > On Wed, May 01, 2019 at 12:34:12PM -0300, Daniel Bolgheroni wrote:
> > > On Mon, Apr 29, 2019 at 07:05:25AM +, Jonathan Gray wrote:
> > > > Does this help?
> > > 
> > > It was already commited but fixed the problem here.
> > > 
> > > However, I still can't see the correct modes set for LVDS-1 and for the
> > > external monitor on HDMI-1. An ultrawide 2560x1080 monitor can see at most
> > > 1920x1080, but worked fine with the previous drm.
> > 
> > There is a change queued for the next 4.19 release which concerns the
> > modesetting xorg driver, I'm not sure if it is relevant:
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/plain/queue-4.19/revert-drm-i915-fbdev-actually-configure-untiled-displays.patch
> 
> It's not, I'm sorry. I will try the next iteractions.
> 
> Thank you for your work.

Someone opened a bug on freedesktop's bugzilla:

https://bugs.freedesktop.org/show_bug.cgi?id=110629



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Daniel Bolgheroni
On Wed, May 01, 2019 at 04:43:09PM +, Jonathan Gray wrote:
> On Wed, May 01, 2019 at 12:34:12PM -0300, Daniel Bolgheroni wrote:
> > On Mon, Apr 29, 2019 at 07:05:25AM +, Jonathan Gray wrote:
> > > Does this help?
> > 
> > It was already commited but fixed the problem here.
> > 
> > However, I still can't see the correct modes set for LVDS-1 and for the
> > external monitor on HDMI-1. An ultrawide 2560x1080 monitor can see at most
> > 1920x1080, but worked fine with the previous drm.
> 
> There is a change queued for the next 4.19 release which concerns the
> modesetting xorg driver, I'm not sure if it is relevant:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/plain/queue-4.19/revert-drm-i915-fbdev-actually-configure-untiled-displays.patch

It's not, I'm sorry. I will try the next iteractions.

Thank you for your work.

-- 
db



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Jonathan Gray
On Wed, May 01, 2019 at 12:34:12PM -0300, Daniel Bolgheroni wrote:
> On Mon, Apr 29, 2019 at 07:05:25AM +, Jonathan Gray wrote:
> > Does this help?
> 
> It was already commited but fixed the problem here.
> 
> However, I still can't see the correct modes set for LVDS-1 and for the
> external monitor on HDMI-1. An ultrawide 2560x1080 monitor can see at most
> 1920x1080, but worked fine with the previous drm.

There is a change queued for the next 4.19 release which concerns the
modesetting xorg driver, I'm not sure if it is relevant:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/plain/queue-4.19/revert-drm-i915-fbdev-actually-configure-untiled-displays.patch

Index: sys/dev/pci/drm/i915/intel_fbdev.c
===
RCS file: /cvs/src/sys/dev/pci/drm/i915/intel_fbdev.c,v
retrieving revision 1.5
diff -u -p -r1.5 intel_fbdev.c
--- sys/dev/pci/drm/i915/intel_fbdev.c  14 Apr 2019 10:14:52 -  1.5
+++ sys/dev/pci/drm/i915/intel_fbdev.c  30 Apr 2019 07:38:31 -
@@ -380,8 +380,8 @@ static bool intel_fb_initial_config(stru
bool *enabled, int width, int height)
 {
struct drm_i915_private *dev_priv = to_i915(fb_helper->dev);
+   unsigned long conn_configured, conn_seq, mask;
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
-   unsigned long conn_configured, conn_seq;
int i, j;
bool *save_enabled;
bool fallback = true, ret = true;
@@ -399,9 +399,10 @@ static bool intel_fb_initial_config(stru
drm_modeset_backoff();
 
memcpy(save_enabled, enabled, count);
-   conn_seq = GENMASK(count - 1, 0);
+   mask = GENMASK(count - 1, 0);
conn_configured = 0;
 retry:
+   conn_seq = conn_configured;
for (i = 0; i < count; i++) {
struct drm_fb_helper_connector *fb_conn;
struct drm_connector *connector;
@@ -414,8 +415,7 @@ retry:
if (conn_configured & BIT(i))
continue;
 
-   /* First pass, only consider tiled connectors */
-   if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile)
+   if (conn_seq == 0 && !connector->has_tile)
continue;
 
if (connector->status == connector_status_connected)
@@ -519,10 +519,8 @@ retry:
conn_configured |= BIT(i);
}
 
-   if (conn_configured != conn_seq) { /* repeat until no more are found */
-   conn_seq = conn_configured;
+   if ((conn_configured & mask) != mask && conn_configured != conn_seq)
goto retry;
-   }
 
/*
 * If the BIOS didn't enable everything it could, fall back to have the



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Daniel Bolgheroni
On Mon, Apr 29, 2019 at 07:05:25AM +, Jonathan Gray wrote:
> Does this help?

It was already commited but fixed the problem here.

However, I still can't see the correct modes set for LVDS-1 and for the
external monitor on HDMI-1. An ultrawide 2560x1080 monitor can see at most
1920x1080, but worked fine with the previous drm.

Thank you.

$ xrandr
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS-1 connected primary 1366x768+0+0 (normal left inverted right x axis y 
axis) 277mm x 156mm
   1366x768  60.00*+
   1280x720  60.0059.9959.8659.74
   1024x768  60.0460.00
   960x720   60.00
   928x696   60.05
   896x672   60.01
   1024x576  59.9559.9659.9059.82
   960x600   59.9360.00
   960x540   59.9659.9959.6359.82
   800x600   60.0060.3256.25
   840x525   60.0159.88
   864x486   59.9259.57
   700x525   59.98
   800x450   59.9559.82
   640x512   60.02
   700x450   59.9659.88
   640x480   60.0059.94
   720x405   59.5158.99
   684x384   59.8859.85
   640x400   59.8859.98
   640x360   59.8659.8359.8459.32
   512x384   60.00
   512x288   60.0059.92
   480x270   59.6359.82
   400x300   60.3256.34
   432x243   59.9259.57
   320x240   60.05
   360x202   59.5159.13
   320x180   59.8459.32
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected (normal left inverted right x axis y axis)
   1920x1080 60.0050.0059.9430.0029.97
   1920x1080i60.0050.0059.94
   1680x1050 59.88
   1600x900  60.00
   1280x1024 75.0260.02
   1152x864  75.00
   1280x720  60.0050.0059.94
   1024x768  75.0360.00
   800x600   75.0060.32
   720x576   50.00
   720x480   60.0059.94
   640x480   75.0060.0059.94
   720x400   70.08
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
$



> 
> Index: sys/dev/pci/drm/drm_fb_helper.c
> ===
> RCS file: /cvs/src/sys/dev/pci/drm/drm_fb_helper.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 drm_fb_helper.c
> --- sys/dev/pci/drm/drm_fb_helper.c   14 Apr 2019 10:14:51 -  1.13
> +++ sys/dev/pci/drm/drm_fb_helper.c   29 Apr 2019 06:58:25 -
> @@ -575,6 +575,9 @@ static bool drm_fb_helper_is_bound(struc
>  #ifdef notyet
>   if (READ_ONCE(dev->master))
>   return false;
> +#else
> + if (!SPLAY_EMPTY(>files))
> + return false;
>  #endif
>  
>   drm_for_each_crtc(crtc, dev) {
> 

-- 
db



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Gregory Edigarov



On 29.04.19 10:05, Jonathan Gray wrote:

On Sun, Apr 28, 2019 at 07:26:54PM -0400, Charles wrote:

Hello list,

Ever since the new inteldrm driver got merged into -current, shortly
before the 6.5 release, I'm seeing an odd new behavior on my Thinkpad
T430 -- when an external display is connected, Xorg blanks all screens
(but the mouse can still be seen) until I switch to a TTY and back with
(i.e. C-A-F4 then C-A-F5) after which point it goes back to normal.

I'm glad the new inteldrm driver got merged, since it fixes several
other video issues I was having. This problem is very minor since the
workaround is just a few extra keystrokes when I dock or undock, but it
is nevertheless annoying.

Is anyone else experiencing this issue on third gen core-I series Intel
chips with integrated graphics? Or on any other chips for that matter?

I checked Xorg.0.log and didn't see anything suspicious. I also tried
disabling monitor hotplugging via Xorg.conf, but I either did it wrong
or it had no effect.

I would attach xorg logs and dmesg, but AFAIK misc@ does not allow
attachments, and I don't want to annoy people with that much inline
info.

Does this help?

Index: sys/dev/pci/drm/drm_fb_helper.c
===
RCS file: /cvs/src/sys/dev/pci/drm/drm_fb_helper.c,v
retrieving revision 1.13
diff -u -p -r1.13 drm_fb_helper.c
--- sys/dev/pci/drm/drm_fb_helper.c 14 Apr 2019 10:14:51 -  1.13
+++ sys/dev/pci/drm/drm_fb_helper.c 29 Apr 2019 06:58:25 -
@@ -575,6 +575,9 @@ static bool drm_fb_helper_is_bound(struc
  #ifdef notyet
if (READ_ONCE(dev->master))
return false;
+#else
+   if (!SPLAY_EMPTY(>files))
+   return false;
  #endif
  
  	drm_for_each_crtc(crtc, dev) {

could this one be also related to my troubles?



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-04-30 Thread Charles
On Mon, Apr 29, 2019 at 05:05:25PM +1000, Jonathan Gray wrote:
> On Sun, Apr 28, 2019 at 07:26:54PM -0400, Charles wrote:
> > Hello list,
> > 
> > Ever since the new inteldrm driver got merged into -current, shortly
> > before the 6.5 release, I'm seeing an odd new behavior on my Thinkpad
> > T430 -- when an external display is connected, Xorg blanks all screens
> > (but the mouse can still be seen) until I switch to a TTY and back with
> > (i.e. C-A-F4 then C-A-F5) after which point it goes back to normal.
> > 
> > I'm glad the new inteldrm driver got merged, since it fixes several
> > other video issues I was having. This problem is very minor since the
> > workaround is just a few extra keystrokes when I dock or undock, but it
> > is nevertheless annoying.
> > 
> > Is anyone else experiencing this issue on third gen core-I series Intel
> > chips with integrated graphics? Or on any other chips for that matter?
> > 
> > I checked Xorg.0.log and didn't see anything suspicious. I also tried
> > disabling monitor hotplugging via Xorg.conf, but I either did it wrong
> > or it had no effect.
> > 
> > I would attach xorg logs and dmesg, but AFAIK misc@ does not allow
> > attachments, and I don't want to annoy people with that much inline
> > info.
> 
> Does this help?
> 
> Index: sys/dev/pci/drm/drm_fb_helper.c
> ===
> RCS file: /cvs/src/sys/dev/pci/drm/drm_fb_helper.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 drm_fb_helper.c
> --- sys/dev/pci/drm/drm_fb_helper.c   14 Apr 2019 10:14:51 -  1.13
> +++ sys/dev/pci/drm/drm_fb_helper.c   29 Apr 2019 06:58:25 -
> @@ -575,6 +575,9 @@ static bool drm_fb_helper_is_bound(struc
>  #ifdef notyet
>   if (READ_ONCE(dev->master))
>   return false;
> +#else
> + if (!SPLAY_EMPTY(>files))
> + return false;
>  #endif
>  
>   drm_for_each_crtc(crtc, dev) {

This appears to have done the trick. I tested with two displays that
were affected by the originally noted issue. I will continue running
with this patch for a while and report back if the issue re-appears, or
there are other relevant developments.

Thank you for the patch.

~ Charles



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-04-29 Thread Jonathan Gray
On Sun, Apr 28, 2019 at 07:26:54PM -0400, Charles wrote:
> Hello list,
> 
> Ever since the new inteldrm driver got merged into -current, shortly
> before the 6.5 release, I'm seeing an odd new behavior on my Thinkpad
> T430 -- when an external display is connected, Xorg blanks all screens
> (but the mouse can still be seen) until I switch to a TTY and back with
> (i.e. C-A-F4 then C-A-F5) after which point it goes back to normal.
> 
> I'm glad the new inteldrm driver got merged, since it fixes several
> other video issues I was having. This problem is very minor since the
> workaround is just a few extra keystrokes when I dock or undock, but it
> is nevertheless annoying.
> 
> Is anyone else experiencing this issue on third gen core-I series Intel
> chips with integrated graphics? Or on any other chips for that matter?
> 
> I checked Xorg.0.log and didn't see anything suspicious. I also tried
> disabling monitor hotplugging via Xorg.conf, but I either did it wrong
> or it had no effect.
> 
> I would attach xorg logs and dmesg, but AFAIK misc@ does not allow
> attachments, and I don't want to annoy people with that much inline
> info.

Does this help?

Index: sys/dev/pci/drm/drm_fb_helper.c
===
RCS file: /cvs/src/sys/dev/pci/drm/drm_fb_helper.c,v
retrieving revision 1.13
diff -u -p -r1.13 drm_fb_helper.c
--- sys/dev/pci/drm/drm_fb_helper.c 14 Apr 2019 10:14:51 -  1.13
+++ sys/dev/pci/drm/drm_fb_helper.c 29 Apr 2019 06:58:25 -
@@ -575,6 +575,9 @@ static bool drm_fb_helper_is_bound(struc
 #ifdef notyet
if (READ_ONCE(dev->master))
return false;
+#else
+   if (!SPLAY_EMPTY(>files))
+   return false;
 #endif
 
drm_for_each_crtc(crtc, dev) {



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-04-28 Thread Jordan Geoghegan



On 4/28/19 4:26 PM, Charles wrote:

Hello list,

Ever since the new inteldrm driver got merged into -current, shortly
before the 6.5 release, I'm seeing an odd new behavior on my Thinkpad
T430 -- when an external display is connected, Xorg blanks all screens
(but the mouse can still be seen) until I switch to a TTY and back with
(i.e. C-A-F4 then C-A-F5) after which point it goes back to normal.



You're not the only one. I've had the same thing happen on my Thinkpad 
X1C6 which is running the April 24 snapshot I think.





Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-04-28 Thread Daniel Bolgheroni
On Sun, Apr 28, 2019 at 11:26:54PM +, Charles wrote:
> Is anyone else experiencing this issue on third gen core-I series Intel
> chips with integrated graphics? Or on any other chips for that matter?

Yes, can confirm on a ThinkPad X220.

Also, with the latest snapshot, the correct modes for LVDS-1 and HDMI-1 (an
external 2560x1080 monitor) are not correctly detected. In fact, the 2560x1080
mode isn't listed by xrandr.

Thank you.

/var/log/Xorg.0.log:
[  7548.941] (WW) checkDevMem: failed to open /dev/xf86 and /dev/mem
(Operation not permitted)
Check that you have set 'machdep.allowaperture=1'
in /etc/sysctl.conf and reboot your machine
refer to xf86(4) for details
[  7548.941]linear framebuffer access unavailable
[  7548.966] (--) Using wscons driver on /dev/ttyC4
[  7548.986]
X.Org X Server 1.19.7
Release Date: 2019-03-02
[  7548.986] X Protocol Version 11, Revision 0
[  7548.986] Build Operating System: OpenBSD 6.5 amd64
[  7548.986] Current Operating System: OpenBSD bike.home 6.5 GENERIC.MP#38 amd64
[  7548.986] Build Date: 28 April 2019  07:11:21AM
[  7548.986]
[  7548.987] Current version of pixman: 0.36.0
[  7548.987]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[  7548.987] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  7548.987] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 28 14:03:51 
2019
[  7548.987] (==) Using system config directory 
"/usr/X11R6/share/X11/xorg.conf.d"
[  7548.990] (==) No Layout section.  Using the first Screen section.
[  7548.990] (==) No screen section available. Using defaults.
[  7548.990] (**) |-->Screen "Default Screen Section" (0)
[  7548.990] (**) |   |-->Monitor ""
[  7548.990] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[  7548.990] (==) Automatically adding devices
[  7548.990] (==) Automatically enabling devices
[  7548.990] (==) Not automatically adding GPU devices
[  7548.990] (==) Max clients allowed: 256, resource mask: 0x1f
[  7548.991] (==) FontPath set to:
/usr/X11R6/lib/X11/fonts/misc/,
/usr/X11R6/lib/X11/fonts/TTF/,
/usr/X11R6/lib/X11/fonts/OTF/,
/usr/X11R6/lib/X11/fonts/Type1/,
/usr/X11R6/lib/X11/fonts/100dpi/,
/usr/X11R6/lib/X11/fonts/75dpi/
[  7548.991] (==) ModulePath set to "/usr/X11R6/lib/modules"
[  7548.991] (II) The server relies on wscons to provide the list of input 
devices.
If no devices become available, reconfigure wscons or disable 
AutoAddDevices.
[  7548.991] (II) Loader magic: 0xff502cd
[  7548.991] (II) Module ABI versions:
[  7548.991]X.Org ANSI C Emulation: 0.4
[  7548.991]X.Org Video Driver: 23.0
[  7548.991]X.Org XInput driver : 24.1
[  7548.991]X.Org Server Extension : 10.0
[  7548.991] (--) PCI:*(0:0:2:0) 8086:0126:17aa:21da rev 9, Mem @ 
0xf000/4194304, 0xe000/268435456, I/O @ 0x5000/64
[  7548.991] (II) LoadModule: "glx"
[  7548.992] (II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
[  7548.996] (II) Module glx: vendor="X.Org Foundation"
[  7548.996]compiled for 1.19.7, module version = 1.0.0
[  7548.996]ABI class: X.Org Server Extension, version 10.0
[  7548.997] (==) Matched modesetting as autoconfigured driver 0
[  7548.997] (==) Assigned the driver to the xf86ConfigLayout
[  7548.997] (II) LoadModule: "modesetting"
[  7548.997] (II) Loading /usr/X11R6/lib/modules/drivers/modesetting_drv.so
[  7548.998] (II) Module modesetting: vendor="X.Org Foundation"
[  7548.998]compiled for 1.19.7, module version = 1.19.7
[  7548.998]Module class: X.Org Video Driver
[  7548.998]ABI class: X.Org Video Driver, version 23.0
[  7548.998] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  7549.010] (**) modeset(0): claimed PCI slot 0@0:2:0
[  7549.010] (II) modeset(0): using default device
[  7549.027] (II) modeset(0): Creating default Display subsection in Screen 
section
"Default Screen Section" for depth/fbbpp 24/32
[  7549.027] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[  7549.027] (==) modeset(0): RGB weight 888
[  7549.027] (==) modeset(0): Default visual is TrueColor
[  7549.027] (II) Loading sub module "glamoregl"
[  7549.027] (II) LoadModule: "glamoregl"
[  7549.030] (II) Loading /usr/X11R6/lib/modules/libglamoregl.so
[  7549.036] (II) Module glamoregl: vendor="X.Org Foundation"
[  7549.036]compiled for 1.19.7, module version = 1.0.0
[  7549.036]ABI class: X.Org ANSI C Emulation, version 0.4
[  7549.036] (II) glamor: OpenGL accelerated X.org driver based.
[  7549.069] (II) glamor: EGL version 1.4:
[  7549.073] (II) modeset(0): glamor initialized
[  7549.073] (II) modeset(0): Output LVDS-1 has no monitor section
[  7549.075] (II) modeset(0): Output