mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 11:36:22 +00:00
SystemServer: Boot to text mode if there are no device nodes at /dev/gpu
Otherwise, WindowServer will simply crash and fail due to no hardware to utilize.
This commit is contained in:
parent
a0a1ac0656
commit
fb7d9186b2
Notes:
sideshowbarker
2024-07-17 11:15:04 +09:00
Author: https://github.com/supercomputer7
Commit: fb7d9186b2
Pull-request: https://github.com/SerenityOS/serenity/pull/13923
1 changed files with 8 additions and 0 deletions
|
@ -72,6 +72,14 @@ static ErrorOr<void> determine_system_mode()
|
|||
|
||||
g_system_mode = system_mode;
|
||||
dbgln("Read system_mode: {}", g_system_mode);
|
||||
|
||||
struct stat file_state;
|
||||
int rc = lstat("/dev/gpu/connector0", &file_state);
|
||||
if (rc != 0 && g_system_mode == "graphical") {
|
||||
dbgln("WARNING: No device nodes at /dev/gpu/ directory. This is probably a sign of disabled graphics functionality.");
|
||||
dbgln("To cope with this, I'll turn off graphical mode.");
|
||||
g_system_mode = "text";
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue