Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-11 Thread John D. Baker
On Sat, 10 Apr 2021, Rhialto wrote:

> I have a laptop of about 10 years old with an Intel "GM45"(?) chipset
> (or i965 is mentioned in some places).

I have a G41 chipset in my primary workstation machine and I see
frequent references to i965 for dri-related things (and that the
i965 vdpau module is not present in NetBSD's Xorg/OpenGL--as noted
by mplayer, mpv, vlc, etc.).

> It worked fine up to NetBSD 8.x. But now on 9.1, if I run x64 (from
> package emulators/vice) on it for a while I get errors in my xterm
> "i965: Failed to submit batchbuffer: Input/output error",
> and the kernel crashes sometimes a short time later.

I've seen/experienced these as well, mostly when trying to play videos
through firefox (firefox52, actually).  IIRC, the workaround has been
to set "LIBGL_ALWAYS_INDIRECT=1".  I do it in a wrapper script for
firefox, but if other things trigger it, perhaps it should be set/exported
in .xsession (or other display-manager session configuration/startup file).
  
> The config file is mostly the auto-detected stuff, enhanced with some
> preferences from my previous xorg.conf file. For some reason, 2 cards
> were detected, Card0 and Card1 and I just copied that, just in case it
> is important.
> 
> 000:02:0: Intel 82GM45 Integrated Graphics Device (VGA display, revision 
> 0x07) [i915drmkms0]
> 000:02:1: Intel 82GM45 Integrated Graphics Device (miscellaneous display, 
> revision 0x07)

Function 0, according to the device ID reported in your Xorg.0.log and
matched in "i915pciids.h" is a GM45_G.  You said it's a laptop, so I
suppose it's the "Mobile" variant of the G45.  Function 1 is not listed.
I wonder what "miscellaneous display" means?

Before the gen 3/4/5 chips were defaulted to UXA, the only xorg.conf
I needed was to set AccelMethod UXA.  Since the default to UXA, the
auto-detection works properly and I don't need xorg.conf anymore.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-11 Thread Rhialto
On Sun 11 Apr 2021 at 08:07:20 -0500, John D. Baker wrote:
> I've seen/experienced these as well, mostly when trying to play videos
> through firefox (firefox52, actually).  IIRC, the workaround has been
> to set "LIBGL_ALWAYS_INDIRECT=1".  I do it in a wrapper script for
> firefox, but if other things trigger it, perhaps it should be set/exported
> in .xsession (or other display-manager session configuration/startup file).

I tried setting this and it certainly has some effect but not yet the
one I hoped for :) All programs I tried didn't like it: most terminate
with some error.

mpv runs, but simply doesn't paint its window. LIBGL_ALWAYS_INDIRECT
certainly has interesting effects :)

Grepping for this string I found
/usr/xsrc/external/mit/MesaLib/dist/docs/envvars.html which gave me some
other things to try. I could get extensive debugging output for example
with INTEL_DEBUG=all. But that was unfortunately so much detail that it
didn't mean much to me.

I did find a more interesting part of the kernel messages though
(related to the original problem I'd say). I'm including them for the
record, in case it means anything to somebody who could fix it.

Apr 11 18:43:26 vargaz /netbsd: [ 362.4169375] kern info: [drm] stuck on render 
ring
Apr 11 18:43:26 vargaz /netbsd: [ 362.4169375] kern info: [drm] GPU HANG: ecode 
4:0:0x86fefffc, reason: Ring hung, action: reset
Apr 11 18:43:26 vargaz /netbsd: [ 362.4169375] kern error: 
[drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:3196)i915_context_is_banned]
 *ERROR* gpu hanging too fast, banning!
Apr 11 18:43:26 vargaz /netbsd: [ 362.4169375] drm/i915: Resetting chip after 
gpu hang
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] kern error: 
[drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:2703)i915_handle_error]
 *ERROR* Error state:
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] GPU HANG: ecode 4:0:0x86fd, 
reason: Ring hung, action: reset
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] Time: 1618159400 s 39278 us
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] Kernel: 90100
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] Reset count: 0
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] Suspend count: 0
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] PCI ID: 0x2a42
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] IOMMU enabled?: -1
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] EIR: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] IER: 0x02028053
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] PGTBL_ER: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] FORCEWAKE: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] DERRMR: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] CCID: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] Missed interrupts: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[0] = bc205c50cd
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[1] = bd70bd400d
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[2] = bdb0bd800d
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[3] = ef60c7704d
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[4] = f3e0f2301d
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[5] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[6] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[7] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[8] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[9] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[10] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[11] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[12] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[13] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[14] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   fence[15] = 
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   INSTDONE_0: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   INSTDONE_1: 0xbfdc
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   INSTDONE_2: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   INSTDONE_3: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447] render command stream:
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   START: 0x3000
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   HEAD:  0x00014ef8
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   TAIL:  0x00014f60
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   CTL:   0x0001f001
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   HWS:   0x1000
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   ACTHD: 0x 1f2632b4
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   IPEIR: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   IPEHR: 0x7902
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   INSTDONE: 0x
Apr 11 18:43:26 vargaz /netbsd: [ 362.4269447]   BBADDR: 0x 

Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread Mayuresh
On Sat, Apr 10, 2021 at 01:58:33PM -0500, John D. Baker wrote:
> I should note that I do not and cannot speak for NetBSD developers, but
> merely an interested user who has dealt with this issue in the recent
> past and all of my affected systems are handled satisfactorily.

Appreciate your help.

Given the background you have, if you have any idea about the 'touchpad'
issue (see a separate thread) please do share your views.

The display issue was solved, thanks to Jörn's post. But touchpad proved
to be a show stopper. Had to revert to Linux on that device.

-- 
Mayuresh


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread Mayuresh
On Sat, Apr 10, 2021 at 01:53:48PM -0500, John D. Baker wrote:
> As this is a USB-stick installation, I presume you expect to be able to
> boot it on any machine you encounter?  Other systems with intel graphics
> devices may be just fine with SNA, so you may want to move the "xorg.conf"
> aside on those systems.  Of course, you won't know for sure until you
> try it each way.

I have tried this USB stick installation on 1 more laptop where it worked
fine with default xorg configuration. But it's a different chipset.

On this other m/c, on Linux:

# lspci -vvv -s 0:1.0
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Stoney [Radeon R2/R3/R4/R5 Graphics] (rev ea) (prog-if 00 [VGA
controller])
Subsystem: Lenovo Stoney [Radeon R2/R3/R4/R5 Graphics]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
SERR- 
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1+,D2+,D3hot+,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Express (v2) Root Complex Integrated Endpoint,
MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0
ExtTag+ RBE+ FLReset-
DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
MaxPayload 256 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr-
TransPend-
DevCap2: Completion Timeout: Not Supported, TimeoutDis-,
NROPrPrP-, LTR-
 10BitTagComp-, 10BitTagReq-, OBFF Not Supported,
ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1
 EmergencyPowerReduction Not Supported,
EmergencyPowerReductionInit-
 FRS-
 AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-,
LTR-, OBFF Disabled
 AtomicOpsCtl: ReqEn-
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: fee01004  Data: 4026
Capabilities: [100 v1] Vendor Specific Information: ID=0001 Rev=1
Len=010 
Capabilities: [270 v1] Secondary PCI Express
LnkCtl3: LnkEquIntrruptEn-, PerformEqu-
LaneErrStat: 0
Capabilities: [2b0 v1] Address Translation Service (ATS)
ATSCap: Invalidate Queue Depth: 00
ATSCtl: Enable-, Smallest Translation Unit: 00
Capabilities: [2c0 v1] Page Request Interface (PRI)
PRICtl: Enable- Reset-
PRISta: RF- UPRGI- Stopped+
Page Request Capacity: 0020, Page Request Allocation:

Capabilities: [2d0 v1] Process Address Space ID (PASID)
PASIDCap: Exec- Priv-, Max PASID Width: 10
PASIDCtl: Enable- Exec- Priv-
Kernel driver in use: amdgpu
Kernel modules: amdgpu

I have 1 more machine, which is not with me right now. Can try it some
other day if it is going to help get any idea.

-- 
Mayuresh


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread John D. Baker
Linux is using the "modesetting" driver rather than the "intel" driver.
This is an option on NetBSD as well, although ISTR that OpenGL doesn't
yet work with the "modesetting" driver currently in NetBSD's Xorg sources.
(Or was it something else that was not ready for prime time?)

As such, it doesn't directly identify the video device but does provide:

> [   898.950] (--) PCI:*(0@0:2:0) 8086:0f31:1043:15bd rev 14, Mem @ 
> 0xd000/4194304, 0xc000/268435456, I/O @ 0xf080/8, BIOS @ 
> 0x/131072

Under Linux 'lspci' for the device at bus 0, device 2, function 0 should
show more information--possibly even a chipset name/number.  More "-v"s
for more verbosity if needed.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread John D. Baker
I should note that I do not and cannot speak for NetBSD developers, but
merely an interested user who has dealt with this issue in the recent
past and all of my affected systems are handled satisfactorily.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread John D. Baker
Based on the PCI DeviceID (0x0f31), this appears to be a "Valleyview
(Baytail)" device (as described in "intel_module.c" in the xf86-video-intel
sources.

This is considered a generation 7.1 device and as such currently defaults
to SNA rather than UXA (gen 3.1-5.0 inclusive).

I suppose we need more data from Atom users to see if this is a common
enough situation to warrant an additional device default to UXA.

As this is a USB-stick installation, I presume you expect to be able to
boot it on any machine you encounter?  Other systems with intel graphics
devices may be just fine with SNA, so you may want to move the "xorg.conf"
aside on those systems.  Of course, you won't know for sure until you
try it each way.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread John D. Baker
Could you post some details about which intel video device/chipset the
affected system is using?

There are some newer chips that can use AccelMethod SNA, but also require
Option TearFree (which IIRC is now on by default).  Otherwise, the screen
is garbled much as you describe.

There some older chips (e.g., i845, i855(?), i915) that work with
AccelMethod SNA and don't require Option TearFree (and need to disable
it to save the performance penalty).

Then there are some in the middle (e.g., i945, i946, G41, Q45) that
don't work with SNA at all (garbled screen much as you describe) and
require AccelMethod UXA.  We thought we'd figured out the non-working
range of chip generations and had them default to UXA and pulled that
up to netbsd-9 quite some months ago.

Sounds like you've found an outlier?

If you could move your "xorg.conf" aside, restart X, and post the
resulting "/var/log/Xorg.0.log", that might shed some light on which
chip is not covered by the above cases.

Thanks.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread Rhialto
On Sat 10 Apr 2021 at 21:17:31 +0200, Rhialto wrote:
> "i965: Failed to submit batchbuffer: Input/output error",
> and the kernel crashes sometimes a short time later.

/usr/pkg/libexec/xscreensaver/carousel reliably provokes that error
message. The kernel log contains then lots of hexdump, and stuff like

Apr 10 21:33:31 vargaz /netbsd: [ 3749.9252610] 000117cc :  00c0
Apr 10 21:33:31 vargaz /netbsd: [ 3749.9252610] 000117d0 :  b6ff
Apr 10 21:33:31 vargaz /netbsd: [ 3749.9252610] 000117d4 :  0100
...
Apr 10 21:33:31 vargaz /netbsd: [ 3749.9352668] 00013368 :  0200
Apr 10 21:33:31 vargaz /netbsd: [ 3749.9352668] 0001336c :  
Apr 10 21:33:31 vargaz /netbsd: [ 3749.9352668] 0001337
Apr 10 21:33:37 vargaz /netbsd: [ 3755.9180155] kern info: [drm] stuck on 
render ring
Apr 10 21:33:37 vargaz /netbsd: [ 3755.9180155] kern info: [drm] GPU HANG: 
ecode 4:0:0x86fefffc, reason: Ring hung, action: reset
Apr 10 21:33:37 vargaz /netbsd: [ 3755.9180155] kern error: 
[drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:3196)i915_context_is_banned]
 *ERROR* gpu hanging too fast, banning!
Apr 10 21:33:37 vargaz /netbsd: [ 3755.9180155] kern info: [drm] stuck on 
render ringng
Apr 10 21:33:37 vargaz /netbsd: [ 3756.1181094] 000117cc :  00c0
Apr 10 21:33:37 vargaz /netbsd: [ 3756.1181094] 000117d0 :  b6ff
Apr 10 21:33:37 vargaz /netbsd: [ 3756.1181094] 000117d4 :  0100
...

I can switch to the "modesetting" driver, but that is too slow to play
movies, so it's useless.

-Olaf.
-- 
___ Q: "What's an anagram of Banach-Tarski?"  -- Olaf "Rhialto" Seibert
\X/ A: "Banach-Tarski Banach-Tarski." -- rhialto at falu dot nl


signature.asc
Description: PGP signature


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread Rhialto
On Sat 10 Apr 2021 at 11:48:07 -0500, John D. Baker wrote:
> Sounds like you've found an outlier?

I have a laptop of about 10 years old with an Intel "GM45"(?) chipset
(or i965 is mentioned in some places).

It worked fine up to NetBSD 8.x. But now on 9.1, if I run x64 (from
package emulators/vice) on it for a while I get errors in my xterm
"i965: Failed to submit batchbuffer: Input/output error",
and the kernel crashes sometimes a short time later.

The config file is mostly the auto-detected stuff, enhanced with some
preferences from my previous xorg.conf file. For some reason, 2 cards
were detected, Card0 and Card1 and I just copied that, just in case it
is important.

000:02:0: Intel 82GM45 Integrated Graphics Device (VGA display, revision 0x07) 
[i915drmkms0]
000:02:1: Intel 82GM45 Integrated Graphics Device (miscellaneous display, 
revision 0x07)

$ sudo crash -M netbsd.0.core -N netbsd.0
Crash version 9.1, image version 9.1.
System panicked: trap
Backtrace from time of crash is available.
crash> bt
_KERNEL_OPT_NARCNET() at 0
?() at a00066edb000
vpanic() at vpanic+0x169
snprintf() at snprintf
startlwp() at startlwp
calltrap() at calltrap+0x11
i915_capture_error_state() at i915_capture_error_state+0xef1
i915_handle_error() at i915_handle_error+0x89
linux_workqueue_thread() at linux_workqueue_thread+0x14e
crash> dmesg

[ 3668.2570634] 00012844 :  ff808080
[ 3668.2570634] 00012848 :  ff808080
[ 3668.2570634] 0001284c :  ff808080
[ 3668.2570634] 00012850 :  ff808080
...
[ 3668.2670701] 00014374 :  ff808080
[ 3668.2670701] 00014378 :  ff808080
[ 3668.2670701] 0001437c :
[ 3704.2637605] kern info: [drm] stuck on render ring
[ 3704.2637605] uvm_fault(0x8151f6e0, 0xa00066ed2000, 1) -> e
[ 3704.2637605] fatal page fault in supervisor mode
[ 3704.2637605] trap type 6 code 0 rip 0x80abea38 cs 0x8 rflags 0x10206
cr2 0xa00066ed2628 ilevel 0x6 rsp 0xa00066eddd10
[ 3704.2637605] curlwp 0xe8a6c151b740 pid 0.77 lowest kstack 0xa00066edb
2c0
[ 3704.2637605] panic: trap
[ 3704.2637605] cpu0: Begin traceback...
[ 3704.2637605] vpanic() at netbsd:vpanic+0x160
[ 3704.2637605] snprintf() at netbsd:snprintf
[ 3704.2637605] startlwp() at netbsd:startlwp
[ 3704.2637605] alltraps() at netbsd:alltraps+0xbb
[ 3704.2737715] i915_capture_error_state() at netbsd:i915_capture_error_state+0x
ef1
[ 3704.2737715] i915_handle_error() at netbsd:i915_handle_error+0x89
[ 3704.2737715] linux_workqueue_thread() at netbsd:linux_workqueue_thread+0x14e
[ 3704.2737715] cpu0: End traceback...

[ 3704.2737715] dumping to dev 0,1 (offset=199775, size=1023726):
[ 3704.2737715] dump


Xorg.0.log:


[23.826] 
X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
[23.826] Build Operating System: NetBSD/amd64 9.1 - The NetBSD Foundation, 
Inc.
[23.826] Current Operating System: NetBSD vargaz.falu.nl 9.1 NetBSD 9.1 
(GENERIC) #0: Sun Oct 18 19:24:30 UTC 2020  
mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
[23.827] Build Date: 03 March 2019  07:11:23AM
[23.827]  
[23.840] Current version of pixman: 0.38.4
[23.840]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[23.840] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[23.840] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Apr 10 20:31:25 
2021
[23.868] (==) Using config file: "/etc/X11/xorg.conf"
[23.879] (==) ServerLayout "X.org Configured"
[23.879] (**) |-->Screen "Screen0" (0)
[23.879] (**) |   |-->Monitor "Monitor0"
[23.880] (**) |   |-->Device "Card0"
[23.880] (**) |-->Screen "Screen1" (1)
[23.880] (**) |   |-->Monitor "Monitor1"
[23.881] (**) |   |-->Device "Card1"
[23.882] (**) |-->Input Device "Mouse0"
[23.882] (**) |-->Input Device "Keyboard0"
[23.882] (==) Not automatically adding devices
[23.882] (==) Not automatically enabling devices
[23.882] (==) Not automatically adding GPU devices
[23.896] (==) Max clients allowed: 256, resource mask: 0x1f
[23.918] (**) FontPath set to:
/usr/X11R7/lib/X11/fonts/misc/,
/usr/X11R7/lib/X11/fonts/TTF/,
/usr/X11R7/lib/X11/fonts/Speedo/,
/usr/X11R7/lib/X11/fonts/Type1/,
/usr/X11R7/lib/X11/fonts/CID/,
/usr/X11R7/lib/X11/fonts/75dpi/,
/usr/X11R7/lib/X11/fonts/100dpi/,
/usr/X11R7/lib/X11/fonts/misc/,
/usr/X11R7/lib/X11/fonts/TTF/,
/usr/X11R7/lib/X11/fonts/Type1/,
/usr/X11R7/lib/X11/fonts/75dpi/,
/usr/X11R7/lib/X11/fonts/100dpi/
[23.918] (**) ModulePath set to "/usr/X11R7/lib/modules"
[23.918] (II) Loader magic: 0x6488ea60
[23.918] (II) Module ABI versions:
[23.918]X.Org ANSI C Emulation: 0.4
[23.918]X.Org Video Driver: 24.0
[23.918]X.Org XInput driver : 

Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread Mayuresh
On Sat, Apr 10, 2021 at 01:01:32PM -0500, John D. Baker wrote:
> Under Linux 'lspci' for the device at bus 0, device 2, function 0 should
> show more information--possibly even a chipset name/number.

Here it is:

# lspci -vvv -s 0:2.0
00:02.0 VGA compatible controller: Intel Corporation Atom Processor
Z36xxx/Z37xxx Series Graphics & Display (rev 0e) (prog-if 00 [VGA
controller])
Subsystem: ASUSTeK Computer Inc. Atom Processor Z36xxx/Z37xxx
Series Graphics & Display
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
SERR- 
Kernel driver in use: i915
Kernel modules: i915

-- 
Mayuresh


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread Mayuresh
On Sat, Apr 10, 2021 at 11:48:07AM -0500, John D. Baker wrote:
> If you could move your "xorg.conf" aside, restart X, and post the
> resulting "/var/log/Xorg.0.log", that might shed some light on which
> chip is not covered by the above cases.

Currently the system is in use on Linux. So I am posting the Xorg log from
Linux, which may still be useful. If it is going to help further I'll
share the log on NetBSD later, when I get to reboot the system. [Let me
know.]

[As noted earlier Option "AccelMethod" "uxa" of intel driver fixes the
display issue. But as shared on a separate thread, I am unable to use
NetBSD on the laptop due to sensitive touchpad issue.]

-- 
Mayuresh
[   898.854] 
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[   898.864] Build Operating System: Linux 4.15.0-130-generic x86_64 Ubuntu
[   898.867] Current Operating System: Linux asus 5.8.0-41-generic 
#46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 2021 x86_64
[   898.867] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.8.0-41-generic 
root=UUID=a775ffbe-42df-4474-9bb1-965468166243 ro text
[   898.873] Build Date: 17 January 2021  09:13:31AM
[   898.877] xorg-server 2:1.20.9-2ubuntu1.2~20.04.1 (For technical support 
please see http://www.ubuntu.com/support) 
[   898.880] Current version of pixman: 0.38.4
[   898.887]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[   898.887] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   898.900] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Mar 14 15:04:07 
2021
[   898.904] (==) Using config directory: "/etc/X11/xorg.conf.d"
[   898.907] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   898.908] (==) No Layout section.  Using the first Screen section.
[   898.908] (==) No screen section available. Using defaults.
[   898.908] (**) |-->Screen "Default Screen Section" (0)
[   898.908] (**) |   |-->Monitor ""
[   898.909] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[   898.909] (==) Automatically adding devices
[   898.909] (==) Automatically enabling devices
[   898.909] (==) Automatically adding GPU devices
[   898.909] (==) Automatically binding GPU devices
[   898.909] (==) Max clients allowed: 256, resource mask: 0x1f
[   898.909] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   898.909]Entry deleted from font path.
[   898.909] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   898.909]Entry deleted from font path.
[   898.909] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   898.909]Entry deleted from font path.
[   898.909] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   898.909]Entry deleted from font path.
[   898.909] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   898.909]Entry deleted from font path.
[   898.909] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[   898.909] (==) ModulePath set to "/usr/lib/xorg/modules"
[   898.909] (II) The server relies on udev to provide the list of input 
devices.
If no devices become available, reconfigure udev or disable 
AutoAddDevices.
[   898.909] (II) Loader magic: 0x5638c7e49020
[   898.909] (II) Module ABI versions:
[   898.909]X.Org ANSI C Emulation: 0.4
[   898.909]X.Org Video Driver: 24.1
[   898.909]X.Org XInput driver : 24.1
[   898.909]X.Org Server Extension : 10.0
[   898.913] (--) using VT number 2

[   898.913] (II) systemd-logind: logind integration requires -keeptty and 
-keeptty was not provided, disabling logind integration
[   898.919] (II) xfree86: Adding drm device (/dev/dri/card0)
[   898.950] (--) PCI:*(0@0:2:0) 8086:0f31:1043:15bd rev 14, Mem @ 
0xd000/4194304, 0xc000/268435456, I/O @ 0xf080/8, BIOS @ 
0x/131072
[   898.950] (II) LoadModule: "glx"
[   898.950] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   898.952] (II) Module glx: vendor="X.Org Foundation"
[   898.952]compiled for 1.20.9, module version = 1.0.0
[   898.952]ABI class: X.Org Server Extension, version 10.0
[   898.952] (==) Matched modesetting as autoconfigured driver 0
[   898.952] (==) Matched fbdev as autoconfigured driver 1
[   898.952] (==) Matched vesa as autoconfigured driver 2
[   898.952] (==) Assigned the driver to the xf86ConfigLayout
[   898.952] (II) LoadModule: "modesetting"
[   898.952] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   898.953] (II) Module modesetting: vendor="X.Org Foundation"
[   898.953]compiled for 1.20.9, module version = 1.20.9
[   898.953]Module class: X.Org Video Driver
[   898.953]ABI class: X.Org Video Driver, version 24.1
[   

Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-10 Thread Mayuresh
On Fri, Apr 09, 2021 at 11:25:47PM +0200, Jörn Clausen wrote:
> Someone on this list suggested this change to me (also using i915drmkms0)
> +   Option  "AccelMethod" "uxa"

Excellent find! It solved my problem. Thank you very much for sharing and
to one who found it.

-- 
Mayuresh


Re: NetBSD 9.1 amd64, base X11: garbled display

2021-04-09 Thread Jörn Clausen
Someone on this list suggested this change to me (also using i915drmkms0)

--- /etc/X11/xorg.conf  2020/04/01 20:12:03 1.1
+++ /etc/X11/xorg.conf  2020/04/01 20:16:15
@@ -75,7 +75,8 @@
 #Option "DebugWait"# []
 #Option "BufferCache"  # []
Identifier  "Card0"
-   Driver  "wsfb"
+   Driver  "intel"
+   Option  "AccelMethod" "uxa"
BusID   "PCI:0:2:0"
 EndSection

and X11 is fairly usable for me. Every now and then I see messages like

kern error:
[drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c:132)intel_pipe_update_start]
*ERROR* Potential atomic update failure on pipe A: -35

but X11 is stable and I don't have any visual artefacts.


On Fri, Apr 9, 2021 at 9:04 PM Mayuresh  wrote:

> Recently installed NetBSD 9.1 amd64 on USB stick and booting a laptop.
>
> x11 is starting, but the screen looks garbled. Even xinit xterm opens
> xterm but even the prompt doesn't appear correctly. (Looks something like
> video synchronization going wrong.)
>
> X -configure shows driver as "intel". Tried changing it to "vesa", but
> that doesn't start.
>
> dmesg shows it as i915drmkms0.
>
> Would prefer base x11 to work.
>
> Let me know if any more information would help.
>
> --
> Mayuresh
>


-- 
Joern Clausen
https://www.oe-files.de/photography/