Can't use efivar or efibootmgr after updating to 23.10

Asked by Gregorio Litenstein

I am not sure this is a bug in efivar itself, but I don't really know where to report it.

I'm using a MacbookPro14,3 (mid-2017 touchbar), previously under 23.04. I updated to 23.10 and found myself unable to interact with efivars. Of course, efivarfs is properly mounted and I can list my keys via ls.

efivar -l returns: "efivar: error listing variables: Function not implemented"
Similarly, efibootmgr gives me "EFI Variables are not supported on this system"

I think this is probably related to https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/2034705 but I'm not sure it's the same issue.

This happens on either the generic or lowlatency 6.5.0-9 kernels. It doesn't happen with unofficial 6.5.8 or 6.2.13 builds.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gregorio Litenstein (litenstein) said :
#2

Those suggestions either don't apply to me or I've already tried them, to no avail.

To be more specific, I think it's an issue with the 23.10 kernel, since any combination that has not included the 6.5.0-9 kernel has worked.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Ignore comment #1, that's spam.

Do you see the same symptoms as described in bug #2034705 with respect to the output of

ls /sys/firmware/efi/efivars/
efivar -l

?

If yes, then you probably should comment on the bug report.

Revision history for this message
Rade0nfighter (rade0nfighter) said (last edit ):
#4

I too am having the exact issue after updating to 23.10. Have also tried efibootmgr and efivar.

Tried adding `efi=runtime` to the kernel parameters in /etc/default/grub configuration to no avail. (GRUB_CMDLINE_LINUX_DEFAULT="efi=runtime quiet") followed by updating grub. As per https://unix.stackexchange.com/a/602388.

My device is also a MacbookPro14,3 (mid-2017 touchbar).

`ls /sys/firmware/efi` returns entries so it's not an issue with the mount.

@Manfred the symptoms in that link are similar to mine however that thread indicates that the issue was resolved in 6.5.0-6-generic but I am on 6.5.0-9-generic too.

@Gregorio When updating did the installer prompt you to overwrite your grub file and if so did you choose to keep your version or accept the maintainer version? I chose the maintainer version as the differences seemed inconsequential...I'm wondering if you also were prompted and discarded local changes if there's a backup somewhere that might contain some key variable...

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

"... indicates that the issue was resolved in 6.5.0-6-generic ..."
That is a misinterpretation.
There is (or was) a patched version of the 6.5.0-6-generic kernel in ppa:esmil/ppa which seems to work. The change related to efi was not propagated further and is not contained in the 6.5.0-9-generic version in the official Ubuntu repositories.

It seems that you either have to create your own patched version of the kernel packages, or wait for an official solution.

Just to verify whether your systems are potentially affected by bug #2034705
What is the output of the command
dpkg --print-architecture

If it shows "riscv64", then you might try manually installing the patched kernel version from https://launchpad.net/~esmil/+archive/ubuntu/ppa/+build/26723392

Revision history for this message
Rade0nfighter (rade0nfighter) said :
#6

Thank you for the clarification.

The output of `dpkg --print-architecture` is amd64` so appears that the patch for bug #2034705 wouldn't help.

Appreciate the response nonetheless.

Revision history for this message
Rade0nfighter (rade0nfighter) said (last edit ):
#10

Update in case it helps fellow users on apple hardware...

The real problem I was facing turned out to be the result of a "boot coup" whereby the ubuntu update broke my refind boot selector. I noticed the EFI variables issue described on this ticket when attempting to use refind, refind-mkdefault, and efibootmgr to resolve. Previously, these commands had ran as I had been tweaking refind options from my ubuntu install.

Whilst the efi vars issue persists with 6.5.0-10-generic, I have been able to solve my real problem by following the steps here https://askubuntu.com/a/936459 - specifically by "blessing" refind (bullet point 3 in that askubuntu answer).

- Disable SIP (https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection)
- Log back in to macOS
- Bless refind
    -- `mkdir /Volumes/ESP`
    -- `sudo mount -t msdos /dev/disk0s1 /Volumes/ESP`
    -- `sudo bless --mount /Volumes/ESP --setBoot --file /Volumes/ESP/efi/refind/refind_x64.efi --shortform` (for my case, for HFS see that page)
- Reboot
- Re-enable SIP

Revision history for this message
Gregorio Litenstein (litenstein) said :
#14

Ugh, I never knew this had gotten any attention. It would appear launchpad notifications are getting lost in some filter somewhere.

@rade0nfighter I don't think that solution would apply to me, as I'm using the vanilla apple bootloader. I'm using bash aliases that change BootNext to boot either macOS or Linux as needed (which is also why this has been particularly problematic for me)

Can you help with this problem?

Provide an answer of your own, or ask Gregorio Litenstein for more information if necessary.

To post a message you must log in.