brioche icon indicating copy to clipboard operation
brioche copied to clipboard

Apps look blurry

Open mjarkk opened this issue 5 years ago • 7 comments

I don't know if it's visible here but vscode running on the right looks very blurry.
image

I think this happens because my laptop has a 4k screen and the app is internally running at a very low resolution and upscaled to the 4k resolution.
Is there some way to fix this?

mjarkk avatar Dec 01 '20 16:12 mjarkk

I am not under chromeos right now but if I remember well you can define specific arguments for sommelier with SOMMELIER_ARGS environment variable.

Example: SOMMELIER_ARGS="--scale=X --dpi=Y" brioche mycontainer app code --verbose

Try to find the best values for X and Y.

sebanc avatar Dec 01 '20 20:12 sebanc

It seems like the --dpi option is gone.

When testing all the commands one for one like this:

chronos@localhost / $ brioche ubuntu shell
(container:ubuntu) chronos@ubuntu ~ $ export SOMMELIER_ARGS="--scale=1 --dpi=200"
(container:ubuntu) chronos@ubuntu ~ $ export CONTAINER_GPU="0"
(container:ubuntu) chronos@ubuntu ~ $ sommelier \
  -X --x-display=:0 \
  --shm-driver=noop \
  --drm-device=/dev/dri/card$CONTAINER_GPU \
  --glamor $SOMMELIER_ARGS \
  ~/.brioche_last_app.sh

It returns:

Option `--dpi=192' is unknown

This also happends when i add --dpi directly to the sommelier args.

When i just run sommelier it returns all the options but it doesn't contain dpi for some reason.
When i run sommelier in the normal linux container (Crostini) it actually has the option.

mjarkk avatar Dec 01 '20 21:12 mjarkk

Found a fix to get vscode not to looking blurry.

(container:ubuntu) chronos@ubuntu ~ $ export GDK_SCALE=2
(container:ubuntu) chronos@ubuntu ~ $ export SOMMELIER_ARGS="--scale=2"
(container:ubuntu) chronos@ubuntu ~ $ sommelier \
  -X --x-display=:0 \
  --shm-driver=noop \
  --drm-device=/dev/dri/card$CONTAINER_GPU \
  --glamor $SOMMELIER_ARGS \
  ~/.brioche_last_app.sh

mjarkk avatar Dec 01 '20 21:12 mjarkk

@sebanc Do you think using GDK_SCALE=2 as fix is a good enough fix to resolve this issue?

mjarkk avatar Dec 01 '20 21:12 mjarkk

Unfortunately, my experience is that scaling is very bad with sommelier even in crostini.

The GDK_SCALE=2 fix you found seems perfect in your case but I cannot add it by default for everyone.

I will still look at the missing "--dpi" option, it's weird that it is not present, maybe Google changed something in sommelier.

sebanc avatar Dec 01 '20 22:12 sebanc

This is the ubuntu container with the default desktop but that's not used here.
If you are wondering what those commands are above those are copied from the app command (brioche ubuntu app) and i'm running them directly inside the container cli using brioche ubuntu cmd.

mjarkk avatar Feb 17 '21 10:02 mjarkk