Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Broken DRM after unclean shutdown?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
Zaalanel
n00b
n00b
User avatar
Posts: 4
Joined: Mon Mar 02, 2026 9:04 pm

Broken DRM after unclean shutdown?

  • Quote

Post by Zaalanel » Mon Mar 02, 2026 9:32 pm

Good evening,
I have been attempting to compile and use an upstream kernel, namely 7.0.0-rc1. I do not have any issues with the new kernel up until an unclean shutdown occurs, either artificial or my battery runs dry.

After this happens, any subsequent boots will fail to correctly load the kernel and the initramfs. What I am greeted with is a black screen with either complete lines or partial lines, straight and horizontal, that are filled with garbage data. I can input my luks passphrase and the screen will go black for a moment before returning to a broken state.

I have since replicated this on the most recent sys-kernel/vanilla-sources with 6.19.3. For both builds I copied the dist kernel's .config and performed make olddefconfig on them, following the instructions on the wiki.

Full power cycles do not fix this issue, and the only solution I have found so far is to re-run sudo make install in /usr/src/linux after remounting my efi partition in either a chrooted live environment or while using the gentoo-kernel-bin vmlinuz and initramfs.

For further context, gentoo-kernel-bin works without issue and recovers from unclean shutdowns just fine. My use flags for installkernel are: systemd, ugrd, and efistub. My config.toml for ugrd is unmodified. The only additions to /etc/kernel/cmdline are splash and rd.udev. At the present moment I am compiling gentoo-kernel to see if I can replicate it there as well.

If it matters at all, I am running this on a corebooted T480.

I suspect something to do with my efi partition being damaged by the unclean shutdowns, but I do not understand why it doesn't affect the gentoo-kernel-bin. Do the Gentoo sources apply a patch to deal with this exact issue?

I am very lost on what is going wrong here. If there is anything I can do to help you help me, please let me know.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Mar 03, 2026 10:33 am

Zaalanel,

Welcome to Gentoo.

If the filesystem is corrupt, there are so many ways it can be broken.
Files can be corrupt, inethe case of VFAT, one or more copies of the File Allocation Table canebe corrupt.
There are two copies but only the first is used.

The quickest fix is to destroy the filesystem by creating a new filesystem over the the old one.
Now restore the content.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Zaalanel
n00b
n00b
User avatar
Posts: 4
Joined: Mon Mar 02, 2026 9:04 pm

  • Quote

Post by Zaalanel » Tue Mar 03, 2026 1:58 pm

NeddySeagoon wrote:Zaalanel,

Welcome to Gentoo.

If the filesystem is corrupt, there are so many ways it can be broken.
Files can be corrupt, inethe case of VFAT, one or more copies of the File Allocation Table canebe corrupt.
There are two copies but only the first is used.

The quickest fix is to destroy the filesystem by creating a new filesystem over the the old one.
Now restore the content.
Thank you for your reply.

After recreating my EFI partition with mkfs.vfat -F 32 /dev/nvme0n1p1, I reran sudo make install for the rc kernel. After a hard power cycle, I still get the same issue.

The regular gentoo-kernel finished compiling last night. The locally compiled gentoo-kernel seems to be like the distributed binary in that it seems to be unaffected by this issue too.

Seems that I am back to square one.
Top
pietinger
Moderator
Moderator
Posts: 6615
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Mar 03, 2026 2:48 pm

Zaalanel wrote:Seems that I am back to square one.
I suggest to check the kernel configuration of 7.0. One difference is surely that our kernels have some settings by default provided by an additional submenu:

Code: Select all

Gentoo Linux  --->
    Support for init systems, system and service managers  --->
        [*] OpenRC, runit and other script based systems and managers
This option enables automatically:
Selects: BINFMT_SCRIPT [=y] && CGROUPS [=y] && EPOLL [=y] && FILE_LOCKING [=y] && INOTIFY_USER [=y] && SIGNALFD [=y] && TIMERFD [=y]

I don't know what your level of knowledge is, but perhaps these two articles will help you:
* https://wiki.gentoo.org/wiki/User:Pieti ... figuration
* https://wiki.gentoo.org/wiki/User:Pieti ... ent_Kernel
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Mar 03, 2026 2:51 pm

Zaalanel,

What is a hard power cycle?
You pulled the plug out or you did an orderly shutdown to power off?
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pietinger
Moderator
Moderator
Posts: 6615
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Broken DRM after unclean shutdown?

  • Quote

Post by pietinger » Tue Mar 03, 2026 2:52 pm

P.S.: Dont use "make olddefconfig" ... do a "make oldconfig" ... ;-)
Zaalanel wrote:[...] For both builds I copied the dist kernel's .config and performed make olddefconfig on them [...]
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
Zaalanel
n00b
n00b
User avatar
Posts: 4
Joined: Mon Mar 02, 2026 9:04 pm

  • Quote

Post by Zaalanel » Tue Mar 03, 2026 4:10 pm

NeddySeagoon wrote:Zaalanel,

What is a hard power cycle?
Power button held until the laptop shuts off completely, basically a plug pull. Orderly shutdowns do not cause my issue.
pietinger wrote:P.S.: Dont use "make olddefconfig" ... do a "make oldconfig" ... ;-)
I believe I've tried this before, but I will try it again.
Top
sublogic
Guru
Guru
User avatar
Posts: 385
Joined: Mon Mar 21, 2022 3:02 am
Location: Pennsylvania, USA

Re: Broken DRM after unclean shutdown?

  • Quote

Post by sublogic » Tue Mar 03, 2026 11:12 pm

pietinger wrote:P.S.: Dont use "make olddefconfig" ... do a "make oldconfig" ... ;-)
If I may ...
oldconfig will sometimes present you with a loooong list of new options, with no easy way to back out if you make a mistake.
Solution in [post=8777836]this post by Section_8[/post].
The practical unit of "Learning Experience" is the milli-Gentoo.
Top
Zaalanel
n00b
n00b
User avatar
Posts: 4
Joined: Mon Mar 02, 2026 9:04 pm

  • Quote

Post by Zaalanel » Wed Mar 04, 2026 1:10 am

pietinger wrote:
Zaalanel wrote:Seems that I am back to square one.
I suggest to check the kernel configuration of 7.0. One difference is surely that our kernels have some settings by default provided by an additional submenu:

Code: Select all

Gentoo Linux  --->
    Support for init systems, system and service managers  --->
        [*] OpenRC, runit and other script based systems and managers
This option enables automatically:
Selects: BINFMT_SCRIPT [=y] && CGROUPS [=y] && EPOLL [=y] && FILE_LOCKING [=y] && INOTIFY_USER [=y] && SIGNALFD [=y] && TIMERFD [=y]
I ended up reviewing the differences in the 7.0 config. The only difference I found when inspecting the dependencies for systemd support was that DEVPTS-MULTIPLE-INSTANCES, and ANON_INODES were not in the 7.0.0 config.

I would like to reiterate and stress: I have had zero issue with getting the kernel to run. Sudo reboot and sudo poweroff both yield working booting systems. It is only the lack of a graceful shutdown that breaks my system.

[Update] 9:30AM EST: rebuilding the initramfs with yogurt fixes it, but it is still prone to breakage on an unclean shutdown. Something is happening to my initramfs.

[Update] 10:30 EST: The plot thickens. the initramfs is fine. running efibootmgr -n (my entry) restores it to a working state. I've come to the realization that invoking yogurt, make install, both set the nextboot var. in any situation where that efivar is not set to the new kernel entry, the DRM does not work correctly. This is starting to look like a firmware issue.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy