diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 7c2304537c..e5ceb6ae22 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -519,6 +519,8 @@ Desktop::Init() return B_ERROR; } + HWInterface()->SetDPMSMode(B_DPMS_ON); + float brightness = fWorkspaces[0].StoredScreenConfiguration().Brightness(0); if (brightness > 0) HWInterface()->SetBrightness(brightness); diff --git a/src/servers/app/Screen.cpp b/src/servers/app/Screen.cpp index 7672c03849..f80517a779 100644 --- a/src/servers/app/Screen.cpp +++ b/src/servers/app/Screen.cpp @@ -74,11 +74,6 @@ Screen::Initialize() status = fHWInterface->Initialize(); } - // Turn on screen if this is not yet done by BIOS - if (status == B_OK) - fHWInterface->SetDPMSMode(B_DPMS_ON); - - return status; } diff --git a/src/servers/app/VirtualScreen.cpp b/src/servers/app/VirtualScreen.cpp index 94a9e1e1f2..1a9f7e2662 100644 --- a/src/servers/app/VirtualScreen.cpp +++ b/src/servers/app/VirtualScreen.cpp @@ -124,8 +124,11 @@ VirtualScreen::AddScreen(Screen* screen, ScreenConfigurations& configurations) // we found settings for this screen, and try to apply them now status = screen->SetMode(mode); } + if (status != B_OK) { - status_t status = screen->SetPreferredMode(); + // We found no configuration or it wasn't valid, try to fallback to + // sane values + status = screen->SetPreferredMode(); if (status != B_OK) status = screen->SetBestMode(1024, 768, B_RGB32, 60.f); if (status != B_OK) @@ -133,6 +136,9 @@ VirtualScreen::AddScreen(Screen* screen, ScreenConfigurations& configurations) if (status != B_OK) { debug_printf("app_server: Failed to set mode: %s\n", strerror(status)); + + delete item; + return status; } }