mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +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
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