locked
turn off monitor RRS feed

  • Question

  • Is there a solution to turn off the monitor connected via hdmi? Like SendMessage with SC_MONITORPOWER in "normal" windows?
    Thursday, September 17, 2015 7:08 AM

All replies

  • What about Raspberry pi touch display ? It is connected to DSI port on RPI2.

    It is possible to turn it off by c# in UWP application?

    • Proposed as answer by A. Fernandez Wednesday, December 21, 2016 4:32 AM
    Thursday, March 3, 2016 9:59 AM
  • Hi Peter & Celer21,

    I do not know the answer but I would highly doubt this is something that would be exposed to an Application Developer. My assumption would be that screen control would be in the driver code and Power Management subsystem.  I think the app can probably request sleep/hibernate/power off but the power state settings would control what the display does in those power states.

    Have you looked into setting the screen on/off through power management? Would this meet your requirement?

    Can you think of a situation where you would want the OS to allow an app to turn off the monitor outside of the setting in Power Manager? 

    Sincerely,

    IoTGirl

    Thursday, March 3, 2016 6:50 PM
  • Hi

    @Celer21: the touch display is not an option. we have to use standard monitors for the system. it's a display information system. so far we use now fanless industrial pc's with windows 10 IoT...

    @IoTGirl: the os doesnt know, when to turn off the monitor. only the app knows it... the power management doesent help.

    Regards, Peter

    Friday, March 4, 2016 11:04 AM
  • Hi Peter,

    "The power manager instructs drivers when to prepare their devices to enter a low-power mode, and drivers receive notification from the power manager when their devices are turned back on. Drivers are responsible for reporting their power capabilities to the power manager. Drivers have the option of detecting when their devices are idle (and can be switched to a low-power mode) or relying on the power manager for such detection"

    My apologies if I was not clear, the Power Aware Display Driver owns the state of the attached display.  I am sure you would agree you would not want any application to be able to shut off a display. Only the trusted driver has that ability.  If the Power Manager goes into a state that either dims or turns off the display, like an inactivity timeout for example, then the display will dim or turn off.

    So there are two ways you can effect the Display state:

    1. As the OEM, you write the driver and have complete control

    2. As the Admin User of the device you can set Power Management rules that effect when the display dims/shuts off.

    I hope that clarifies.

    I personally would not want an application to have the ability to shut down the display as it could be used to render my device useless. Think of an app that does nothing but turn off the display on startup for example.

    Sincerely,

    IoTGirl

    Friday, March 4, 2016 6:03 PM
  • Hi there,

    is there any chance to controle the backlight of the offical Raspberry Touch Display like under linux?

    Look at the last post here https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=120968

    At the moment I fear a burn-in of the display.

    Kind regards,

    Fabian

    Thursday, March 10, 2016 6:03 PM
  • Hi Fabian,

    Backlight will also be controlled by the device driver and Power Management settings.

    Sincerely,

    IoTGirl

    Thursday, March 10, 2016 7:12 PM
  • Hi IoTGirl, thanks for you reply! Is there any example available? How do I change the PM settings? Kind regards, Fabian
    Friday, March 11, 2016 2:51 PM
  • Hi Fabian,

    Have you looked at Power Management in Windows 10? Please research setting the power plan through Powershell as I do not have a sample for you.

    Sincerely,

    IoTGirl


    Friday, March 11, 2016 5:23 PM
  • Hi IoTGirl, hi all,

    thanks for your reply.

    The mecanism described here https://blogs.technet.microsoft.com/heyscriptingguy/2013/07/25/use-powershell-to-report-and-set-monitor-brightness doesn't work. The class WmiMonitorBrightness seem to be missing in Windows 10 IoT.

    Commands like

    powercfg -change -monitor-timeout-ac 5

    or similar doesn't work either. On Windows 10 they work perfectly well.

    Is this a driver issue?

    Has anyone a good idea? I don't like to leave the touch planel 'always on'.

    Kind regards,

    Fabian

    Saturday, March 12, 2016 8:02 AM
  • Thanks. But this seems to be too complicated. I stick with Linux for the moment, although I don't like GTK# that much. Kind regards, Fabian
    • Edited by metaneutrons Sunday, March 13, 2016 7:37 AM Typo
    Sunday, March 13, 2016 7:37 AM
  • Is there a way to programatically power the screen off. I have a system in place and it runs off rechargeable batteries and i would like to power the screen down based on the input from a proximity sensor.
    Monday, March 14, 2016 11:02 PM
  • as we have more possibilities to add different kind of displays and screens it would be helpful if you could tell us about your specific connection...
    Monday, March 14, 2016 11:29 PM
  • Peter / Code-Codex,

    Although this would not be nearly as elegant as software control through the HDMI CEC, you may achieve a similar functionality with a relay switch attached to the power cable of your external monitor.  This would have the added benefit of reducing power draw in your system.

    For example, you could use something like the Powerswitch Tail 2 and control it through a single digital GPIO pin off of the RPi2

    Tuesday, March 15, 2016 6:17 PM
  • I've been all over the web trying to find how to turn off the backlight and lower the brightness for it using windows 10 iot, does anyone have any ideas?


    Wednesday, March 30, 2016 1:28 PM
  • Hi IoTGirl, hi all,

    thanks for your reply.

    The mecanism described here https://blogs.technet.microsoft.com/heyscriptingguy/2013/07/25/use-powershell-to-report-and-set-monitor-brightness doesn't work. The class WmiMonitorBrightness seem to be missing in Windows 10 IoT.

    Commands like

    powercfg -change -monitor-timeout-ac 5

    or similar doesn't work either. On Windows 10 they work perfectly well.

    Is this a driver issue?

    Has anyone a good idea? I don't like to leave the touch planel 'always on'.

    Kind regards,

    Fabian

    i have the official pi foundation 7" touchscreen connected over dsi. I am able to set the monitor timeout using powercfg. the problem I am having is that once the timeout kicks in, I can't get the monitor to wake up.

    I know the touch part is still responsive because i can (blindly) use the iot core default app to restart the device by tapping the upper right screen, but once the screen goes black I can't get it back.

    i used "powercfg -change -monitor-timeout-ac 2" to set the timeout to 2 minutes.

    am i using the wrong setting? i am using my device as a touchscreen only controller for some AV equipment, so i need the monitor to wake up when tapped.

    Also, it doesn't turn the monitor off all the way - it just turns the screen black. Is that unsupported? or will that be fixed at a later date?

    Tuesday, April 5, 2016 3:51 AM
  • Hi hellthorne,

    You are not going to love this answer but here goes.  Power Management (Connected Standby in W8 & Modern Standby in W10) is really dependent on the driver implementation that handles the power state change notifications.  In your case, it would seem that the driver is interpreting that timeout to mean "go black" and does not really tell you how to trigger the wake event within that same driver. 

    I have checked with the team and there is an effort in the backlog to get some better experiences around this feature set.  From what I surmise, the easiest solution at this point would be something like a hardware button to signal a wake event from outside that driver.

    As for Connected Standby, it must be supported by both platform hardware and operating system software to become available.  If platform claims support for connected standby state, then such capability must be enabled first by setting proper registry keys.

    reg add hklm\system\controlset001\control\power /t REG_DWORD /v CsEnabled /d 1 /f

    So essentially there is no documentation for specifically for Power Management on IoT Core as yet because there is not a cohesive experience across devices.  Your mileage may vary but it might be worth investigating the big windows story around "CsEnabled" as IoT Core will/does use the same model but likely with fewer states.

    Sincerely,

    ioTGirl


    Tuesday, April 5, 2016 9:23 PM
  • Hello,

    I just saw that we cannot turn on/off the connected screen. What the hell ?! Imagine you have a connected screen to your raspberry and you don't have any keyboard/mouse connected (a real Internet of Things object, in fact...). Your application runs all day long. Would you let your screen on all day long ?!

    A sensor could turn on the screen if someone is front of it, and off if no one is there (but nothing permit to do this programmatically. It was possible with standard framework and I'm sure it not complicated to do so in IoT one).

    So... Microsoft guys, could you please make this really closed framework a little bit open ? I know it's for security reasons... but I don't plan to publish my app into the store, I don't plan to use it on other thing than raspberry pi (no phone, no windows PC...) so what can I do ? I'm ok to turn off some security behaviors if I can make what I want with my device.

    Same thing with MEF or dynamically loading dll at runtime. Ok for the security reason but I want to do that.

    I'm pro Microsoft and pro .Net framework (and .Net dev is my job). Usually, I can tell linux people why I love it when they say it's not cool. But with time, I think the balance is making me nearest to open systems as days are passing... Please don't forget free .Net coders, they want to be free to code whatever they want, no being parked like cows.


    Sunday, April 17, 2016 5:00 PM
  • Hi Insomniak,

    It is not a framework issue but rather a hardware and driver one.  Consider the difference between a laptop screen and a desktop screen. In the case of the laptop the connection is far more complete for backlight etc but with a desktop monitor the connection is quite different.

    The challenge is to support so many random bits of hardware in a universal driver whilst keeping the size of the driver small. If you want to control a specific display (That is better connected than a standard PC monitor) then a driver that is aware of the power states needs to be available, like it is for that laptop for instance.

    Sincerely,

    IoTGirl


    Monday, April 18, 2016 5:21 PM
  • Hi IotGirl,

    Thank you for this explanation but just to be sure to understand what you say : I didn't spoke about lcd screens connected to the raspberry pi through the onboard connector(also called Display DSI) but I'm just talking about HDMI screen. I don't know if it is driven differently or not.

    Taking your example : desktop and laptop screens are all managed the same way with standard .Net applications. You just use the dllimport with user32.dll hook to send the right messages to turn your screen on or off. 

    I think I kinda understand what you say but don't know exactly where the driver's problem is : is it on the screen driver ? on the graphic chipset driver ? 

    What about standard drivers like when you just have formatted your PC and no manufacturer driver is installed ? Windows uses generic ones. (clearly i'm a noob on this part of raspberry, win10 Iot... just sayin' :P)

    Monday, April 18, 2016 5:31 PM
  • Hi Insomniak,

    Noobs are encouraged and welcome! You are asking the right question. "How do you trim a standard driver and still have enough features to accomplish what you want?" It follows from the bigger effort, "How do you trim a desktop OS like Windows 10 and still end up with a small light OS that works for IoT?".

    Suffice it to say, at a high level, if your IoT device sets it's power states correctly, it should support states like "sleep" at a timeout but it would seem that some drivers are not handling the power states like they would on the desktop.  I merged your post with this thread as we are tracking what folks have tried and where such failures are occurring and specifics help.

    So yes, IoT Core does support power states but it would seem that some drivers do not.  In this case it is the display control on Raspberry Pi but I suspect there will be other drivers unrelated to display that will also exhibit the same lack of Power state support.  As the ecosystem matures, so will these drivers.

    PS The Raspberry Pi BSP is available and we do have a step by step on how to create a driver if you are interested.

    Sincerely,

    IoTGirl

     


    Monday, April 18, 2016 5:48 PM
  • SIDE NOTE:

    https://github.com/Microsoft/graphics-driver-samples

    From the readme “Note, due to limitations of the Raspberry Pi 2 the sample driver running on the Raspberry Pi 2 will never be able to fully support D3D and any usage of the driver must take into account the limitations of the driver and the underlying hardware.”

    Wednesday, April 20, 2016 5:30 PM
  • Hi Iot Girl,

    Thanks for your answers. I think that modifying graphic driver is not my cup of tea :)

    An other thing, i'm currently working on a project that could give some ideas for the team and if you want, we could discuss about this in private. It's a project that could impulse many people to develop on this platform but I don't want to make it public for the moment, not until I have the answers I'm currently seeking. I don't know if you can communicate with me in private through this website (I tried to search to contact you but there is no way to do it). If you can't, I will leave you my email here.

    Regards

    Steeve

    Monday, April 25, 2016 5:11 PM
  • Hi Steeve,

    Microsoft has a team of folks called "Developer Evangelists" that are just the folks you want to talk to.  I recommend you start with http://codefoster.com/contact and he should be able to find one that covers your region & technology.

    Sincerely,

    IoTGirl

    Monday, April 25, 2016 5:28 PM
  • Excellent ! :) thank you IoT Girl :)
    Monday, April 25, 2016 5:43 PM
  • You are very welcome!
    Monday, April 25, 2016 8:07 PM
  • I just saw that we cannot turn on/off the connected screen. What the hell ?! Imagine you have a connected screen to your raspberry and you don't have any keyboard/mouse connected (a real Internet of Things object, in fact...). Your application runs all day long. Would you let your screen on all day long ?!


    is there ANY solution for turning the display off/on? I have a project that designed as a portable unit and run on batteries for over a week between charges, I cant afford the 7" raspberry touch screen to stay on for such a long time... it just doesn't make any sense.

    is there anyone who has a solution for that? even a hardware solution (although if you disconnect the screen from the power and reconnect it it doesn't turn on)?

    any help would be highly appreciated!

    Thank you all in advance,

    Best,

    Ram

    Monday, September 26, 2016 6:19 AM
  • Hi

    Same thing here, still interested for a solution please.

    Tuesday, September 27, 2016 2:57 PM
  • Hi Ram & Insomniak,

    Have you looked into creating your own driver as suggested above?  Unfortunately the Raspberry Pi BSP does not offer Power Aware drivers like the desktop does but there are other platforms that do.

    Sincerely,

    IoTGirl

    Tuesday, September 27, 2016 4:14 PM
  • Hi Iot Girl,

    To be honest, developping a driver is really not the same as developping .Net software.

    I don't understand why Windows 10 IoT team don't create these drivers.

    Let's say there are 3 board supported by win 10 IoT (the most popular for the example). Now, let's say there are 2 ways to display something on each board : an HDMI port and a custom one for specific screens (but for each board, there is one popular screen that everybody uses).

    It means : 6 drivers to develop. What is 6 drivers to develop for a microsoft team ? 

    I have made a pause in my development for personal reasons but I would like to continue it soon. I'm really questioning myself about changing the OS and programming language to have more possibilities. I can't develop everything (and wow, certainly not drivers in C++...).

    Microsoft should help to launch Win 10 Iot community and emulate it. I think, little things missing like turning off the screen are the little things which will kill Win 10 IoT through time. I would like to see Win 10 IoT being a must have and a huge community but it's far too young and not so complete to be able to do that.

    Hope it will raise one day.

    Wednesday, September 28, 2016 6:39 AM
  • Hi Insomniak,

    I can answer your question, "Why Windows 10 IoT team don't create these drivers"?

    Microsoft focuses on developing an operating system that works on multiple platforms.  The work you are discussing is for only one platform, RPi, and very custom.  If Microsoft were to take on that work, and if they had the OEM's knowledge, it would need to be done instead of other work that benefits all platforms.

    To give you an example, let's say you buy a new hardware card for your PC. There are two options at this point:

    1. The card works with Windows 10 default drivers
    2. The OEM of the card produces a Windows Driver for that card.

    Essentially with Raspberry Pi, you are at option 2 and the OEM of the card has the information needed to create the driver for their card.

    Sincerely,

    IoTGirl

    Wednesday, September 28, 2016 5:52 PM
  • Hi IoT Girl,

    I understand that point of view. And it always has been like this with PC stuff. OEM create an hardware product, they develop their drivers.

    What I wanted to point is the fact Windows 10 IoT is starting its race and Microsoft could help a little bit at the begining to make it more efficient. I'm not asking anymore about Raspberry pi driver, it's a more global problem :

    Today, I'm facing many problems with Windows 10 IoT and .Net development on this platform.

    Three examples :

    - Shutting down the screen programmatically (on Linux Rasbian, it is done simply)

    - Using third party libraries (for example, deezer has developped its library on all platforms but win10iot on arm arch : http://developers.deezer.com/sdk/native). It's clearly a Deezer's political choice, ok.

    - Trying to create a plugin aware software (using MEF per example) is not possible due to the choice of limiting to the windows store (ok but how can I test my stuff ? is it possible to create plugins for my app on the windows store ?)

    As you can see, I'm frustrated but I try to be constructive. I'm a .Net developper, I thought about trying to use python and raspbian to take all their advantages but I won't. I still want to use .Net. I just want to point the problems that would, in my opinion, brake Windows 10 IoT community.

    I know Microsoft would like to keep its environment safe (using sandboxing, windows store...) but it shouldn't be a brake for the community.

    I hope someone will ear me :) I just want to see this going big and crazy to let us having fun and perhaps creating crazy stuff !

    Regards

    Steeve

    Thursday, September 29, 2016 8:55 AM
  • Hi IoT Girl,

    I understand that point of view. And it always has been like this with PC stuff. OEM create an hardware product, they develop their drivers.

    What I wanted to point is the fact Windows 10 IoT is starting its race and Microsoft could help a little bit at the begining to make it more efficient. I'm not asking anymore about Raspberry pi driver, it's a more global problem :

    Today, I'm facing many problems with Windows 10 IoT and .Net development on this platform.

    Three examples :

    - Shutting down the screen programmatically (on Linux Rasbian, it is done simply)

    - Using third party libraries (for example, deezer has developped its library on all platforms but win10iot on arm arch : http://developers.deezer.com/sdk/native). It's clearly a Deezer's political choice, ok.

    - Trying to create a plugin aware software (using MEF per example) is not possible due to the choice of limiting to the windows store (ok but how can I test my stuff ? is it possible to create plugins for my app on the windows store ?)

    As you can see, I'm frustrated but I try to be constructive. I'm a .Net developper, I thought about trying to use python and raspbian to take all their advantages but I won't. I still want to use .Net. I just want to point the problems that would, in my opinion, brake Windows 10 IoT community.

    I know Microsoft would like to keep its environment safe (using sandboxing, windows store...) but it shouldn't be a brake for the community.

    I hope someone will ear me :) I just want to see this going big and crazy to let us having fun and perhaps creating crazy stuff !

    Regards

    Steeve

    this is SO true!

    this issue is a huge barrier for our project, I sure hope to find some solution soon.

    Thursday, October 13, 2016 6:35 PM
  • Hi Ram,

    Please outline your scenario and the barrier?  Microsoft builds a cross-platform OS that is designed to be abstracted from the hardware.  This means that the BSP or Board Support Package from the OEM must supply the features Windows needs at that abstraction layer. Note that the Raspberry Pi BSP is available on GITHUB and you should be able to customize the drivers to do what you wish.

    Also there are other IoT Core boards available.  Please take a look at https://azure.microsoft.com/en-us/documentation/articles/iot-hub-tested-configurations/ as these state what OS they support.

    Sincerely,

    IoTGirl

    Thursday, October 13, 2016 7:20 PM
  • Thank you for your reply.

    our project is a portable self-sustaining device packed with Arduino boards connected to a Raspberry Pi 3+ that runs on batteries, it is designed to run between charges up to over a week, the screen is being used to setup and arm the device according to its use by the end user, once it has been armed there is no need for the screen to stay ON for ever draining the power out.. your suggestion to customize the driver is appreciated however I have no idea where and how to begin doing that; I'm sure that anyone of MS Core team could do it in a heartbeat as they have the knowledge/skill/experience with writing drivers to Windows IoT which I'm guessing it safe to say that most of us here never done that.

    unfortunately (for us) we are looking into other solutions, learning Linux/Python to the level we have with C# and Windows OS just seems like a HUGE task so we are looking, as you have guessed, into other boards that can run Windows 10 (Not IoT) with power management running in a kiosk mode.

    Sunday, October 16, 2016 12:46 AM
  • Hi Ram,

    Unfortunately your supposition "I'm sure that anyone of MS Core team could do it in a heartbeat as they have the knowledge/skill/experience with writing drivers to Windows IoT which I'm guessing it safe to say that most of us here never done that" is incorrect.  TheRaspberry Pi hardware is extremely custom and will require someone with deep knowledge of that hardware to sus it out.  If you remember the versatility of the PC was because the hardware was standard and universal drivers could be leveraged.  Sadly, in the Raspberry Pi that is just not the case or you would be correct and the drivers would already work.

    My suggestion above was to seek a board that does accommodate standard drivers from the link I provided above.  You can reach out to the OEM of each board for support and they can help you with your specific need.

    Sincerely,

    IoTGirl


    Sunday, October 16, 2016 10:05 PM
  • Perhaps you could drive the Backlight as stated on following link http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-touch-display/backlight-control
    Wednesday, December 21, 2016 4:33 AM
  • My question was not about raspberry pi touch display but hdmi screen ;)
    Wednesday, December 21, 2016 7:07 AM
  • IoT Girl, 

    Here is the answer from Raspberry pi forums :

    "As above, this is a MS question, but if they are not interested, then might be time to move to Linux."

    https://www.raspberrypi.org/forums/viewtopic.php?f=105&t=167687

    SO ???? What do we do now ??? Honestly, there are solutions like LattePanda that makes windows 10 (not IoT, the desktop version) running on a tiny card (and this card has a built in arduino on it...)

    If Microsoft wants to make IoT live I think they have to animate a little bit more the community...

    My 2 cents but I think I won't be here to discuss about that for a long time and I will finally choose another solution (win desktop or linux). It makes me really sad to tell this but I can't figure out using a device without being able to turn off its screen in an IoT world !!!

    Wednesday, December 21, 2016 8:30 AM
  • Hi Brian,

    I don't know what to tell you about the answer in the non-Microsoft forum except that Windows is an operating system designed to run on many platforms while Raspian is designed strictly for the Raspberry Pi which gives it the luxury of creating extremely custom hardware and OS items that are never expected to support other platforms.

    In the case of Windows, it is expected that the OEM of the hardware provide the interfacing code (Such as drivers) to allow Windows to interface to that hardware.  In the case of RPi, only very basic drivers were built and therefore Windows can only control some of the features.

    For example, When you buy a new component for a PC running Windows it either states that:

    • Designed for Windows - Therefore it works with built in Windows Drivers
    • Contains Drivers for Windows - The OEM provides custom drivers to allow Windows to use that hardware

    It is my understanding that both the GPU and display on the RPi are so custom that standard Windows and HID drivers won't work.  As these are not Microsoft products, the OEM is expected to provide the custom work required or create hardware that meets the published standards.

    I realize that this does not solve your issue but hope it clarifies the answer from the Microsoft perspective.

    Sincerely,

    IoTGirl


    Wednesday, December 21, 2016 10:44 PM
  • I'm definitly thinking about quitting Win 10 IoT just because of that... I'm a full stack senior .Net developer but I'm sure I will find answers into raspbian community.

    Goodbye Windows 10 IoT !

    Thursday, December 22, 2016 1:37 PM
  • Hi Brian,

    You should certainly choose the platform that best meets your need and IoT Core does run on other boards / chipsets unlike Raspian. I recommend you review WindowsOnDevices.Com for other boardsets that may offer a more complete driver set to meet your requirements.

    Sincerely,

    IoTGirl

    Friday, December 23, 2016 12:20 AM
  • I had terrible experience with win IoT, I replaced the board to LattePanda running windows 10 pro and our project was back on track without the pitfalls of windows IoT.
    Friday, December 23, 2016 10:12 AM
  • Yep, a really good alternative but not the same price :(

    I think MS won't be in the race of Internet of Things for a long time with such problems...

    Friday, December 23, 2016 12:19 PM
  • Hi IoTgirl, insomniak, Ram, and all the others!

     

    I started a new thread in the German forum here. My question was about to switch off the HDMI output like it is possible with Linux (see link here (sorry ist in German): Link). I tested it with Rasbian and Python, can’t say that I had issues, it was easy to implement and the HDMI interface woke up reliable.

    I’m also working with Windows IoT Core and on a mighty UWP app. I’m still looking for a solution to switch off HDMI easily (programmatically).

    I understood that a control of the backlight of a display depends on the drivers of the hardware itself. As per the answer of the support of the display I am using (this one) there are no drivers available right now.

     

    My question is, since it is a while ago, maybe with the newest updates of the IoT Core system there are new drivers available – and it is possible to switch HDMI off via software code? Does anybody have new results?

    In times when everybody talks about to save energy it seems to be naturally that such a simple functionality is provided.

     

    Regards René

    Monday, April 24, 2017 4:18 AM