Re: taskq_next_work: page fault trap when staring Xfce

2023-08-02 Thread Mark Kettenis
> Date: Wed, 2 Aug 2023 14:11:36 +1000
> From: Jonathan Gray 
> 
> On Mon, Jul 31, 2023 at 10:48:12PM +1000, Jonathan Gray wrote:
> > On Sun, Jul 30, 2023 at 03:21:47PM +0900, YASUOKA Masahiko wrote:
> > > Hello,
> > > 
> > > I got new vaio last week, the machine seems to have the same graphic
> > > 
> > >   inteldrm0 at pci0 dev 2 function 0 "Intel Graphics" rev 0x04
> > >   drm0 at inteldrm0
> > >   inteldrm0: msi, ALDERLAKE_P, gen 12
> > > 
> > > and has the same problem.  I found having Option "PageFlip" "off" in
> > > /etc/X11/xorg.conf can workaround the problem.
> > > 
> > >   Section "Device"
> > >   Identifier  "Card0"
> > >   Driver  "modesetting"
> > >   BusID   "PCI:0:2:0"
> > >   Option  "PageFlip" "off"
> > >   EndSection
> > 
> > running GENERIC I got the following with xfce.
> > 
> > matches the trace in an earlier report from sthen@
> > https://marc.info/?l=openbsd-bugs=168234057913478=2
> > 
> > dpt_insert_entries+0xbc: movl 0x34(%r8),%r10d
> > r8  0x81938fe0
> > r10 0x1000
> > 
> >0x81ab0bc3 <+179>:   mov%r8,%rcx
> >0x81ab0bc6 <+182>:   add$0x20,%rcx
> >0x81ab0bca <+186>:   je 0x81ab0be8 
> > 
> >0x81ab0bcc <+188>:   mov0x34(%r8),%r10d
> >0x81ab0bd0 <+192>:   test   %r10d,%r10d
> >0x81ab0bd3 <+195>:   je 0x81ab0be8 
> > 
> > 
> > (gdb) info line *0x81ab0bcc
> > Line 34 of "/sys/dev/pci/drm/i915/i915_scatterlist.h"
> >starts at address 0x81ab0bc1 
> >and ends at 0x81ab0bd5 .
> > 
> > if (dma && s.sgp && sg_dma_len(s.sgp) == 0) {
> > 
> > dpt_insert_entries+0xbc
> > dpt_bind_vma+0x64
> > i915_vma_bind+0x317
> > i915_vma_pin_ww+0x44b
> > intel_plane_pin_fb+0x25c
> > intel_prepare_plane_pin_fb+0x12c
> > drm_atomic_helper_prepare_planes+0x5b
> > intel_atomic_commit+0xda
> > drm_atomic_helper_page_flip+0x77
> > drm_mode_page_flip_ioctl+0x466
> > drm_do_ioctl+0x285
> > drmioctl+0xdc
> > VOP_IOCTL+0x57
> > vn_ioctl+0x6c
> 
> The fix is to not reset the end of list marker when
> assigning a page.

The Linux version retains the end marker, so this fix appears to be correct.

ok kettenis@

> Index: sys/dev/pci/drm/include/linux/scatterlist.h
> ===
> RCS file: /cvs/src/sys/dev/pci/drm/include/linux/scatterlist.h,v
> retrieving revision 1.5
> diff -u -p -r1.5 scatterlist.h
> --- sys/dev/pci/drm/include/linux/scatterlist.h   1 Jan 2023 01:34:58 
> -   1.5
> +++ sys/dev/pci/drm/include/linux/scatterlist.h   2 Aug 2023 04:02:02 
> -
> @@ -119,7 +119,6 @@ sg_set_page(struct scatterlist *sgl, str
>   sgl->dma_address = page ? VM_PAGE_TO_PHYS(page) : 0;
>   sgl->offset = offset;
>   sgl->length = length;
> - sgl->end = false;
>  }
>  
>  #define sg_dma_address(sg)   ((sg)->dma_address)
> 
> 



Re: taskq_next_work: page fault trap when staring Xfce

2023-08-02 Thread Klemens Nanni
02.08.2023 07:11, Jonathan Gray пишет:
> The fix is to not reset the end of list marker when
> assigning a page.

This alone without the xorg.conf snippet is stable, no hangs or glitches
in Xfce or 0.A.D., which so far instanstly triggered corruptions.

Thanks a lot!
FWIW, OK kn

> 
> Index: sys/dev/pci/drm/include/linux/scatterlist.h
> ===
> RCS file: /cvs/src/sys/dev/pci/drm/include/linux/scatterlist.h,v
> retrieving revision 1.5
> diff -u -p -r1.5 scatterlist.h
> --- sys/dev/pci/drm/include/linux/scatterlist.h   1 Jan 2023 01:34:58 
> -   1.5
> +++ sys/dev/pci/drm/include/linux/scatterlist.h   2 Aug 2023 04:02:02 
> -
> @@ -119,7 +119,6 @@ sg_set_page(struct scatterlist *sgl, str
>   sgl->dma_address = page ? VM_PAGE_TO_PHYS(page) : 0;
>   sgl->offset = offset;
>   sgl->length = length;
> - sgl->end = false;
>  }
>  
>  #define sg_dma_address(sg)   ((sg)->dma_address)
> 



Re: taskq_next_work: page fault trap when staring Xfce

2023-08-01 Thread YASUOKA Masahiko
Hi,

On Wed, 2 Aug 2023 14:11:36 +1000
Jonathan Gray  wrote:
> On Mon, Jul 31, 2023 at 10:48:12PM +1000, Jonathan Gray wrote:
>> On Sun, Jul 30, 2023 at 03:21:47PM +0900, YASUOKA Masahiko wrote:
>> > Hello,
>> > 
>> > I got new vaio last week, the machine seems to have the same graphic
>> > 
>> >   inteldrm0 at pci0 dev 2 function 0 "Intel Graphics" rev 0x04
>> >   drm0 at inteldrm0
>> >   inteldrm0: msi, ALDERLAKE_P, gen 12
>> > 
>> > and has the same problem.  I found having Option "PageFlip" "off" in
>> > /etc/X11/xorg.conf can workaround the problem.
>> > 
>> >   Section "Device"
>> >   Identifier  "Card0"
>> >   Driver  "modesetting"
>> >   BusID   "PCI:0:2:0"
>> >   Option  "PageFlip" "off"
>> >   EndSection
>> 
>> running GENERIC I got the following with xfce.
>> 
>> matches the trace in an earlier report from sthen@
>> https://marc.info/?l=openbsd-bugs=168234057913478=2
>> 
>> dpt_insert_entries+0xbc: movl 0x34(%r8),%r10d
>> r8   0x81938fe0
>> r10  0x1000
>> 
>>0x81ab0bc3 <+179>:   mov%r8,%rcx
>>0x81ab0bc6 <+182>:   add$0x20,%rcx
>>0x81ab0bca <+186>:   je 0x81ab0be8 
>> 
>>0x81ab0bcc <+188>:   mov0x34(%r8),%r10d
>>0x81ab0bd0 <+192>:   test   %r10d,%r10d
>>0x81ab0bd3 <+195>:   je 0x81ab0be8 
>> 
>> 
>> (gdb) info line *0x81ab0bcc
>> Line 34 of "/sys/dev/pci/drm/i915/i915_scatterlist.h"
>>starts at address 0x81ab0bc1 
>>and ends at 0x81ab0bd5 .
>> 
>> if (dma && s.sgp && sg_dma_len(s.sgp) == 0) {
>> 
>> dpt_insert_entries+0xbc
>> dpt_bind_vma+0x64
>> i915_vma_bind+0x317
>> i915_vma_pin_ww+0x44b
>> intel_plane_pin_fb+0x25c
>> intel_prepare_plane_pin_fb+0x12c
>> drm_atomic_helper_prepare_planes+0x5b
>> intel_atomic_commit+0xda
>> drm_atomic_helper_page_flip+0x77
>> drm_mode_page_flip_ioctl+0x466
>> drm_do_ioctl+0x285
>> drmioctl+0xdc
>> VOP_IOCTL+0x57
>> vn_ioctl+0x6c
> 
> The fix is to not reset the end of list marker when
> assigning a page.

Thanks.  I verified the diff fixed the problem.

> Index: sys/dev/pci/drm/include/linux/scatterlist.h
> ===
> RCS file: /cvs/src/sys/dev/pci/drm/include/linux/scatterlist.h,v
> retrieving revision 1.5
> diff -u -p -r1.5 scatterlist.h
> --- sys/dev/pci/drm/include/linux/scatterlist.h   1 Jan 2023 01:34:58 
> -   1.5
> +++ sys/dev/pci/drm/include/linux/scatterlist.h   2 Aug 2023 04:02:02 
> -
> @@ -119,7 +119,6 @@ sg_set_page(struct scatterlist *sgl, str
>   sgl->dma_address = page ? VM_PAGE_TO_PHYS(page) : 0;
>   sgl->offset = offset;
>   sgl->length = length;
> - sgl->end = false;
>  }
>  
>  #define sg_dma_address(sg)   ((sg)->dma_address)
> 



Re: taskq_next_work: page fault trap when staring Xfce

2023-08-01 Thread Jonathan Gray
On Mon, Jul 31, 2023 at 10:48:12PM +1000, Jonathan Gray wrote:
> On Sun, Jul 30, 2023 at 03:21:47PM +0900, YASUOKA Masahiko wrote:
> > Hello,
> > 
> > I got new vaio last week, the machine seems to have the same graphic
> > 
> >   inteldrm0 at pci0 dev 2 function 0 "Intel Graphics" rev 0x04
> >   drm0 at inteldrm0
> >   inteldrm0: msi, ALDERLAKE_P, gen 12
> > 
> > and has the same problem.  I found having Option "PageFlip" "off" in
> > /etc/X11/xorg.conf can workaround the problem.
> > 
> >   Section "Device"
> >   Identifier  "Card0"
> >   Driver  "modesetting"
> >   BusID   "PCI:0:2:0"
> >   Option  "PageFlip" "off"
> >   EndSection
> 
> running GENERIC I got the following with xfce.
> 
> matches the trace in an earlier report from sthen@
> https://marc.info/?l=openbsd-bugs=168234057913478=2
> 
> dpt_insert_entries+0xbc: movl 0x34(%r8),%r10d
> r80x81938fe0
> r10   0x1000
> 
>0x81ab0bc3 <+179>:   mov%r8,%rcx
>0x81ab0bc6 <+182>:   add$0x20,%rcx
>0x81ab0bca <+186>:   je 0x81ab0be8 
> 
>0x81ab0bcc <+188>:   mov0x34(%r8),%r10d
>0x81ab0bd0 <+192>:   test   %r10d,%r10d
>0x81ab0bd3 <+195>:   je 0x81ab0be8 
> 
> 
> (gdb) info line *0x81ab0bcc
> Line 34 of "/sys/dev/pci/drm/i915/i915_scatterlist.h"
>starts at address 0x81ab0bc1 
>and ends at 0x81ab0bd5 .
> 
> if (dma && s.sgp && sg_dma_len(s.sgp) == 0) {
> 
> dpt_insert_entries+0xbc
> dpt_bind_vma+0x64
> i915_vma_bind+0x317
> i915_vma_pin_ww+0x44b
> intel_plane_pin_fb+0x25c
> intel_prepare_plane_pin_fb+0x12c
> drm_atomic_helper_prepare_planes+0x5b
> intel_atomic_commit+0xda
> drm_atomic_helper_page_flip+0x77
> drm_mode_page_flip_ioctl+0x466
> drm_do_ioctl+0x285
> drmioctl+0xdc
> VOP_IOCTL+0x57
> vn_ioctl+0x6c

The fix is to not reset the end of list marker when
assigning a page.

Index: sys/dev/pci/drm/include/linux/scatterlist.h
===
RCS file: /cvs/src/sys/dev/pci/drm/include/linux/scatterlist.h,v
retrieving revision 1.5
diff -u -p -r1.5 scatterlist.h
--- sys/dev/pci/drm/include/linux/scatterlist.h 1 Jan 2023 01:34:58 -   
1.5
+++ sys/dev/pci/drm/include/linux/scatterlist.h 2 Aug 2023 04:02:02 -
@@ -119,7 +119,6 @@ sg_set_page(struct scatterlist *sgl, str
sgl->dma_address = page ? VM_PAGE_TO_PHYS(page) : 0;
sgl->offset = offset;
sgl->length = length;
-   sgl->end = false;
 }
 
 #define sg_dma_address(sg) ((sg)->dma_address)



Re: taskq_next_work: page fault trap when staring Xfce

2023-07-31 Thread Jonathan Gray
On Sun, Jul 30, 2023 at 03:21:47PM +0900, YASUOKA Masahiko wrote:
> Hello,
> 
> I got new vaio last week, the machine seems to have the same graphic
> 
>   inteldrm0 at pci0 dev 2 function 0 "Intel Graphics" rev 0x04
>   drm0 at inteldrm0
>   inteldrm0: msi, ALDERLAKE_P, gen 12
> 
> and has the same problem.  I found having Option "PageFlip" "off" in
> /etc/X11/xorg.conf can workaround the problem.
> 
>   Section "Device"
>   Identifier  "Card0"
>   Driver  "modesetting"
>   BusID   "PCI:0:2:0"
>   Option  "PageFlip" "off"
>   EndSection

running GENERIC I got the following with xfce.

matches the trace in an earlier report from sthen@
https://marc.info/?l=openbsd-bugs=168234057913478=2

dpt_insert_entries+0xbc: movl 0x34(%r8),%r10d
r8  0x81938fe0
r10 0x1000

   0x81ab0bc3 <+179>:   mov%r8,%rcx
   0x81ab0bc6 <+182>:   add$0x20,%rcx
   0x81ab0bca <+186>:   je 0x81ab0be8 

   0x81ab0bcc <+188>:   mov0x34(%r8),%r10d
   0x81ab0bd0 <+192>:   test   %r10d,%r10d
   0x81ab0bd3 <+195>:   je 0x81ab0be8 


(gdb) info line *0x81ab0bcc
Line 34 of "/sys/dev/pci/drm/i915/i915_scatterlist.h"
   starts at address 0x81ab0bc1 
   and ends at 0x81ab0bd5 .

if (dma && s.sgp && sg_dma_len(s.sgp) == 0) {

dpt_insert_entries+0xbc
dpt_bind_vma+0x64
i915_vma_bind+0x317
i915_vma_pin_ww+0x44b
intel_plane_pin_fb+0x25c
intel_prepare_plane_pin_fb+0x12c
drm_atomic_helper_prepare_planes+0x5b
intel_atomic_commit+0xda
drm_atomic_helper_page_flip+0x77
drm_mode_page_flip_ioctl+0x466
drm_do_ioctl+0x285
drmioctl+0xdc
VOP_IOCTL+0x57
vn_ioctl+0x6c



Re: taskq_next_work: page fault trap when staring Xfce

2023-07-30 Thread Jonathan Gray
On Wed, Jul 26, 2023 at 02:53:42PM +, Klemens Nanni wrote:
> startxfce4 in ~/.xsession leaves the screen black immediately after
> login from xenodm on an Intel T14g3 with latest snap and packages,
> sometimes it hangs completely and needs a hard reset, but this time
> I could switch to ttyC0 and use DDB:
> 
> 
> uvm_fault(0x825b0130, 0x820a8014, 0, 1) -> e
> uvm_fault(0x825b0130, 0x, 0, 2) -> e
> kernel: page fault trap, code=2
> Stopped at  taskq_next_work+0x80:   movq%rcx,0(%rdx)
> TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
>350x12  01  Xorg
> 0 0x14000  0x2004  drmtskl
> 0 0x14000  0x2000K drmwq
> 0 0x14000  0x2003  drmwq
> 0 0x14000  0x2002  drmwq
> 0 0x14000  0x2005  drmwq
> taskq_next_work(80044cf00, 800023153ef0) at taskq_next_work+0x80
> task_thread(80044cf00) at task_thread+0xeb
> end trace frame: 0x0, count: 13
> 
> 
> The graphics stack on this machine has always been unstable.
> Back at m2k23 I could not even use Qt programs like telegram-desktop
> without artifacts/glitches/hangs/crashes, but something improved and it
> is almost stable, i.e. firefox + telegram-desktop + gui apps maybe hang
> the machine once a week on GENERIC.MP when I'm unlucky.
> 'disable inteldrm' is stable (but yields other bugs in Qt apps).
> 
> 
> Xfce4, however, I have never been able to start in the first place.
> 
> Anything I should look for in DDB next time?
> Happy to poke at this in case anyone has a clue what's going on.

I tried xfce on 21AH t14 gen 3.

The first time, everything seemed fine.

The second time:
panic: pmap_get_ptp: unmanaged user PTP

another time with WITNESS
chillbufs+0xc6: movq %r8,0x8(%rdx)
r8 0x8251a868 cleancache+0x18 cachepages
rdx 0xc8abc8abd8fde6c7
Line 1765 of "/sys/kern/vfs_bio.c"
TAILQ_REMOVE(queue, bp, b_freelist);

chillbufs+0xc6
bufcache_release+0x10a
brelse+0x96
ffs_read+0x203
VOP_READ+0x45
uvn_io+0x26b
uvn_get+0x15d
uvm_fault_lower+0x336
uvm_fault+0x1b3
upageflttrap+0x65
usertrap+0x1ee
recall_trap+0x8

*xfsettingsd

removing ~/.config/xfce4/ before starting X, xfce starts again

There appears to be some kind of memory corruption.

often it is just
uvm_fault(0x82519940, 0x819e0014, 0, 1) -> e
and a hang



Re: taskq_next_work: page fault trap when staring Xfce

2023-07-30 Thread Klemens Nanni
On Sun, Jul 30, 2023 at 03:21:47PM +0900, YASUOKA Masahiko wrote:
> Hello,
> 
> I got new vaio last week, the machine seems to have the same graphic
> 
>   inteldrm0 at pci0 dev 2 function 0 "Intel Graphics" rev 0x04
>   drm0 at inteldrm0
>   inteldrm0: msi, ALDERLAKE_P, gen 12
> 
> and has the same problem.  I found having Option "PageFlip" "off" in
> /etc/X11/xorg.conf can workaround the problem.
> 
>   Section "Device"
>   Identifier  "Card0"
>   Driver  "modesetting"
>   BusID   "PCI:0:2:0"
>   Option  "PageFlip" "off"
>   EndSection

That starts Xfce for the first time on my machine, games/0ad now also
starts and seems actually playable (regardless of DE/WM, before it
always had arifacts and promptly hang in the menu).

I'll run this xorg.conf snippet and report back in a while,
thanks a lot.

> 
> Thanks,
> 
> On Wed, 26 Jul 2023 14:53:42 +
> Klemens Nanni  wrote:
> > startxfce4 in ~/.xsession leaves the screen black immediately after
> > login from xenodm on an Intel T14g3 with latest snap and packages,
> > sometimes it hangs completely and needs a hard reset, but this time
> > I could switch to ttyC0 and use DDB:
> > 
> > 
> > uvm_fault(0x825b0130, 0x820a8014, 0, 1) -> e
> > uvm_fault(0x825b0130, 0x, 0, 2) -> e
> > kernel: page fault trap, code=2
> > Stopped at  taskq_next_work+0x80:   movq%rcx,0(%rdx)
> > TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> >350x12  01  Xorg
> > 0 0x14000  0x2004  drmtskl
> > 0 0x14000  0x2000K drmwq
> > 0 0x14000  0x2003  drmwq
> > 0 0x14000  0x2002  drmwq
> > 0 0x14000  0x2005  drmwq
> > taskq_next_work(80044cf00, 800023153ef0) at taskq_next_work+0x80
> > task_thread(80044cf00) at task_thread+0xeb
> > end trace frame: 0x0, count: 13
> > 
> > 
> > The graphics stack on this machine has always been unstable.
> > Back at m2k23 I could not even use Qt programs like telegram-desktop
> > without artifacts/glitches/hangs/crashes, but something improved and it
> > is almost stable, i.e. firefox + telegram-desktop + gui apps maybe hang
> > the machine once a week on GENERIC.MP when I'm unlucky.
> > 'disable inteldrm' is stable (but yields other bugs in Qt apps).
> > 
> > 
> > Xfce4, however, I have never been able to start in the first place.
> > 
> > Anything I should look for in DDB next time?
> > Happy to poke at this in case anyone has a clue what's going on.
> > 
> > 
> > OpenBSD 7.3-current (GENERIC.MP) #1312: Mon Jul 24 23:41:13 MDT 2023
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 51214807040 (48842MB)
> > avail mem = 49642967040 (47343MB)
> > random: good seed from bootblocks
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 3.4 @ 0x900a3000 (80 entries)
> > bios0: vendor LENOVO version "N3MET16W (1.15 )" date 06/25/2023
> > bios0: LENOVO 21AHCTO1WW
> > efi0 at bios0: UEFI 2.7
> > efi0: Lenovo rev 0x1150
> > acpi0 at bios0: ACPI 6.3
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT SSDT SSDT SSDT SSDT TPM2 HPET APIC MCFG ECDT 
> > SSDT SSDT SSDT SSDT SSDT SSDT LPIT WSMT SSDT DBGP DBG2 NHLT MSDM SSDT BATB 
> > DMAR SSDT SSDT SSDT ASF! BGRT PHAT UEFI FPDT
> > acpi0: wakeup devices PEG0(S4) PEGP(S4) PEGP(S4) PEG2(S4) PEGP(S4) GLAN(S4) 
> > XHCI(S3) XDCI(S4) HDAS(S4) CNVW(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) 
> > RP03(S4) PXSX(S4) [...]
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpihpet0 at acpi0: 1920 Hz
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: 12th Gen Intel(R) Core(TM) i7-1270P, 2095.31 MHz, 06-9a-03
> > cpu0: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PT,SHA,UMIP,PKU,WAITPKG,PKS,MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
> > cpu0: 48KB 64b/line 12-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 
> > 64b/line 10-way L2 cache, 18MB 64b/line 12-way L3 cache
> > cpu0: smt 0, core 0, package 0
> > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 38MHz
> > cpu0: mwait min=64, max=64, C-substates=0.2.0.2.0.1.0.1, IBE
> > cpu1 at mainbus0: apid 8 (application processor)
> > cpu1: 12th Gen Intel(R) Core(TM) i7-1270P, 2095.30 MHz, 06-9a-03
> > cpu1: 
> > 

Re: taskq_next_work: page fault trap when staring Xfce

2023-07-30 Thread YASUOKA Masahiko
Hello,

I got new vaio last week, the machine seems to have the same graphic

  inteldrm0 at pci0 dev 2 function 0 "Intel Graphics" rev 0x04
  drm0 at inteldrm0
  inteldrm0: msi, ALDERLAKE_P, gen 12

and has the same problem.  I found having Option "PageFlip" "off" in
/etc/X11/xorg.conf can workaround the problem.

  Section "Device"
  Identifier  "Card0"
  Driver  "modesetting"
  BusID   "PCI:0:2:0"
  Option  "PageFlip" "off"
  EndSection

Thanks,

On Wed, 26 Jul 2023 14:53:42 +
Klemens Nanni  wrote:
> startxfce4 in ~/.xsession leaves the screen black immediately after
> login from xenodm on an Intel T14g3 with latest snap and packages,
> sometimes it hangs completely and needs a hard reset, but this time
> I could switch to ttyC0 and use DDB:
> 
> 
> uvm_fault(0x825b0130, 0x820a8014, 0, 1) -> e
> uvm_fault(0x825b0130, 0x, 0, 2) -> e
> kernel: page fault trap, code=2
> Stopped at  taskq_next_work+0x80:   movq%rcx,0(%rdx)
> TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
>350x12  01  Xorg
> 0 0x14000  0x2004  drmtskl
> 0 0x14000  0x2000K drmwq
> 0 0x14000  0x2003  drmwq
> 0 0x14000  0x2002  drmwq
> 0 0x14000  0x2005  drmwq
> taskq_next_work(80044cf00, 800023153ef0) at taskq_next_work+0x80
> task_thread(80044cf00) at task_thread+0xeb
> end trace frame: 0x0, count: 13
> 
> 
> The graphics stack on this machine has always been unstable.
> Back at m2k23 I could not even use Qt programs like telegram-desktop
> without artifacts/glitches/hangs/crashes, but something improved and it
> is almost stable, i.e. firefox + telegram-desktop + gui apps maybe hang
> the machine once a week on GENERIC.MP when I'm unlucky.
> 'disable inteldrm' is stable (but yields other bugs in Qt apps).
> 
> 
> Xfce4, however, I have never been able to start in the first place.
> 
> Anything I should look for in DDB next time?
> Happy to poke at this in case anyone has a clue what's going on.
> 
> 
> OpenBSD 7.3-current (GENERIC.MP) #1312: Mon Jul 24 23:41:13 MDT 2023
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 51214807040 (48842MB)
> avail mem = 49642967040 (47343MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.4 @ 0x900a3000 (80 entries)
> bios0: vendor LENOVO version "N3MET16W (1.15 )" date 06/25/2023
> bios0: LENOVO 21AHCTO1WW
> efi0 at bios0: UEFI 2.7
> efi0: Lenovo rev 0x1150
> acpi0 at bios0: ACPI 6.3
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT SSDT SSDT SSDT SSDT TPM2 HPET APIC MCFG ECDT 
> SSDT SSDT SSDT SSDT SSDT SSDT LPIT WSMT SSDT DBGP DBG2 NHLT MSDM SSDT BATB 
> DMAR SSDT SSDT SSDT ASF! BGRT PHAT UEFI FPDT
> acpi0: wakeup devices PEG0(S4) PEGP(S4) PEGP(S4) PEG2(S4) PEGP(S4) GLAN(S4) 
> XHCI(S3) XDCI(S4) HDAS(S4) CNVW(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) 
> RP03(S4) PXSX(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 1920 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: 12th Gen Intel(R) Core(TM) i7-1270P, 2095.31 MHz, 06-9a-03
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PT,SHA,UMIP,PKU,WAITPKG,PKS,MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
> cpu0: 48KB 64b/line 12-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 
> 10-way L2 cache, 18MB 64b/line 12-way L3 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 38MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.0.2.0.1.0.1, IBE
> cpu1 at mainbus0: apid 8 (application processor)
> cpu1: 12th Gen Intel(R) Core(TM) i7-1270P, 2095.30 MHz, 06-9a-03
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PT,SHA,UMIP,PKU,PKS,MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
> cpu1: 48KB 64b/line 12-way D-cache, 32KB