[opensuse-factory] s2disk does't prepare grub2
Hi, with 4.1.4-1-default s2disk works again with an ATI graphics controller. But on suspend grub2 isn't prepared. This worked once with grub2. Therefore on resume one is able to manipulate the grub2 menu which should not be possible. Or might this be intentional to allow to boot a different operating system? Due to problems with suspend and the former graphics card I can't exactly state when this broke. As desktop environment I'm using KDE 5. https://bugzilla.opensuse.org/show_bug.cgi?id=941682 Cheers, Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks. Thanks, Michael
Therefore on resume one is able to manipulate the grub2 menu which should not be possible. Or might this be intentional to allow to boot a different operating system?
Due to problems with suspend and the former graphics card I can't exactly state when this broke.
As desktop environment I'm using KDE 5.
https://bugzilla.opensuse.org/show_bug.cgi?id=941682
Cheers,
Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself. Is there any relevant change recently? Takashi
Thanks, Michael
Therefore on resume one is able to manipulate the grub2 menu which should not be possible. Or might this be intentional to allow to boot a different operating system?
Due to problems with suspend and the former graphics card I can't exactly state when this broke.
As desktop environment I'm using KDE 5.
https://bugzilla.opensuse.org/show_bug.cgi?id=941682
Cheers,
Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Aug 14, 2015 at 09:07:21AM +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself. Is there any relevant change recently?
No. The grub2-once has no change for a long time. Do you think that systemd could be related here as I heard that all hooks ported from pm-utils were removed ? Thanks, Michael
Takashi
Thanks, Michael
Therefore on resume one is able to manipulate the grub2 menu which should not be possible. Or might this be intentional to allow to boot a different operating system?
Due to problems with suspend and the former graphics card I can't exactly state when this broke.
As desktop environment I'm using KDE 5.
https://bugzilla.opensuse.org/show_bug.cgi?id=941682
Cheers,
Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Aug 14, 2015 at 10:07 AM, Takashi Iwai
On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself.
Something needs to call grub2-once though during hibernation. It was done by pm-utils previously; I was sure there was script as part of systemd but I do not see it now. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 14 Aug 2015 09:37:59 +0200, Andrei Borzenkov wrote:
On Fri, Aug 14, 2015 at 10:07 AM, Takashi Iwai
wrote: On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself.
Something needs to call grub2-once though during hibernation. It was done by pm-utils previously; I was sure there was script as part of systemd but I do not see it now.
Right, it was dropped in openSUSE:FACTORY/systemd changeset 215: % osc rdiff -c215 openSUSE:Factory/systemd .... +Wed Feb 18 05:01:38 UTC 2015 - crrodriguez@opensuse.org .... +- systemd-sleep-grub: moved to the grub2 package where it belongs as a + suspend/resume hook (SR#286533) (drops prepare-suspend-to-disk.patch) However, SR#286533 was declined and it's lost since then. WTF. (And more badly, from the nature of BS, I can't resubmit or fix it because the source repo got removed) IMO, we should have some mechanism to make some SR dependent on other SR for avoiding such failure. Takashi -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Aug 14, 2015 at 09:54:45AM +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 09:37:59 +0200, Andrei Borzenkov wrote:
On Fri, Aug 14, 2015 at 10:07 AM, Takashi Iwai
wrote: On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself.
Something needs to call grub2-once though during hibernation. It was done by pm-utils previously; I was sure there was script as part of systemd but I do not see it now.
Right, it was dropped in openSUSE:FACTORY/systemd changeset 215:
% osc rdiff -c215 openSUSE:Factory/systemd .... +Wed Feb 18 05:01:38 UTC 2015 - crrodriguez@opensuse.org .... +- systemd-sleep-grub: moved to the grub2 package where it belongs as a + suspend/resume hook (SR#286533) (drops prepare-suspend-to-disk.patch)
However, SR#286533 was declined and it's lost since then. WTF.
(And more badly, from the nature of BS, I can't resubmit or fix it because the source repo got removed)
IMO, we should have some mechanism to make some SR dependent on other SR for avoiding such failure.
IMHO, systemd should maintain the hooks if it breaks without it. It should be as self contained as possible to avoid adding requirment to it's environment. But if it's not a justication or concern by systemd then so be it .. Thanks, Michael
Takashi
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 14 Aug 2015 10:30:05 +0200, Michael Chang wrote:
On Fri, Aug 14, 2015 at 09:54:45AM +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 09:37:59 +0200, Andrei Borzenkov wrote:
On Fri, Aug 14, 2015 at 10:07 AM, Takashi Iwai
wrote: On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself.
Something needs to call grub2-once though during hibernation. It was done by pm-utils previously; I was sure there was script as part of systemd but I do not see it now.
Right, it was dropped in openSUSE:FACTORY/systemd changeset 215:
% osc rdiff -c215 openSUSE:Factory/systemd .... +Wed Feb 18 05:01:38 UTC 2015 - crrodriguez@opensuse.org .... +- systemd-sleep-grub: moved to the grub2 package where it belongs as a + suspend/resume hook (SR#286533) (drops prepare-suspend-to-disk.patch)
However, SR#286533 was declined and it's lost since then. WTF.
(And more badly, from the nature of BS, I can't resubmit or fix it because the source repo got removed)
IMO, we should have some mechanism to make some SR dependent on other SR for avoiding such failure.
IMHO, systemd should maintain the hooks if it breaks without it. It should be as self contained as possible to avoid adding requirment to it's environment.
Well, grub2 is no requirement for systemd or hibernation itself. It can work (in theory) with other boot loaders. So, having the systemd hook in grub2 appears more natural to me. The breakage happened because the change depends on another change. It should have been done in a shot like maintenance update. But the normal SR doesn't do it, and this update was mixed up badly together with other tons of changes, so it couldn't work well, in anyway. Takashi -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 14 Aug 2015 11:26:50 +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 10:30:05 +0200, Michael Chang wrote:
On Fri, Aug 14, 2015 at 09:54:45AM +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 09:37:59 +0200, Andrei Borzenkov wrote:
On Fri, Aug 14, 2015 at 10:07 AM, Takashi Iwai
wrote: On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote: > Hi, > > with 4.1.4-1-default s2disk works again with an ATI graphics controller. > > But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself.
Something needs to call grub2-once though during hibernation. It was done by pm-utils previously; I was sure there was script as part of systemd but I do not see it now.
Right, it was dropped in openSUSE:FACTORY/systemd changeset 215:
% osc rdiff -c215 openSUSE:Factory/systemd .... +Wed Feb 18 05:01:38 UTC 2015 - crrodriguez@opensuse.org .... +- systemd-sleep-grub: moved to the grub2 package where it belongs as a + suspend/resume hook (SR#286533) (drops prepare-suspend-to-disk.patch)
However, SR#286533 was declined and it's lost since then. WTF.
(And more badly, from the nature of BS, I can't resubmit or fix it because the source repo got removed)
IMO, we should have some mechanism to make some SR dependent on other SR for avoiding such failure.
IMHO, systemd should maintain the hooks if it breaks without it. It should be as self contained as possible to avoid adding requirment to it's environment.
Well, grub2 is no requirement for systemd or hibernation itself. It can work (in theory) with other boot loaders. So, having the systemd hook in grub2 appears more natural to me.
Now thinking on this again, I'm afraid that systemd may have a bug there. It doesn't call resume hooks if the write to /sys/power/state fails. So, if you set grubenv in the hook but the hibernation itself failed by kernel, the faulty grubenv is left. There seems no bug report, so I'll create it now. Takashi -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 14 Aug 2015 11:49:04 +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 11:26:50 +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 10:30:05 +0200, Michael Chang wrote:
On Fri, Aug 14, 2015 at 09:54:45AM +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 09:37:59 +0200, Andrei Borzenkov wrote:
On Fri, Aug 14, 2015 at 10:07 AM, Takashi Iwai
wrote: On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote: > > On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote: > > Hi, > > > > with 4.1.4-1-default s2disk works again with an ATI graphics controller. > > > > But on suspend grub2 isn't prepared. This worked once with grub2. > > I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You > have to run higher level interface like pm-hibernate or systemctl > hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself.
Something needs to call grub2-once though during hibernation. It was done by pm-utils previously; I was sure there was script as part of systemd but I do not see it now.
Right, it was dropped in openSUSE:FACTORY/systemd changeset 215:
% osc rdiff -c215 openSUSE:Factory/systemd .... +Wed Feb 18 05:01:38 UTC 2015 - crrodriguez@opensuse.org .... +- systemd-sleep-grub: moved to the grub2 package where it belongs as a + suspend/resume hook (SR#286533) (drops prepare-suspend-to-disk.patch)
However, SR#286533 was declined and it's lost since then. WTF.
(And more badly, from the nature of BS, I can't resubmit or fix it because the source repo got removed)
IMO, we should have some mechanism to make some SR dependent on other SR for avoiding such failure.
IMHO, systemd should maintain the hooks if it breaks without it. It should be as self contained as possible to avoid adding requirment to it's environment.
Well, grub2 is no requirement for systemd or hibernation itself. It can work (in theory) with other boot loaders. So, having the systemd hook in grub2 appears more natural to me.
Now thinking on this again, I'm afraid that systemd may have a bug there. It doesn't call resume hooks if the write to /sys/power/state fails. So, if you set grubenv in the hook but the hibernation itself failed by kernel, the faulty grubenv is left.
There seems no bug report, so I'll create it now.
Bug 941758. Takashi -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Aug 14, 2015 at 11:54:04AM +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 11:49:04 +0200, Takashi Iwai wrote:
Bug 941758.
Thank you Takashi, let's work on it. Regards, Michael
Takashi
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Aug 14, 2015 at 10:37:59AM +0300, Andrei Borzenkov wrote:
On Fri, Aug 14, 2015 at 10:07 AM, Takashi Iwai
wrote: On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself.
Something needs to call grub2-once though during hibernation. It was done by pm-utils previously; I was sure there was script as part of systemd but I do not see it now.
That's also my question to systemd, it's own quirks should have one to superscede the pm-util hook we made for grub2. Isn't it ? Thanks, Michael
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 14 Aug 2015 09:07:21 +0200, Takashi Iwai wrote:
On Fri, 14 Aug 2015 08:50:00 +0200, Michael Chang wrote:
On Thu, Aug 13, 2015 at 11:55:42PM +0200, Lars Müller wrote:
Hi,
with 4.1.4-1-default s2disk works again with an ATI graphics controller.
But on suspend grub2 isn't prepared. This worked once with grub2.
I think s2disk(uswsusp) would not run suspend/resume prepare hooks. You have to run higher level interface like pm-hibernate or systemctl hibernate that could have provided the pm hooks.
pm-utils have been already dropped, so there should be neither s2disk nor pm-hibernate command. The grub2-once thing is handled now in grub2 package itself. Is there any relevant change recently?
I could reproduce this on my machine, too. On SLE12, systemd was patched to call its systemd-sleep-grub script to set up grubenv & co, but there is no such on openSUSE. We definitely need some systemd-sleep hook. I guess it should belong to grub2 package as well. Takashi
Takashi
Thanks, Michael
Therefore on resume one is able to manipulate the grub2 menu which should not be possible. Or might this be intentional to allow to boot a different operating system?
Due to problems with suspend and the former graphics card I can't exactly state when this broke.
As desktop environment I'm using KDE 5.
https://bugzilla.opensuse.org/show_bug.cgi?id=941682
Cheers,
Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Lars Müller
-
Michael Chang
-
Takashi Iwai