ZeroPhone / Discussion-and-Research

General-purpose ZeroPhone discussion (mostly happening in Issues tab)
GNU General Public License v3.0
9 stars 0 forks source link

[Usage scenarios] Portable desktop environments and dynamically attaching HDMI monitors #3

Open CRImier opened 6 years ago

CRImier commented 6 years ago

From my experience, one can't simply hotplug a HDMI monitor to a Raspberry Pi and have it work at full resolution without caveats. The requirements seem to be:

  1. You need to hardcode the resolution in /boot/config.txt, which gives seamless support of a certain resolution through the entire boot time
  2. Otherwise, you have to have a HDMI monitor connected at boot
  3. You can't switch the resolution for an X server that's currently running; you need to restart it so that the new resolution is applied 3.1 I could do it with sysvinit, but couldn't figure out how to restart the X server with systemd

Usage scenarios that, ideally, would be supported:

  1. Being able to launch and stop X (the graphical environment) from ZPUI
  2. Launching ZeroPhone with no X and no HDMI monitor connected, then, after arbitrary period of time, connecting a HDMI monitor and starting X 2.1 X should launch 2.2 The monitor resolution should be automatically recognized and applied
  3. Connecting a HDMI monitor to a ZeroPhone, launching X, then disconnecting the monitor and connecting ZeroPhone to another monitor (with different resolution) 3.1 The X server resolution should be changed, not requiring a restart of the X server (and thus not losing the launched GUI apps) 3.1.1 The resolution change can be triggered manually, but it's best if it'd be done automatically

These usage scenarios were one of the main reasons that ZPUI has a Tvservice app, however, for some reason, the framebuffer changes do not work.

Questions:

Useful links:

CRImier commented 6 years ago

Meta TODO: