Re: Regression Resume Lenovo T450

2018-05-08 Thread Ilya A. Arkhipov

On 06.05.2018 10:28, Manuel Stühn wrote:

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"

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


___
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: make -C weirdness

2017-11-09 Thread Ilya A . Arkhipov
01.11.2017, 22:17, "Sergey V. Dyatko" <sergey.dya...@gmail.com>:
> Hi,
>
> Long time ago I wrote 2 simple aliases to my .cshrc:
>
> search_key make -C /usr/ports/ search key='!*' display=name,path,info
> search_name make -C /usr/ports/ search name='!*' display=port,path,info
>
> it works fine starting from 7-CURRENT IIRC.
> Today I tried to find some (existing) port and can't, for example:
> [tiger@laptop]:/>make -C /usr/ports/ search name=teeworlds
> display=name,path,info
> [tiger@laptop]:/>
> but
> [tiger@laptop]:/>cd /usr/ports/
> [tiger@laptop]:/usr/ports>make search name=teeworlds display=name,path,info
> Port: teeworlds-0.6.4_4
> Path: /usr/ports/games/teeworlds
> Info: Platform game featuring buggers equipped with
> weapons
>
> it is on 12.0-CURRENT r324493
> I missed something or it is a bug?
>
> --
> wbr, Sergey
>
> ___
> 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"

FYI: https://reviews.freebsd.org/D13019

-- 
With Best Regards,
Ilya A. Arkhipov
___
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"


[pkg base][pormaster] Origin for base packages = "base"

2017-08-14 Thread Ilya A . Arkhipov
Hi there,

After upgrade my system(r322368) to pkg-base system(have 780 packages for world 
and kernel) I got next issue:
[11:53am] root:/root # portmaster -a
===>>> Gathering distinfo list for installed ports

===>>> Starting check of installed ports for available updates


===>>> Is /usr/ports/base/Makefile missing?
===>>> Aborting update

[11:53am] root:/root # cat /usr/ports/base/Makefile
# $FreeBSD: head/base/Makefile 425903 2016-11-11 18:51:42Z bapt $

# Never add SUBDIRS here as the ports should not be connected to the build
#
.include 


Looks like it related with Origin in base ports:

pkg info -f FreeBSD-kernel-microkernel-12.0.s20170811101514
FreeBSD-kernel-microkernel-12.0.s20170811101514
Name   : FreeBSD-kernel-microkernel
Version: 12.0.s20170811101514
Installed on   : Fri Aug 11 18:00:03 2017 MSK
Origin : base  <===
Categories : base
Licenses   : BSD2CLAUSE
Maintainer : r...@freebsd.org
WWW: https://www.FreeBSD.org
Comment: FreeBSD MICROKERNEL kernel
Annotations:
repo_type  : binary
repository : FreeBSD-base
Flat size  : 115MiB
Description:
FreeBSD MICROKERNEL kernel


portmaster do a:
port_ver=`pm_make -V PKGNAME`
[ -z "$port_ver" ] && fail "Is $pd/$origin/Makefile missing?"
and sure it will empty for $origin = base.

For me I did:
1767 >---if [ "$origin" = "base" ]; then    
 
1768 >--->---:

Anybody have the same issue?

-- 
With Best Regards,
Ilya A. Arkhipov
___
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: [bmake] bmake sigint handling causing tty corruption

2017-07-25 Thread Ilya A . Arkhipov
19.07.2017, 16:00, "Dmitry Marakasov" <amd...@amdmi3.ru>:
> Hi!
>
> Me and Ilya Arkhipov were investigating the cause of this bug:
>
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215572
>
> In short, when FreeBSD ports options dialog is interrupted by Ctrl+C,
> there's chance of sporadic terminal corruption. They are not always
> reproducible and seem to be dependent on a machine, shell, terminal,
> tmux used, but are not tied to any specific configuration.
>
> The investigation led us to the following conclusion:
>
> - the corruption is caused by dialog4ports program (which handles ports
>   options dialogs) not being able to restore terminal state on exit
> - dialog4ports does indeed try to restore terminal state, but the
>   corresponding ioctl (TIOCSETAW) fails with EIO
> - examining kern/tty.c suggests that this happens likely because the make
>   which is the session leader or something dies before dialog4ports
> - which led us to bmake as a culprit
>
> Here's the ktrace of the problem (the process hierarchy here is make ->
> sh -> dialog4ports)
>
> ---
> 78337 dialog4ports CALL sigaction(SIGTSTP,0x800a80228,0)
> 78337 dialog4ports RET sigaction 0
> 78337 dialog4ports CALL clock_gettime(0xd,0x7fffde08)
> 78337 dialog4ports RET clock_gettime 0
> 78337 dialog4ports CALL gettimeofday(0x7fffdc90,0)
> 78337 dialog4ports RET gettimeofday 0
> 78337 dialog4ports CALL poll(0x7fffdca0,0x2,0x)
>
> (make and sh receive SIGINT first)
>
> 78265 make RET wait4 RESTART
> 78335 sh RET wait4 -1 errno 4 Interrupted system call
> 78265 make PSIG SIGINT caught handler=0x402530 mask=0x0 code=SI_KERNEL
> 78335 sh PSIG SIGINT caught handler=0x41b950 mask=0x0 code=SI_KERNEL
> 78265 make CALL lstat(0x800ab9900,0x7fffd1f0)
> 78265 make NAMI "do-config"
> 78335 sh CALL sigreturn(0x7fffd280)
> 78335 sh RET sigreturn JUSTRETURN
> 78265 make RET lstat -1 errno 2 No such file or directory
> 78335 sh CALL wait4(0x,0x7fffd6ec,0,0)
> 78265 make CALL sigaction(SIGINT,0x7fffd250,0x7fffd230)
> 78265 make RET sigaction 0
> 78265 make CALL kill(0x131b9,SIGINT)
> 78265 make RET kill 0
> 78265 make CALL sigreturn(0x7fffd2d0)
> 78265 make RET sigreturn JUSTRETURN
>
> (make kills itself)
>
> 78265 make PSIG SIGINT SIG_DFL code=SI_USER
>
> (dialog4ports finally starts to process the signal)
>
> 78337 dialog4ports RET poll -1 errno 4 Interrupted system call
> 78337 dialog4ports PSIG SIGINT caught handler=0x800855e00 mask=0x0 
> code=SI_KERNEL
> 78337 dialog4ports CALL sigaction(SIGINT,0x7fffd7c0,0)
> 78337 dialog4ports RET sigaction 0
> 78337 dialog4ports CALL ioctl(0x1,TIOCGETA,0x7fffd770)
> 78337 dialog4ports RET ioctl 0
> 78337 dialog4ports CALL write(0x1,0x801676a00,0x17)
> 78337 dialog4ports GIO fd 1 wrote 23 bytes
> 78337 dialog4ports RET write 23/0x17
>
> (this call should restore terminal state, but it fails)
>
> 78337 dialog4ports CALL ioctl(0x1,TIOCSETAW,0x80161604c)
> 78337 dialog4ports RET ioctl -1 errno 5 Input/output error
> 78337 dialog4ports CALL exit(0x1)
> ---
>
> Here's the ktrace of the case which didn't cause terminal corruption:
>
> ---
> 79506 dialog4ports CALL poll(0x7fffdc00,0x2,0x)
> 79506 dialog4ports RET poll -1 errno 4 Interrupted system call
>
> (dialog4ports is lucky enough to start processing the signal before make)
>
> 79506 dialog4ports PSIG SIGINT caught handler=0x800855e00 mask=0x0 
> code=SI_KERNEL
> 79506 dialog4ports CALL sigaction(SIGINT,0x7fffd720,0)
> 79506 dialog4ports RET sigaction 0
> 79506 dialog4ports CALL ioctl(0x1,TIOCGETA,0x7fffd6d0)
> 79506 dialog4ports RET ioctl 0
> 79506 dialog4ports CALL write(0x1,0x801676a00,0x17)
> 79506 dialog4ports GIO fd 1 wrote 23 bytes
> 79506 dialog4ports RET write 23/0x17
>
> (and cleanup succeeds)
>
> 79506 dialog4ports CALL ioctl(0x1,TIOCSETAW,0x80161604c)
> 79506 dialog4ports RET ioctl 0
> 79506 dialog4ports CALL exit(0x1)
> 79433 make RET wait4 RESTART
> 79433 make PSIG SIGINT caught handler=0x402530 mask=0x0 code=SI_KERNEL
> 79433 make CALL lstat(0x800ab4980,0x7fffd140)
> 79433 make NAMI "do-config"
> 79433 make RET lstat -1 errno 2 No such file or directory
> 79433 make CALL sigaction(SIGINT,0x7fffd1a0,0x7fffd180)
> 79433 make RET sigaction 0
> 79433 make CALL kill(0x13649,SIGINT)
> 79433 make RET kill 0
> 79433 make CALL sigreturn(0x7fffd220)
> 79433 make RET sigreturn JUSTRETURN
> 79433 make PSIG SIGINT SIG_DFL code=SI_USER
> 79504 sh RET wait4 -1 errno 4 Interrupted system call
> 79504 sh PSIG SIGINT caught handler=0x41b950 mask=0x0 code=SI_KERNEL
> 79504 sh CALL sigreturn(0x

Re: How building sys/boot

2017-01-25 Thread Ilya A . Arkhipov
Many thanks Dimitry for full definition

25.01.2017, 21:46, "Dimitry Andric" <d...@freebsd.org>:
> On 25 Jan 2017, at 14:58, Ilya A. Arkhipov <rum1...@yandex.ru> wrote:
>>  Somebody can explain to me how build sys/boot?
>>  Right now I doing:
>>  make -C sys/boot obj depend all
>>  And I get:
>>  cc -O2 -pipe -DSKEIN_LOOP=111 -fPIC -I/usr/src/sys/boot/efi/loader 
>> -I/usr/src/sys/boot/efi/loader/arch/amd64 
>> -I/usr/src/sys/boot/efi/loader/../include 
>> -I/usr/src/sys/boot/efi/loader/../include/amd64 
>> -I/usr/src/sys/boot/efi/loader/../../../contrib/dev/acpica/include 
>> -I/usr/src/sys/boot/efi/loader/../../.. 
>> -I/usr/src/sys/boot/efi/loader/../../i386/libi386 
>> -I/usr/src/sys/boot/efi/loader/../../zfs 
>> -I/usr/src/sys/boot/efi/loader/../../../cddl/boot/zfs 
>> -I/usr/src/sys/boot/efi/loader/../../../crypto/skein -DEFI_ZFS_BOOT -DNO_PCI 
>> -DEFI -DSMBIOS_SERIAL_NUMBERS -DBOOT_FORTH 
>> -I/usr/src/sys/boot/efi/loader/../../ficl 
>> -I/usr/src/sys/boot/efi/loader/../../ficl/amd64 -DLOADER_DISK_SUPPORT 
>> -DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -fPIC -I/usr/src/sys/boot/ficl 
>> -I/usr/src/sys/boot/ficl/amd64 -I/usr/src/sys/boot/ficl/../common 
>> -I/usr/src/sys/boot/efi/loader/../../common -ffreestanding -Wformat 
>> -msoft-float -mno-mmx -mno-sse -mno-avx -fshort-wchar -mno-red-zone -mno-aes 
>> -g -MD -MF.depend.zfs.o -
>>  MTzfs.o -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W 
>> -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes 
>> -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body 
>> -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare 
>> -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function 
>> -Wno-enum-conversion -Wno-unused-local-typedef -Wno-sign-compare 
>> -Wno-array-bounds -Wno-missing-prototypes -Qunused-arguments -c 
>> /usr/src/sys/boot/efi/loader/../../zfs/zfs.c -o zfs.o
>>  /usr/src/sys/boot/efi/loader/../../zfs/zfs.c:602:17: error: incompatible 
>> pointer types initializing 'int (*)(void *, int, daddr_t, size_t, size_t, 
>> char *, size_t *)' (aka 'int
>>   (*)(void *, int, long, unsigned long, unsigned long, char *, unsigned 
>> long *)') with an expression of type 'int (void *, int, daddr_t, size_t, 
>> char *, size_t *)' (aka 'int
>>   (void *, int, long, unsigned long, char *, unsigned long *)') 
>> [-Werror,-Wincompatible-pointer-types]
>> .dv_strategy = zfs_dev_strategy,
>>    ^~~~
>>  /usr/src/sys/boot/efi/loader/../../zfs/zfs.c:606:14: error: incompatible 
>> pointer types initializing 'void (*)(int)' with an expression of type 'int 
>> (int)'
>>   [-Werror,-Wincompatible-pointer-types]
>> .dv_print = zfs_dev_print,
>> ^
>>  2 errors generated.
>
> This is because of r310850, which changed the dv_strategy member of
> struct devsw in stand.h [1]. You need to update your libstand before
> you can build sys/boot, e.g:
>
> cd /usr/src/lib/libstand
> make obj
> make depend
> make
> sudo make install
>
> Then try building sys/boot again. Or just run a regular buildworld. :)
>
> -Dimitry
>
> [1] 
> https://svnweb.freebsd.org/base/head/lib/libstand/stand.h?r1=310850=310849=310850

-- 
With Best Regards,
Ilya A. Arkhipov
___
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: How building sys/boot

2017-01-25 Thread Ilya A . Arkhipov

___
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"


How building sys/boot

2017-01-25 Thread Ilya A . Arkhipov
Hi All,

Somebody can explain to me how build sys/boot?
Right now I doing:
 make -C sys/boot obj depend all
And I get:
 cc  -O2 -pipe   -DSKEIN_LOOP=111 -fPIC -I/usr/src/sys/boot/efi/loader 
-I/usr/src/sys/boot/efi/loader/arch/amd64 
-I/usr/src/sys/boot/efi/loader/../include 
-I/usr/src/sys/boot/efi/loader/../include/amd64 
-I/usr/src/sys/boot/efi/loader/../../../contrib/dev/acpica/include 
-I/usr/src/sys/boot/efi/loader/../../.. 
-I/usr/src/sys/boot/efi/loader/../../i386/libi386 
-I/usr/src/sys/boot/efi/loader/../../zfs 
-I/usr/src/sys/boot/efi/loader/../../../cddl/boot/zfs 
-I/usr/src/sys/boot/efi/loader/../../../crypto/skein -DEFI_ZFS_BOOT -DNO_PCI 
-DEFI -DSMBIOS_SERIAL_NUMBERS -DBOOT_FORTH 
-I/usr/src/sys/boot/efi/loader/../../ficl 
-I/usr/src/sys/boot/efi/loader/../../ficl/amd64 -DLOADER_DISK_SUPPORT 
-DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -fPIC -I/usr/src/sys/boot/ficl 
-I/usr/src/sys/boot/ficl/amd64  -I/usr/src/sys/boot/ficl/../common 
-I/usr/src/sys/boot/efi/loader/../../common -ffreestanding -Wformat 
-msoft-float -mno-mmx -mno-sse -mno-avx -fshort-wchar -mno-red-zone -mno-aes -g 
-MD  -MF.depend.zfs.o -
 MTzfs.o -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W 
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
-Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value 
-Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion 
-Wno-unused-local-typedef -Wno-sign-compare -Wno-array-bounds 
-Wno-missing-prototypes -Qunused-arguments  -c 
/usr/src/sys/boot/efi/loader/../../zfs/zfs.c -o zfs.o
/usr/src/sys/boot/efi/loader/../../zfs/zfs.c:602:17: error: incompatible 
pointer types initializing 'int (*)(void *, int, daddr_t, size_t, size_t, char 
*, size_t *)' (aka 'int
  (*)(void *, int, long, unsigned long, unsigned long, char *, unsigned 
long *)') with an expression of type 'int (void *, int, daddr_t, size_t, char 
*, size_t *)' (aka 'int
  (void *, int, long, unsigned long, char *, unsigned long *)') 
[-Werror,-Wincompatible-pointer-types]
.dv_strategy = zfs_dev_strategy,
   ^~~~
/usr/src/sys/boot/efi/loader/../../zfs/zfs.c:606:14: error: incompatible 
pointer types initializing 'void (*)(int)' with an expression of type 'int 
(int)'
  [-Werror,-Wincompatible-pointer-types]
.dv_print = zfs_dev_print,
^
2 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/src/sys/boot/efi/loader
*** Error code 1


-- 
With Best Regards,
Ilya A. Arkhipov
___
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"


R flag in newsyslog works incorrect

2012-07-07 Thread Ilya A . Arkhipov
Hi All,

Looks as R flag with archiving works incorrect, for example:
root@mhome:/tmp/test# less nsl.cfg 
/tmp/test/test.log  micro:wheel 640 20  10  *   BZR 
/tmp/test/test.sh
root@mhome:/tmp/test# less test.sh 
echo atata

root@mhome:/tmp/test# newsyslog -vF -f nsl.cfg 
Processing nsl.cfg
/tmp/test/test.log 20Z: size (Kb): 1 [10] -- trimming log
Signal all daemon process(es)...
Run command: /tmp/test/test.sh 1
atata
Pause 10 seconds to allow daemon(s) to close log file(s)
Compress all rotated log file(s)...
newsyslog: log /tmp/test/test.log.0 not compressed because daemon(s) not 
notified

http://micro.heavennet.ru/patch/newsyslog.patch fix it.

root@mhome:/tmp/test# newsyslog -vF -f nsl.cfg 
Processing nsl.cfg
/tmp/test/test.log 20Z: size (Kb): 68 [10] -- trimming log
Signal all daemon process(es)...
Run command: /tmp/test/test.sh 1
atata
Pause 10 seconds to allow daemon(s) to close log file(s)
Compress all rotated log file(s)...

Could you please review and fix it.

Thanks in advance!

-- 
With Best Regards,
Ilya A. Arkhipov--- newsyslog.c_old 2012-07-07 14:49:41.502135608 +
+++ newsyslog.c 2012-07-07 14:48:09.425136998 +
@@ -1972,7 +1972,7 @@
else
pgm_name++;
 
-   if (zwork-zw_swork != NULL  zwork-zw_swork-sw_pidok = 0) {
+   if (zwork-zw_swork != NULL  zwork-zw_swork-sw_pidok = 0  
!zwork-zw_swork-run_cmd ) {
warnx(
log %s not compressed because daemon(s) not notified,
zwork-zw_fname);
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org