Greetings. APT is completely broken and I have no idea why. Whenever I try install, remove, or upgrade a package (or packages) I receive this error:

Removing linux-image-6.2.0-23-generic (6.2.0-23.23) … /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-6.2.0-23-generic /etc/kernel/postrm.d/zz-update-grub: Sourcing file `/etc/default/grub’ /usr/sbin/grub-mkconfig: 12: /etc/default/grub: i915.enable_psr=0: not found run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 dpkg: error processing package linux-image-6.2.0-23-generic (–remove): installed linux-image-6.2.0-23-generic package post-removal script subprocess returned error exit status 1 dpkg: too many errors, stopping Errors were encountered while processing: linux-image-6.2.0-23-generic Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried researching my problem online but got nowhere. Any help would be appreciated it.

OS: Kubuntu 23.04

  • lungdart@lemmy.ca
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    1 year ago

    Looks like you’ve edited /etc/default/grub with a kernel flag that may not be supported.

    Try removing i915.enable_psr=0 from that file and trying again.

    EDIT: Typos. I’m on mobile

    • Ocelot@lemmies.world
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      1 year ago

      /usr/sbin/grub-mkconfig: 12: /etc/default/grub: i915.enable_psr=0: not found

      This. Your /etc/default/grub file is probably not formatted right. That i915.enable_psr=0 param is probably on its own line, it needs to go in the kernel boot params line