Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpd-display-scaler rescales any 1920x1200 display, not just the internal panel #13

Closed
alexmbird opened this issue May 16, 2019 · 0 comments

Comments

@alexmbird
Copy link

Steps to reproduce:

  • GPD Pocket 2 (amber black in this case)
  • External 1920x1200 HDMI display connected via adapter. I have mine set as primary but doubt that makes a difference.
  • Reboot, login and let gpd-display-scaler run
  • Marvel at the comically big fonts on your external monitor :(

Looking at the output of xrandr it seems the Pocket's internal display is always listed as eDP1 and the external is always DP1.

A second, possibly-related problem sometimes occurs when I disconnect then reconnect the HDMI monitor. It starts out at 1:1 scaling but upon reconnection is set to the same 0.64x0.64 as the built-in panel. If the DP1 and eDP1 names are static it might therefore make sense to reset it whenever gpd-display-scaler runs.

My "fixed" script looks like:

# If internal display is present & set to high res, scale it
if [ xrandr | egrep --quiet "^eDP1 connected" ]; then
  if [ "${PANEL_RESOLUTION}" == "1920x1200" ]; then
    xrandr --output eDP1 --scale 0.64x0.64
  fi
fi

# (re)set external display as 1x1 as scale can be forgotten upon reconnect
if [ xrandr | egrep --quiet "^DP1 connected" ]; then
  xrandr --output DP1 --scale 1x1
fi

The check for eDP1 being 1920x1200 might now be superfluous. I can't think of any situations where it would be running at another res where scaling isn't desired, but maybe I'm missing somebody else's use case.

I'd submit this as a PR but I don't have any other GPD Pockets to test it on so my assumption about monitor names may be flawed. Best if somebody with access to more devices can test it first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant