sebanc / brioche

An alternative to Crostini / Crouton for devices running brunch
GNU General Public License v3.0
77 stars 8 forks source link

Apps look blurry #4

Open mjarkk opened 3 years ago

mjarkk commented 3 years ago

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?

sebanc commented 3 years ago

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.

mjarkk commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

sebanc commented 3 years ago

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.

mjarkk commented 3 years ago

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.