GithubHelp home page GithubHelp logo

Comments (9)

p91paul avatar p91paul commented on July 23, 2024

Hi,
Googling a bit shows that is likely that fedora actually disabled hibernation with secure boot; but as I'm unsure about other distributions, I wouldn't break things for all users. Do you know a reliable way to determine if hibernation is disabled?

from gnome-shell-extension-hibernate-status.

xenithorb avatar xenithorb commented on July 23, 2024
  1. Secure boot does not work with hibernation I because it destroys the trust model. (Unless you use dm-crypt, but they don't seem to care enough to check for that). https://www.phoronix.com/scan.php?page=news_item&px=MTI4NjE
  2. GRUB_DISABLE_RECOVERY in /etc/default/grub might be a safe assumption

from gnome-shell-extension-hibernate-status.

p91paul avatar p91paul commented on July 23, 2024

I saw that phoronix piece of news. However, the fact that someone posted a patch doesn't mean that it was accepted, especially when the author states that the patch is not intended to be merged as is. I could not find a follow up for that, apart of Fedora users complaing, which makes me think Fedora actually does something to prevent hibernation with secure boot, but leaves me unsure about other distributions.

GRUB_DISABLE_RECOVERY is unrelated to hibernation. You probably mean the noresume kernel command line option; I'll look into that. Can you check if it appears in your /proc/cmdline?

from gnome-shell-extension-hibernate-status.

xenithorb avatar xenithorb commented on July 23, 2024

https://psohny.wordpress.com/2015/08/13/fedora_hiber/

from gnome-shell-extension-hibernate-status.

xenithorb avatar xenithorb commented on July 23, 2024

Alternatively, you do need resume=<blockdev> so maybe check for that? I don't think GRUB_DISABLE_RECOVERY is unrelated though

from gnome-shell-extension-hibernate-status.

xenithorb avatar xenithorb commented on July 23, 2024

Nevermind, you're right about GRUB_DISABLE_RECOVERY, all it does is add an additional option in the menu with 'single' prepended. I thought that was weird too, so I'm not sure where that blog got their misinformation from.

from gnome-shell-extension-hibernate-status.

p91paul avatar p91paul commented on July 23, 2024

Another nice thing about that blog post is that they don't advise to do grub2-mkconfig -o /boot/grub2/grub.cfg after editing /etc/default/grub, so the modification to GRUB_DISABLE_RECOVERY has simply no effect :).

Also, directly editing /boot/grub2/grub.cfg is discouraged since invoking grub2-mkconfig -o /boot/grub2/grub.cfg would override them, and some distribution do that after every kernel update (they do have a point since Fedora doesn't though, but still new kernels won't get that option appended). The Right Way (TM) of setting resume=<blockdev> is to add that parameter to GRUB_CMDLINE_LINUX like:

GRUB_CMDLINE_LINUX="rhgb quiet resume=/dev/<your swap partition>"

Then issue the grub2-mkconfig -o /boot/grub2/grub.cfg command to persist that change, and reboot to activate it. Can you try setting that? If you are then allowed to hibernate, that would rule out secure boot.

from gnome-shell-extension-hibernate-status.

xenithorb avatar xenithorb commented on July 23, 2024

Lol, I didn't even notice the call to edit /boot/grub2/grub.cfg (mainly because for me it's even /boot/efi/EFI/fedora/grub.cfg)

I added resume= to GRUB_CMDLINE_LINUX instinctively

Unfortunately I no longer use GNOME, but if I can recall correctly, my original idea is that, knowing that linux does not support hibernation+secure_boot then a button that says it will hibernate might want to check to see if it has secure boot enable because it won't work as intended, leaving the user in a confused state as to why it wasn't working.

iirc, with your extension, it was my first attempt at getting hibernate to work on linux, and I did not yet possess the knowledge that it simply doesn't work with secure-boot enabled. I opted to keep secure-boot enabled because of the added security benefit when used with dm-crypt.

from gnome-shell-extension-hibernate-status.

p91paul avatar p91paul commented on July 23, 2024

Closing this issue. #17 remains open to add some feedback when hibernating won't work.

from gnome-shell-extension-hibernate-status.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.