Re: Fatal trap 12

2018-05-30 Thread Manuel Stühn

On Sat, May 26, 2018 at 01:46:42PM +0200, Manuel Stühn wrote:

Since upgrading my Lenovo T450 from r333740 to r334167 I'm experiencing
several "Fatal traps 12". Before the update i did not have any of those.
In all cases the traps occured some time after resume.



I tried to debug this further by building different kernel versions (all 
GENERIC-NODEBUG). The last working revision is r334117, the first not 
working is r334123. Revisions 334118-334122 of the kernel did not build, 
so i cannot try these.


Any ideas what could cause these issue?

--
Manuel 
___

freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Fatal trap 12

2018-05-26 Thread Manuel Stühn

On Sat, May 26, 2018 at 08:32:17PM +0800, blubee blubeeme wrote:


  Aren't you the guy using the drm-kmod if yes, your custom complied kernel
  and not the default kernel causing those issues.
  Best,
  Owen


I'm indeed using graphics/drm-stable-kmod, but i do not use a custom 
kernel:

uname -rsmv
FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #8 r334167: Thu May 24 
20:06:20 CEST 2018 
root@valinor:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64


The drm-stable-kmod was installed from ports with the corresponding 
src-tree.


--
Manuel
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Fatal trap 12

2018-05-26 Thread Manuel Stühn
Since upgrading my Lenovo T450 from r333740 to r334167 I'm experiencing 
several "Fatal traps 12". Before the update i did not have any of those.  
In all cases the traps occured some time after resume.


Below there is some output found in /var/crash/core.txt

__curthread () at ./machine/pcpu.h:231
231 ./machine/pcpu.h: No such file or directory.
(kgdb) #0  __curthread () at ./machine/pcpu.h:231
#1  doadump (textdump=1) at /usr/src/sys/kern/kern_shutdown.c:366
#2  0x80b9a6f0 in kern_reboot (howto=260)
   at /usr/src/sys/kern/kern_shutdown.c:446
#3  0x80b9ab83 in vpanic (fmt=, 
ap=0xfe0056507e50)

   at /usr/src/sys/kern/kern_shutdown.c:863
#4  0x80b9a973 in panic (fmt=)
   at /usr/src/sys/kern/kern_shutdown.c:790
#5  0x80ba5c3b in kdb_switch () at 
/usr/src/sys/kern/kern_synch.c:377

#6  0x80ba5bb9 in mi_switch (flags=, newtd=0x0)
   at /usr/src/sys/kern/kern_synch.c:406
#7  0x80bf3f5f in sleepq_timedwait (wchan=, 
pri=) at /usr/src/sys/kern/subr_sleepqueue.c:727
#8  0x833c7bed in linux_add_to_sleepqueue 
(wchan=0xf8000bf6ad80, task=0xf8000bf6ad80, wmesg=out>, timeout=50, state=)

   at /usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c:70
#9  0x833c7a58 in linux_wait_event_common (wqh=, 
wq=, timeout=50, state=2, lock=0x0)

   at /usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c:270
#10 0x83458de6 in ?? ()
#11 0x00061d026200 in ?? ()
#12 0x0006 in ?? ()
#13 0xf8000bf6ad80 in ?? ()
#14 0x833c7540 in ?? ()
   at /usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c:167
  from /boot/kernel/linuxkpi.ko
#15 0xf80007804828 in ?? ()
#16 0xf80007804828 in ?? ()
#17 0x0030 in ?? ()
#18 0x in ?? ()
(kgdb) 



Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0x3
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80cc60cb
stack pointer   = 0x28:0xfe0056508560
frame pointer   = 0x28:0xfe0056508760
code segment= base 0x0, limit 0xf, type 0x1b
   = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 10218 (nextcloud)
--
Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x30011
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80cc60cb
stack pointer   = 0x28:0xfe005e4d1560
frame pointer   = 0x28:0xfe005e4d1760
code segment= base 0x0, limit 0xf, type 0x1b
   = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 17918 (DNS Resolver #16)
--
Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0x3
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80cc60cb
stack pointer   = 0x28:0xfe0056508560
frame pointer   = 0x28:0xfe0056508760
code segment= base 0x0, limit 0xf, type 0x1b
   = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 10218 (nextcloud)

If there is any other information i can provide for solving this, please 
let me know.


--
Manuel
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Regression Resume Lenovo T450

2018-05-10 Thread Manuel Stühn

On Wed, May 09, 2018 at 10:06:19AM +0200, Niclas Zeising wrote:

On 05/08/18 22:09, Manuel Stühn wrote:



P.S.
I'm useing drm-stable-kmod, drm-next-kmod did not work for me.


What issues are you seeing with drm-next-kmod?


I mixed my machines up. The one showing problems with drm-next was the 
T420:

https://lists.freebsd.org/pipermail/freebsd-current/2018-March/068725.html

On my T450 i've never installed drm-next, only drm-stable-kmod.

--
Manuel

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Regression Resume Lenovo T450

2018-05-08 Thread Manuel Stühn

On Tue, May 08, 2018 at 11:16:48AM +0300, Ilya A. Arkhipov wrote:

Hi,

I have same issue (thinkpad T450s) after resume notebook cant wake up
but on:
 FreeBSD 12.0-CURRENT #0 r332796: Fri Apr 20 00:42:44 UTC 2018
r...@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
with:
drm-next-kmod-4.11.g20180224
gpu-firmware-kmod-g20180206_1

# sysctl debug.bootverbose=1
# sysctl debug.acpi.suspend_bounce=1

In log (I think it related):
May  8 01:05:06 m1cro kernel: vgapci0: child drmn0 requested
pci_set_powerstate
May  8 01:05:06 m1cro kernel: pci0:0:2:0: Transition from D0 to D3
May  8 01:05:06 m1cro kernel: pci0: set ACPI power state D3 on
\_SB_.PCI0.VID_
May  8 01:05:06 m1cro kernel: pci0: failed to set ACPI power state D3 on
\_SB_.PCI0.VID_: AE_BAD_PARAMETER

where pci0:0:2:0:
vgapci0@pci0:0:2:0: class=0x03 card=0x503617aa chip=0x16168086
rev=0x09 hdr=0x00
    vendor = 'Intel Corporation'
    device = 'HD Graphics 5500'
    class  = display
    subclass   = VGA


My T450 does resume now with an current CURRENT(r333291), but 
unfortunately i do not know why...
I tried to track down the phenomenon. I saw that the kernel seemed not 
to be involved in this matter, since the old BE equipped with a new 
kernel was able to resume. I cloned the BE capable of resuming and 
startet copying userland-stuff from the "default" BE to this BE. Stuff 
was like bin/sbin/lib/libexec folders from / and /usr and so on. It 
stayed able to resume! Then i made an installworld/installkernel of 
r333291 into this BE, (but without mergemaster)! Even after this it 
stayed able to resume!  Then I backed up the /etc folder of my "default" 
BE (which was not able to resume) and copied the /etc from the old BE to 
"default". After this, "default" was also able to resume again! 

Long story short, i'm happy my machine resumes again, but i do not have 
a clue why...



P.S.
I'm useing drm-stable-kmod, drm-next-kmod did not work for me.

--
Manuel
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Regression Resume Lenovo T450

2018-05-06 Thread Manuel Stühn

On Fri, May 04, 2018 at 08:07:17AM +0200, Manuel Stühn wrote:


Since some time now CURRENT runs very smoothly on my Lenovo T450 in
conjunction with drm-stable-kmod installed. WLAN, Suspense worked
out of the box (at least ... until now). Due to pkg(8) complaining about
wrong ABI of packages, I've made an update from r332385 (1200061) to
r333091 (1200062), and now the T450 does not resume anymore; i have to
hold the power button for some time to power it down. The
ZFS-Boot-Environment I've made beforehand updating is still capable of
resuming.

I tried to find out which commit broke the resume for me by installing
older kernels, but even installing r332385 kernel (into the actual
r333091 userland) does not restore its capability to resume.



Some more testing has happened:

Since I have a BootEnvironment capable of suspend/resume, I've tried 
some combinations of kernels (in fact, whole boot-folders) and 
unserlands. I copied the boot-folder from the BE r332385 (which works) 
into the current BE and restarted. This combination was NOT able to 
resume. But the other way around is (current boot-folder (r333091) in 
the r332385 based BootEnvironment)


It seems to me, that not the kernel but either some change in userland 
or package broke the resume somehow. But I do not have a clue, which of 
those even can impact the resume procedure at all. Two packages came to 
my mind:


1. graphics/drm-stable-kmod, but the installed packages are identical 
for both, the "old" and the current BE. (both packages are installed 
from ports along with the respective buildworld+buildkernel)


2. The firmwares used by sysutils/cpupdate, but after replacing the 
firmware files with the firmwares from the old BE resume still doesn't 
work.


Any ideas?

--
Manuel

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Regression Resume Lenovo T450

2018-05-05 Thread Manuel Stühn

On Fri, May 04, 2018 at 11:05:16AM -0700, Pete Wright wrote:



On 05/03/2018 23:07, Manuel Stühn wrote:


Since some time now CURRENT runs very smoothly on my Lenovo T450 in
conjunction with drm-stable-kmod installed. WLAN, Suspense
worked out of the box (at least ... until now). Due to pkg(8)
complaining about wrong ABI of packages, I've made an update from
r332385 (1200061) to r333091 (1200062), and now the T450 does not
resume anymore; i have to hold the power button for some time to power
it down. The ZFS-Boot-Environment I've made beforehand updating is
still capable of resuming.

I tried to find out which commit broke the resume for me by installing
older kernels, but even installing r332385 kernel (into the actual
r333091 userland) does not restore its capability to resume.

Any ideas or hints? Which information can i provide to help
investigating this matter?


have you tried suspend/resume without having the drm-next kmod loaded? 


Same effect. No resume...

--
Manuel

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Regression Resume Lenovo T450

2018-05-04 Thread Manuel Stühn


Since some time now CURRENT runs very smoothly on my Lenovo T450 in 
conjunction with drm-stable-kmod installed. WLAN, Suspense worked 
out of the box (at least ... until now). Due to pkg(8) complaining about 
wrong ABI of packages, I've made an update from r332385 (1200061) to 
r333091 (1200062), and now the T450 does not resume anymore; i have to 
hold the power button for some time to power it down. The 
ZFS-Boot-Environment I've made beforehand updating is still capable of 
resuming.


I tried to find out which commit broke the resume for me by installing 
older kernels, but even installing r332385 kernel (into the actual 
r333091 userland) does not restore its capability to resume.


Any ideas or hints? Which information can i provide to help 
investigating this matter?


-- Manuel 
___

freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: drm-next-kmod regression

2018-03-02 Thread Manuel Stühn

On Sat, Mar 03, 2018 at 06:24:55AM +0100, Jan Beich wrote:

Manuel Stühn <freebsdnew...@freenet.de> writes:


Hi,
the last drm-next-kmod worked fine on my Lenovo T420 with i5-2520M and
a HD Graphics 3000. After the update to the actual version (4.11) from
ports, I'm seeing regression in form of a very slow xfce4-desktop. The
slowness starts after some short time. Slow means for example that I
can type faster than the terminal prints the chars or when i move
windows they lag extremely behind the mouse's motion.

One entry in Xorg.0.log caught my attention:
[   128.266] (EE) intel(0): Failed to submit rendering commands (Bad
address), disabling acceleration.


Did you build xf86-video-intel with SNA option enabled or have
Option "AccelMethod" "SNA" in xorg.conf? If so see also


# pkg info xf86-video-intel-2.99.917.20180214 | grep -A2 Options
Options:
   SNA: off 
   UXA: on   

# cat /usr/local/etc/X11/xorg.conf.d/driver-intel-mode.conf   
Section "Device"

   Identifier  "Intel Graphics"
   Driver  "intel"
   Option  "AccelMethod"   "sna"
   Option  "TearFree"   "true"
EndSection

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: drm-next-kmod regression

2018-03-02 Thread Manuel Stühn

On Fri, Mar 02, 2018 at 08:52:14PM +0100, Hans Petter Selasky wrote:

On 03/02/18 17:40, Manuel Stühn wrote:

Hi,
the last drm-next-kmod worked fine on my Lenovo T420 with i5-2520M and a
HD Graphics 3000. After the update to the actual version (4.11) from
ports, I'm seeing regression in form of a very slow xfce4-desktop. The
slowness starts after some short time. Slow means for example that I can
type faster than the terminal prints the chars or when i move windows
they lag extremely behind the mouse's motion.

One entry in Xorg.0.log caught my attention:
[   128.266] (EE) intel(0): Failed to submit rendering commands (Bad
address), disabling acceleration.

Disabling the xfce4-compositor improves the situation significantly, but
not entirely.

Switching back to the systems i915 driver resolves the issue.

Any ideas?



Which version of FreeBSD is this. Are you using the latest kernel 
sources?


uname -a
FreeBSD freebsd-t420 12.0-CURRENT FreeBSD 12.0-CURRENT #11 r330283: Fri 
Mar  2 17:35:08 CET 2018 
root@valinor:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64



Did you build drm-next-kmod from source?


Yes, ports from today built against the revision mentioned above. 



___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


drm-next-kmod regression

2018-03-02 Thread Manuel Stühn

Hi,
the last drm-next-kmod worked fine on my Lenovo T420 with i5-2520M and a 
HD Graphics 3000. After the update to the actual version (4.11) from 
ports, I'm seeing regression in form of a very slow xfce4-desktop. The 
slowness starts after some short time. Slow means for example that I can 
type faster than the terminal prints the chars or when i move windows 
they lag extremely behind the mouse's motion.


One entry in Xorg.0.log caught my attention:
[   128.266] (EE) intel(0): Failed to submit rendering commands (Bad 
address), disabling acceleration.


Disabling the xfce4-compositor improves the situation significantly, but 
not entirely.


Switching back to the systems i915 driver resolves the issue.

Any ideas?

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: regression suspend/resume on Lenovo T420

2017-05-15 Thread Manuel Stühn

On Mon, 15 May 2017 12:56:47 +0300, Konstantin Belousov wrote

On Sun, May 14, 2017 at 08:02:52PM +, Poul-Henning Kamp wrote:


In message <20170514193006.GA1298@brick>, Edward Tomasz =?utf-8?Q?Napiera=C5=82
a?= writes:


I've tried to verify that, and sadly it wasn't it for me.  The commit
that does break resume for me is r316767.  The current -CURRENT with
this one commit reverted ("svn merge -c -r316767 .") suspends and resumes
correctly, at least in VT; I decided to take X out of the picture for
now.


I can confirm that this also makes resume work on my T430s running:

FreeBSD 12.0-CURRENT #0 r318250M amd64


Try this.  If it works, I will write a proper patch.

diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 33437ad16e6..9c0cd05ebea 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -369,6 +369,11 @@ END(savectx)
   * Resuming processor state from pcb.
   */
  ENTRY(resumectx)
+   movl$MSR_EFER,%ecx
+   rdmsr
+   orl $EFER_NXE,%eax
+   wrmsr
+
/* Switch to KPML4phys. */
movqKPML4phys,%rax
movq%rax,%cr3



This patch makes resume work on my machine also (at least in VT; X is 
unfortunately still not working).




___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: regression suspend/resume on Lenovo T420

2017-05-06 Thread Manuel Stühn

On Sat, May 06, 2017 at 10:52:56AM +0200, Manuel Stühn wrote:

On Wed, 03 May 2017 22:28:41 +0200, Freebsdnewbie wrote



Von: Adrian Chadd
Gesendet: Mo. 01.05.2017 23:31
An: Manuel Stühn ,
Kopie: freebsd-current ,
Betreff: Re: regression suspend/resume on Lenovo T420

There were lots of commits that could break things. :-)


Can you compile up some intermediary versions between 315141 and
r317559 to find which commit range broke things? That'll make chasing
it down much quicker!



I'm following your advice and building some intermediary versions. This will 
take some time...


So, after keep building some more worlds i've discovered the commit
after which resume does not work anymore. r316736 is the last working
one, r316737 breaks it for me (There is also no mouse cursor on the
console anymore after this commit).


Sorry, my fault: r316734 was the last working revision!!

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: regression suspend/resume on Lenovo T420

2017-05-06 Thread Manuel Stühn

On Wed, 03 May 2017 22:28:41 +0200, Freebsdnewbie wrote
   

Von: Adrian Chadd
Gesendet: Mo. 01.05.2017 23:31
An: Manuel Stühn ,
Kopie: freebsd-current ,
Betreff: Re: regression suspend/resume on Lenovo T420

There were lots of commits that could break things. :-)


Can you compile up some intermediary versions between 315141 and
r317559 to find which commit range broke things? That'll make chasing
it down much quicker!



I'm following your advice and building some intermediary versions. This will 
take some time...


So, after keep building some more worlds i've discovered the commit 
after which resume does not work anymore. r316736 is the last working 
one, r316737 breaks it for me (There is also no mouse cursor on the 
console anymore after this commit).


Any hints?

Thanks.

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

regression suspend/resume on Lenovo T420

2017-04-29 Thread Manuel Stühn

Hi,
I'd been sucessfully running CURRENT on my Lenovo T420 with functional 
suspend/resume since some time. But after updating to CURRENT r317032 
respectively r317559 suspend/resume does not work anymore. Putting it 
into suspend results only in a black screen, but no further action is 
possible (only pressing the powerbutton for some time to switch it off 
completely). The LEDs are not indicating any suspend mode.
If i try to suspend it with X (intel-driver) stopped, the laptop does 
switch into suspend, but does not resume. It runs into some kind of 
resuming endless loop, where it tries to start the laptop again but at a 
certain point it restarts again. The screen stays dark all the time.


I tried this with and without the following options but the same result.
hw.acpi.reset_video=1
dev.acpi_ibm.0.handlerevents='0x04'

Booting a Bootenvironment with an older CURRENT(r315141), all is 
working.  Was there any change between these commits concerning 
suspend/resume?


BR
Manuel
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"