title: Changing Chrome OS resolution via chrome.system.display.setDisplayProperties
body: <p>I am using a Chrome OS device for digital signage. I have a full screen Kiosk app that I put together for use with our signage. Some of our TVs are defaulted to 1280x800 resolution (but support 1920x1080). To fix this, we have to login to Chrome OS and reset the resolution. Sometimes, for reasons unknown, Chrome OS reverts back to the 720p resolution. I found that Chrome OS api now supports setting the resolution via system.display.setDisplayProperties (<a href="https://developer.chrome.com/apps/system_display#method-setDisplayProperties" rel="nofollow noreferrer">https://developer.chrome.com/apps/system_display#method-setDisplayProperties</a>). </p>
  
  <p>However, the documentation is not clear: I managed to actually change the resolution but Chrome OS displays a message asking whether or not I want to accept the resolution change. In theory, I can't click Accept because in most cases the Chromebox isn't accessible and doesn't have a mouse/keyboard. </p>
  
  <p>I am using this code to check resolution on launch: </p>
  
  <pre><code>chrome.system.display.getInfo(function (display_properties) {
      let width = display_properties[0].bounds.width;
      let height = display_properties[0].bounds.height;
      let id = display_properties[0].id;
      let mode = display_properties.mode;
      let displayOptions = {
          "displayMode": {
              "width": 1920,
              "height": 1080,
              "widthInNativePixels": 1920,
              "heightInNativePixels": 1080,
              "uiScale": 1,
              "deviceScaleFactor": 1,
              "isNative": true,
              "isSelected": true
          }
      };
  
      if (width !== 1920 || height !== 1080) {
          chrome.system.display.setDisplayProperties(id, displayOptions, function() {
              console.log("error setting res:", chrome.runtime.lastError);
          });
      } 
  });
  </code></pre>
  
  <p>This code works flawlessly. However, INSIDE of Chrome OS I am getting a messaging asking me to accept the resolution change. In Kiosk mode, I am not seeing anything (Kiosk app is full screen I assume it's hiding it) - it changes the resolution and reverts back to the old resolution after about 15 seconds.</p>
  
  <p>Suggestions on how to approach this?</p>