Re: HEADS UP: Merging drm update (Lenovo X230 mode switch issue in UEFI mode only, BIOS works)

2022-01-11 Thread Matthias Petermann

Hello,

unfortunately my build was broken the night before last, so I had to 
restart yesterday. This morning I could now test with the changed FONT 
option. The error pattern is still unchanged - with deactivated CSM, the 
graphics switches to this disturbed mode at the modeswitch.


As expected, the font was changed by the FONT option, which shows that 
the first lines before the mode switch appear in the Spleen font.


I'm afraid these findings don't really help?

Best regards
Matthias


On 09.01.22 17:40, Matthias Petermann wrote:

Hello,

On 04.01.22 21:10, RVP wrote:


Can you check something else as well?

Compile a kernel with:

-
# Give us a choice of fonts based on monitor size
#options    FONT_BOLD8x16
#options    FONT_BOLD16x32
options FONT_SPLEEN12x24
-
Sorry for the delay... just started a build with this options you 
recommended. You can expect some result until tomorrow morning.


Kind regards
Matthias


Re: HEADS UP: Merging drm update (Lenovo X230 mode switch issue in UEFI mode only, BIOS works)

2022-01-09 Thread Matthias Petermann

Hello,

On 04.01.22 21:10, RVP wrote:


Can you check something else as well?

Compile a kernel with:

-
# Give us a choice of fonts based on monitor size
#options    FONT_BOLD8x16
#options    FONT_BOLD16x32
options FONT_SPLEEN12x24
-
Sorry for the delay... just started a build with this options you 
recommended. You can expect some result until tomorrow morning.


Kind regards
Matthias


Re: HEADS UP: Merging drm update (Lenovo X230 mode switch issue in UEFI mode only, BIOS works)

2022-01-04 Thread RVP

On Tue, 4 Jan 2022, Matthias Petermann wrote:

RVP's tip was good and I can also confirm on my side that the problem is not 
fundamentally caused by the actual UEFI boot process, but that only the 
enabling/disabling of the CSM affects it. Also, the problem did not exist in 
NetBSD 9.2 at all.




Can you check something else as well?

Compile a kernel with:

-
# Give us a choice of fonts based on monitor size
#optionsFONT_BOLD8x16
#optionsFONT_BOLD16x32
options FONT_SPLEEN12x24
-

ie. with a non-standard font. On my Asus X202E laptop (in CSM mode) the
system comes up OK, but, X hangs as soon as you start it with this
message being repeated every 3 secs. in the logs. (Power-off using the
power button works correctly and the system does an orderly shutdown
which is why I could collect these logs.)

-
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat rcs0 heartbeat 
{prio:-2147483645} not ticking
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat Awake? 4
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat Barriers?: no
Dec 27 09:04:51 x202e /netbsd: [  34.6986941] heartbeat Latency: 27us
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat Heartbeat: 3000 
ms ago
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat Reset count: 0 
(global 0)
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat Requests:
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat active  
3:4*-  @ 6000ms: X[2108]
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat 
ring->start:  0x7fffa000
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat 
ring->head:   0x0248
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat 
ring->tail:   0x04a8
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat 
ring->emit:   0x04a8
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat 
ring->space:  0x3d60
Dec 27 09:04:51 x202e /netbsd: [  34.6986941] heartbeat 
ring->hwsp:   0x7fffe100
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat [head 0248, postfix 
0300, tail 0318, batch 0x_5000]:
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] warning: 
/usr/src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_engine_cs.c:1234: 
WARN_ON_ONCE(hex_dump_to_buffer(buf + pos, len - pos, rowsize, sizeof(u32), line, 
sizeof(line), 0) >= sizeof(line))heartbeat [] 027a 02001000  
 027a 1c4c1501 80f0ff7f 
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] 027a a1501001 80f0ff7f 
 0111 2022 f
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat [0020] 027a 
a1501001 80f0ff7f  0111 2022  0111
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] 2822 bf7f 01004012 
2822 00f0ff7f 0111 c
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat [0040] 2822 
bf7f 01004012 2822 00f0ff7f 0111 c020 00020002
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] 027a a1501001 80f0ff7f 
 027a 02001000 0
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] 2822 60] 027a 
a1501001 80f0ff7f  027a 02001000  
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] 027a 1c4c1501 80f0ff7f 
 0004  0
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat [0080] 027a 
1c4c1501 80f0ff7f  0004  000c 0c01ff7f
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat [0080] 027a 
1c4c1501 80f0ff7f 0 0
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat [0080]  
0104 8018 0050 00018018 a010 027a a1501001
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] 00e1ff7f 0400 0001 

Dec 27 09:04:51 x202e /netbsd: 
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat 	On hold?: 0

Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat MMIO base:  
0x2000
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat CCID: 0x7fff010d
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat RING_START: 
0x7fffa000
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat RING_HEAD:  
0x02e8
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat RING_TAIL:  
0x04a8
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat RING_CTL:   
0x3001
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat RING_MODE:  
0x4000
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat RING_IMR: 
ffde
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat ACTHD:  
0x_02e8
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat BBADDR: 
0x_7fff1230
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat DMA_FADDR: 
0x_7fffa2e8
Dec 27 09:04:51 x202e /netbsd: [ 234.6986941] heartbeat 

Re: HEADS UP: Merging drm update (Lenovo X230 mode switch issue in UEFI mode only, BIOS works)

2021-12-31 Thread Rhialto
On Fri 31 Dec 2021 at 11:30:32 +0100, Matthias Petermann wrote:
> - When I boot current in UEFI mode, after the mode switch it only displays a
> blank screen with a white background. After that, within a few seconds, a
> kind of randomly structured dark spot develops from the center of the
> screen, which then stretches to the edge of the screen [1].

I think I have seen that sort of effect in the past when playing with
various sleep modes of my laptop. It may be that the display (or some
display-related thing) is powered off and decaying.

-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFHfalu.nl@rhialto



signature.asc
Description: PGP signature


Re: HEADS UP: Merging drm update (Lenovo X230 mode switch issue in UEFI mode only, BIOS works)

2021-12-31 Thread Taylor R Campbell
> Date: Fri, 31 Dec 2021 11:30:32 +0100
> From: Matthias Petermann 
> 
> - When I boot current in UEFI mode, after the mode switch it only 
> displays a blank screen with a white background. After that, within a 
> few seconds, a kind of randomly structured dark spot develops from the 
> center of the screen, which then stretches to the edge of the screen [1].

Can you get dmesg from the previous boot if you reboot back in BIOS
mode?  Or can you ssh in and get it, or get it over a serial console?


Re: HEADS UP: Merging drm update (Lenovo X230 mode switch issue in UEFI mode only, BIOS works)

2021-12-31 Thread Matthias Petermann

Hello,

first of all, thanks for the effort to bring an up-to-date DRM to 
NetBSD! Proper graphics support is essential for most users and 
therefore the work cannot be appreciated enough.


I have now also managed to test current on my laptop and made an 
observation that I would like to share and hopefully be able to help to 
clarify / fix the underlying issue.


The Laptop is a Lenovo X230 model with i5 CPU and integrated intel 
graphics. It can boot NetBSD in both - BIOS (CSM) and UEFI mode.


- With NetBSD 9.2, the mode switch (when initializing the i915drmkms0 
device) works fine in both boot modes.


- In current from 28.12.2021 the mode switch only works when I boot in 
BIOS mode.


- When I boot current in UEFI mode, after the mode switch it only 
displays a blank screen with a white background. After that, within a 
few seconds, a kind of randomly structured dark spot develops from the 
center of the screen, which then stretches to the edge of the screen [1].


One (not necessarily related) observation: after the appearance of the 
above-mentioned spot, I turn off the laptop and boot back into NetBSD 
9.2. Immediately afterwards, I have a strange flickering on the display, 
which is especially noticeable with brighter colors. The graphical 
display seems normal otherwise. The flickering then disappeared again 
over time. Although I have absolutely no idea about it, my first thought 
was that the dark spot could be some kind of thermal problem that occurs 
with the mode switch? Is this possible?


In any case, I would like to help track down the problem. I'm building a 
current from the current sources and then setting up an identical laptop 
as a test machine. In the meantime, I'd appreciate any hints on what 
might be needed as diagnostic data.


Many greetings
Matthias

[1] http://www.petermann-it.de/netbsd/netbsd-drm.mp4
(SSL certicate renewal in progress)