Re: acpi resume related patch
on 28/01/2013 04:52 Glen Barber said the following: On Fri, Jan 25, 2013 at 10:43:33AM +0200, Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch FWIW, I am (very happy) to report my laptop has resumed for longer than 10 seconds for the first time ever. Just to clarify - you mean that previously it would try to shutdown right after resume? Or something else? root@nucleus:~ # uname -a FreeBSD nucleus 10.0-CURRENT FreeBSD 10.0-CURRENT #56 r245748M: Sun Jan 27 21:39:55 EST 2013 root@nucleus:/usr/obj/usr/src/sys/NUCLEUS amd64 root@nucleus:~ # kldstat Id Refs AddressSize Name 1 60 0x8020 dfc0d8 kernel 21 0x80ffd000 21cc80 zfs.ko 32 0x8121a000 5e08 opensolaris.ko 41 0x8122 1fc48geom_eli.ko 52 0x8124 138dd0 linux.ko 61 0x81379000 2a70 coretemp.ko 71 0x8137c000 70e8 acpi_video.ko 81 0x81384000 6668 sem.ko 91 0x8138b000 8b10 acpi_asus.ko 101 0x81394000 4a18 aesni.ko 111 0x81412000 28805pf.ko 121 0x8143b000 5f590i915kms.ko 131 0x8149b000 13f2 iicbb.ko 144 0x8149d000 136f iicbus.ko 151 0x8149f000 df9 iic.ko 162 0x814a ab34 agp.ko 171 0x814ab000 2dce9drm2.ko 181 0x814d9000 25b linux_adobe.ko Current uptime post-resume is about 5 minutes. Glen -- Andriy Gapon ___ 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
Re: acpi resume related patch
On Mon, Jan 28, 2013 at 10:16:43AM +0200, Andriy Gapon wrote: on 28/01/2013 04:52 Glen Barber said the following: On Fri, Jan 25, 2013 at 10:43:33AM +0200, Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch FWIW, I am (very happy) to report my laptop has resumed for longer than 10 seconds for the first time ever. Just to clarify - you mean that previously it would try to shutdown right after resume? Or something else? Your description is probably the most accurate way to describe post-resume behavior. Glen pgpFUO2RY6Sek.pgp Description: PGP signature
Re: acpi resume related patch
On Sat, Jan 26, 2013 at 04:18:57PM +0200, Andriy Gapon wrote: on 25/01/2013 18:08 Andriy Gapon said the following: on 25/01/2013 15:51 John Baldwin said the following: On Friday, January 25, 2013 3:43:33 am Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch This will break systems not using the local APIC since you unconditionally call lapic_setup() on resume.This was part of the feature of the previous code that by using a dummy pic it could register it only when the local APIC was used. Thank you for drawing my attention to this. I will try to fix this issue. The reason I want to remove lapic from 'pics' (and I already described it in a private email) is that Local APIC is a special kind of PIC. It's already explicitly initialized by APs. Putting it into 'pics' tailq just obfuscates the code. It should also be registered before any of the I/O APICs are by the design of the local_apic.c code. In fact, as I see in the code, Local APIC is always registered _after_ I/O APICs. And thus lapic_resume was called after ioapic_resume. Additionally, currently there is no synchronization between initialization of Local APICs on APs and initialization of I/O APICs at the wakeup/resume time. Here is an updated version of the patch: http://people.freebsd.org/~avg/acpi-apic-wakeup.2.patch FYI, it doesn't change anything for me. Resume seems to work, but suspend just reset my laptop. I unload all driver modules (including if_em, sound, nvidia, usb). The only driver I keep is ahci. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpeGRk3y8xZd.pgp Description: PGP signature
Re: acpi resume related patch
on 28/01/2013 14:45 Pawel Jakub Dawidek said the following: FYI, it doesn't change anything for me. Resume seems to work, but suspend just reset my laptop. Sorry, I am a little confused by this description. How can you know that resume works if suspend resets the machine? -- Andriy Gapon ___ 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
Re: acpi resume related patch
On Mon, Jan 28, 2013 at 03:07:59PM +0200, Andriy Gapon wrote: on 28/01/2013 14:45 Pawel Jakub Dawidek said the following: FYI, it doesn't change anything for me. Resume seems to work, but suspend just reset my laptop. Sorry, I am a little confused by this description. How can you know that resume works if suspend resets the machine? Because everything turns off, including display and the power led starts to throb and it does that until I try to resume it. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgp9FvUaKpvfH.pgp Description: PGP signature
Re: acpi resume related patch
on 28/01/2013 15:24 Pawel Jakub Dawidek said the following: On Mon, Jan 28, 2013 at 03:07:59PM +0200, Andriy Gapon wrote: on 28/01/2013 14:45 Pawel Jakub Dawidek said the following: FYI, it doesn't change anything for me. Resume seems to work, but suspend just reset my laptop. Sorry, I am a little confused by this description. How can you know that resume works if suspend resets the machine? Because everything turns off, including display and the power led starts to throb and it does that until I try to resume it. Ah, so suspend and resume got accidentally reverted... I see, thank you for the report. -- Andriy Gapon ___ 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
Re: acpi resume related patch
On Mon, Jan 28, 2013 at 03:40:18PM +0200, Andriy Gapon wrote: on 28/01/2013 15:24 Pawel Jakub Dawidek said the following: On Mon, Jan 28, 2013 at 03:07:59PM +0200, Andriy Gapon wrote: on 28/01/2013 14:45 Pawel Jakub Dawidek said the following: FYI, it doesn't change anything for me. Resume seems to work, but suspend just reset my laptop. Sorry, I am a little confused by this description. How can you know that resume works if suspend resets the machine? Because everything turns off, including display and the power led starts to throb and it does that until I try to resume it. Ah, so suspend and resume got accidentally reverted... I see, thank you for the report. I just noticed that, yes, sorry. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpZdzy5Vr92A.pgp Description: PGP signature
Re: acpi resume related patch
On Saturday, January 26, 2013 9:18:57 am Andriy Gapon wrote: on 25/01/2013 18:08 Andriy Gapon said the following: on 25/01/2013 15:51 John Baldwin said the following: On Friday, January 25, 2013 3:43:33 am Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch This will break systems not using the local APIC since you unconditionally call lapic_setup() on resume.This was part of the feature of the previous code that by using a dummy pic it could register it only when the local APIC was used. Thank you for drawing my attention to this. I will try to fix this issue. The reason I want to remove lapic from 'pics' (and I already described it in a private email) is that Local APIC is a special kind of PIC. It's already explicitly initialized by APs. Putting it into 'pics' tailq just obfuscates the code. It should also be registered before any of the I/O APICs are by the design of the local_apic.c code. In fact, as I see in the code, Local APIC is always registered _after_ I/O APICs. And thus lapic_resume was called after ioapic_resume. Additionally, currently there is no synchronization between initialization of Local APICs on APs and initialization of I/O APICs at the wakeup/resume time. Here is an updated version of the patch: http://people.freebsd.org/~avg/acpi-apic-wakeup.2.patch John, could you please review the PIC-related part? I decided to go back to the current approach while fixing the suspend/resume ordering and also order of registration for Local APIC. Must say that XEN special casing makes apic_setup_io a little bit untidy. Additionally this patch fixes AP Local APIC initialization ordering on i386. In the original patch I changed only amd64 code. This looks good to me. -- John Baldwin ___ 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
Re: acpi resume related patch
On Mon, Jan 28, 2013 at 10:55 AM, John Baldwin j...@freebsd.org wrote: On Saturday, January 26, 2013 9:18:57 am Andriy Gapon wrote: on 25/01/2013 18:08 Andriy Gapon said the following: on 25/01/2013 15:51 John Baldwin said the following: On Friday, January 25, 2013 3:43:33 am Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch This will break systems not using the local APIC since you unconditionally call lapic_setup() on resume.This was part of the feature of the previous code that by using a dummy pic it could register it only when the local APIC was used. Thank you for drawing my attention to this. I will try to fix this issue. The reason I want to remove lapic from 'pics' (and I already described it in a private email) is that Local APIC is a special kind of PIC. It's already explicitly initialized by APs. Putting it into 'pics' tailq just obfuscates the code. It should also be registered before any of the I/O APICs are by the design of the local_apic.c code. In fact, as I see in the code, Local APIC is always registered _after_ I/O APICs. And thus lapic_resume was called after ioapic_resume. Additionally, currently there is no synchronization between initialization of Local APICs on APs and initialization of I/O APICs at the wakeup/resume time. Here is an updated version of the patch: http://people.freebsd.org/~avg/acpi-apic-wakeup.2.patch John, could you please review the PIC-related part? I decided to go back to the current approach while fixing the suspend/resume ordering and also order of registration for Local APIC. Must say that XEN special casing makes apic_setup_io a little bit untidy. Additionally this patch fixes AP Local APIC initialization ordering on i386. In the original patch I changed only amd64 code. This looks good to me. No joy here. System graphics turns off as I'd expect, but it never comes back. No wireless. No access. :-( Maybe someday, but not today. -- R. Kevin Oberman, Network Engineer E-mail: kob6...@gmail.com ___ 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
Re: acpi resume related patch
Al 25/01/2013 09:43, En/na Andriy Gapon ha escrit: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch Hi, the patch applies cleanly. Suspend did work in the past and seem to work now. However resume did not work and still doesn't. The problematic system is a Fujitsu laptop running AMD64 as today's head. In the past I tried the usual things (like running without X(Intel with GEM/KMS), removing all possible hardware out the kernel, etc...) without joy. My home server runs AMD64 with gemenized Intel and suspend/resume does work. For any additional info, let me know. Gustau -- Salut i força, Gustau --- Prou top-posting : http://ca.wikipedia.org/wiki/Top-posting Stop top-posting : http://en.wikipedia.org/wiki/Posting_style O O O Gustau Pérez i Querol O O O Unitat de Gestió dels departaments O O O Matemàtica Aplicada IV i Enginyeria Telemàtica Universitat Politècnica de Catalunya Edifici C3 - Despatx S101-B UPC Campus Nord UPC C/ Jordi Girona, 1-3 08034 - Barcelona ___ 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
Re: acpi resume related patch
On Sun, Jan 27, 2013 at 4:38 PM, Gustau Pérez i Querol gpe...@entel.upc.edu wrote: Al 25/01/2013 09:43, En/na Andriy Gapon ha escrit: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch Hi, the patch applies cleanly. Suspend did work in the past and seem to work now. However resume did not work and still doesn't. The problematic system is a Fujitsu laptop running AMD64 as today's head. In the past I tried the usual things (like running without X(Intel with GEM/KMS), removing all possible hardware out the kernel, etc...) without joy. My home server runs AMD64 with gemenized Intel and suspend/resume does work. For any additional info, let me know. Gustau -- Salut i força, Gustau Very much the same on my ThinkPad T520. Suspend looks fine. Resume turns on the backlight, but that's about it. No wireless and no display. The power light continues to pulse, indicating the system still considers itself suspended. 9.1-STABLE amd64 updated today. Patch applied cleanly. Intel Wireless card (iwn driver) and with KMS. Resume has never worked on this system. -- R. Kevin Oberman, Network Engineer E-mail: kob6...@gmail.com ___ 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
Re: acpi resume related patch
On Sun, Jan 27, 2013 at 06:22:28PM -0800, Kevin Oberman wrote: Very much the same on my ThinkPad T520. Suspend looks fine. Resume turns on the backlight, but that's about it. No wireless and no display. The power light continues to pulse, indicating the system still considers itself suspended. 9.1-STABLE amd64 updated today. Patch applied cleanly. Intel Wireless card (iwn driver) and with KMS. Resume has never worked on this system. To regretfully add a me too, I have similar problems with my Asus X53E laptop. Suspend works fine. When I resume, X resumes fine - just long enough for me to see things resume, indicating networking works, processes are resuming, etc. Things go downhill once I become hopeful. If I run top(1) before suspending, uptime can vary from anything from a few minutes, to a few days. (Sometimes, even runs backwards.) I _think_ I've narrowed down the things go to hell point to human input - mouse, keyboard, specifically. Glen pgpSpTT7tGpy5.pgp Description: PGP signature
Re: acpi resume related patch
On Sun, Jan 27, 2013 at 09:32:28PM -0500, Glen Barber wrote: On Sun, Jan 27, 2013 at 06:22:28PM -0800, Kevin Oberman wrote: Very much the same on my ThinkPad T520. Suspend looks fine. Resume turns on the backlight, but that's about it. No wireless and no display. The power light continues to pulse, indicating the system still considers itself suspended. 9.1-STABLE amd64 updated today. Patch applied cleanly. Intel Wireless card (iwn driver) and with KMS. Resume has never worked on this system. To regretfully add a me too, I have similar problems with my Asus X53E laptop. Suspend works fine. When I resume, X resumes fine - just long enough for me to see things resume, indicating networking works, processes are resuming, etc. Things go downhill once I become hopeful. If I run top(1) before suspending, uptime can vary from anything from a few minutes, to a few days. (Sometimes, even runs backwards.) I _think_ I've narrowed down the things go to hell point to human input - mouse, keyboard, specifically. And, after realizing I am confusing different but seemingly similar threads, I realize I did not apply Andriy's patch. Will report back in about 25 minutes, then. :-) Glen pgpO18v6YD3D4.pgp Description: PGP signature
Re: acpi resume related patch
On Fri, Jan 25, 2013 at 10:43:33AM +0200, Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch FWIW, I am (very happy) to report my laptop has resumed for longer than 10 seconds for the first time ever. root@nucleus:~ # uname -a FreeBSD nucleus 10.0-CURRENT FreeBSD 10.0-CURRENT #56 r245748M: Sun Jan 27 21:39:55 EST 2013 root@nucleus:/usr/obj/usr/src/sys/NUCLEUS amd64 root@nucleus:~ # kldstat Id Refs AddressSize Name 1 60 0x8020 dfc0d8 kernel 21 0x80ffd000 21cc80 zfs.ko 32 0x8121a000 5e08 opensolaris.ko 41 0x8122 1fc48geom_eli.ko 52 0x8124 138dd0 linux.ko 61 0x81379000 2a70 coretemp.ko 71 0x8137c000 70e8 acpi_video.ko 81 0x81384000 6668 sem.ko 91 0x8138b000 8b10 acpi_asus.ko 101 0x81394000 4a18 aesni.ko 111 0x81412000 28805pf.ko 121 0x8143b000 5f590i915kms.ko 131 0x8149b000 13f2 iicbb.ko 144 0x8149d000 136f iicbus.ko 151 0x8149f000 df9 iic.ko 162 0x814a ab34 agp.ko 171 0x814ab000 2dce9drm2.ko 181 0x814d9000 25b linux_adobe.ko Current uptime post-resume is about 5 minutes. Glen pgprm_YFhIthi.pgp Description: PGP signature
Re: acpi resume related patch
on 25/01/2013 18:08 Andriy Gapon said the following: on 25/01/2013 15:51 John Baldwin said the following: On Friday, January 25, 2013 3:43:33 am Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch This will break systems not using the local APIC since you unconditionally call lapic_setup() on resume.This was part of the feature of the previous code that by using a dummy pic it could register it only when the local APIC was used. Thank you for drawing my attention to this. I will try to fix this issue. The reason I want to remove lapic from 'pics' (and I already described it in a private email) is that Local APIC is a special kind of PIC. It's already explicitly initialized by APs. Putting it into 'pics' tailq just obfuscates the code. It should also be registered before any of the I/O APICs are by the design of the local_apic.c code. In fact, as I see in the code, Local APIC is always registered _after_ I/O APICs. And thus lapic_resume was called after ioapic_resume. Additionally, currently there is no synchronization between initialization of Local APICs on APs and initialization of I/O APICs at the wakeup/resume time. Here is an updated version of the patch: http://people.freebsd.org/~avg/acpi-apic-wakeup.2.patch John, could you please review the PIC-related part? I decided to go back to the current approach while fixing the suspend/resume ordering and also order of registration for Local APIC. Must say that XEN special casing makes apic_setup_io a little bit untidy. Additionally this patch fixes AP Local APIC initialization ordering on i386. In the original patch I changed only amd64 code. -- Andriy Gapon ___ 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
acpi resume related patch
If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch -- Andriy Gapon ___ 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
Re: acpi resume related patch
On Fri, Jan 25, 2013 at 10:43:33AM +0200, Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch I have ACPI suspend/resume working but AR9220 never resume from sleep. ___ 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
Re: acpi resume related patch
On Fri, 25 Jan 2013 13:11:19 +0400 Slawa Olhovchenkov s...@zxy.spb.ru wrote: On Fri, Jan 25, 2013 at 10:43:33AM +0200, Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch I have ACPI suspend/resume working but AR9220 never resume from sleep. resume works with or without patch ?:) resume was broken after r243764 for me (and I'm not alone :)) -- wbr, tiger ___ 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
Re: acpi resume related patch
On Friday, January 25, 2013 3:43:33 am Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch This will break systems not using the local APIC since you unconditionally call lapic_setup() on resume. This was part of the feature of the previous code that by using a dummy pic it could register it only when the local APIC was used. It should also be registered before any of the I/O APICs are by the design of the local_apic.c code. -- John Baldwin ___ 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
Re: acpi resume related patch
on 25/01/2013 15:51 John Baldwin said the following: On Friday, January 25, 2013 3:43:33 am Andriy Gapon wrote: If you have ACPI suspend/resume working, if it used to work but stopped working at some time, if it never worked, but you are still hoping, could you please test the following patch and report back? http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch This will break systems not using the local APIC since you unconditionally call lapic_setup() on resume.This was part of the feature of the previous code that by using a dummy pic it could register it only when the local APIC was used. Thank you for drawing my attention to this. I will try to fix this issue. The reason I want to remove lapic from 'pics' (and I already described it in a private email) is that Local APIC is a special kind of PIC. It's already explicitly initialized by APs. Putting it into 'pics' tailq just obfuscates the code. It should also be registered before any of the I/O APICs are by the design of the local_apic.c code. In fact, as I see in the code, Local APIC is always registered _after_ I/O APICs. And thus lapic_resume was called after ioapic_resume. Additionally, currently there is no synchronization between initialization of Local APICs on APs and initialization of I/O APICs at the wakeup/resume time. -- Andriy Gapon ___ 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