galliumos-distro icon indicating copy to clipboard operation
galliumos-distro copied to clipboard

HiDPI support

Open hugegreenbug opened this issue 9 years ago • 20 comments

Some chromebooks (pixel, pixel2) have high a number of ppi, making the desktop, icons, windows, etc... extremely small. XFCE doesn't support scaling the desktop yet and most Linux desktops don't. Gnome3 and Cinnamon seem to be the best at this right now.

Some applications, such as chromium and firefox, do support scaling.

The solution for us is to create different versions of the Arc theme, and modify portions of the desktop to increase the sizes of the UI elements. We will create a hidpi package that pulls in these changed packages.

The reason for this solution is that Gtk2 doesn't support UI element scaling, nor does xfwm4. It would be too large of an undertaking to add all of this support ourselves. Gtk3 does support UI element scaling, so once XFCE moves to it, scaling the desktop should be easier.

hugegreenbug avatar Nov 04 '15 20:11 hugegreenbug

dell chromebook 13 and toshiba chromebook 2 also have high pixel densities. did you check/test xsettings > xft > dpi to adjust the scaling?

artingei avatar Nov 04 '15 21:11 artingei

Ok, thanks for adding those two. They don't have as high pixel densities I think , right?

The setting you provided scales the fonts. XFCE makes this easy in the settings manager. That helps a lot; however, there are still a lot of issues. Some can be fixed with settings, the theme needs be changed, and some code needs to be changed.

hugegreenbug avatar Nov 04 '15 21:11 hugegreenbug

Alright. If I can help with the theme… you know where to find me.

artingei avatar Nov 04 '15 21:11 artingei

I can test on the Dell Chromebook 13 in one week if we need to.

artingei avatar Nov 05 '15 22:11 artingei

That would be great!

hugegreenbug avatar Nov 05 '15 22:11 hugegreenbug

Tested 1920x1280 on a YUNA (Acer Chromebook 15, 15" screen), and all UI elements were usably-sized. Trackpad movement was reasonable. No complaints at all.

The PIxels are 2560x1700, which might present other issues.

reynhout avatar Jan 02 '16 18:01 reynhout

Some 13" devices also have 1920x1080 screens, so I'm not sure if that will be usable.

ghost avatar Jan 02 '16 22:01 ghost

I have a Pixel2 (2015 Pixel) and would be interested in testing the theme or anything else you're putting together.

Editing to save from new post: Here are what (I think) are the proper Modelines for the Pixel2 to match resolutions in ChromeOS (Ironically, 2560x1700 is the only properly detected resolution, thus not included in below):

Modeline "1920x1275_60.00"  205.50  1920 2056 2256 2592  1275 1278 1288 1322 -hsync +vsync
Modeline "1600x1062_60.00"  141.50  1600 1704 1872 2144  1062 1065 1075 1102 -hsync +vsync
Modeline "1440x956_60.00"  113.25  1440 1528 1672 1904  956 959 969 992 -hsync +vsync
Modeline "1280x850_60.00"   88.75  1280 1352 1480 1680  850 853 863 883 -hsync +vsync
Modeline "1024x680_60.00"   56.25  1024 1072 1176 1328  680 683 693 707 -hsync +vsync
Modeline "800x531_60.00"   33.25  800 832 904 1008  531 534 544 553 -hsync +vsync
Modeline "640x425_60.00"   21.00  640 664 720 800  425 428 438 443 -hsync +vsync

One Note: After creating a 10-monitor.conf file and setting the PreferredResolution to say, 1440x956, you will get the following on boot: GalliumOS splash>monitor cycle>Gallium Login (at properly set resolution)>monitor cycle>Gallium Login again. I'm guessing there's other grub bits that need to be set in conjunction?

caskaid avatar Jan 16 '16 18:01 caskaid

Another Pixel2 here. Above resolutions are usable, but it's a real shame Gallium comes out so fuzzy compared to e.g. Gnome or Unity wrt UI scaling. I've been attempting to find some way to apply a DPI of 240 in conjunction with the 2560x1700 resolution, but no luck so far. xfce4 seems to mostly ignore xorg directives and configurations.

I'm willing to test out any suggestions or ideas!

msolters avatar May 24 '16 01:05 msolters

I'm posting my settings, as they may provide helpful to others with a Pixel2. I've been able to adjust the various settings to give what I feel is an extremely usable and crisp desktop. The following settings are for a full 2560x1700 resolution:

Caskaid's Example Desktop: http://imgur.com/2mA8X2E

*Anything not mentioned is probably default

Theme Style Arc-GalliumOS

Icons Numix Circle GalliumOS

Panel Properties Measurements>Row Size - 70px

Desktop Preferences Icons Tab>Appearance: Icon Size - 100 Use Custom Font Size - On: Setting: 11px Show Icon Tooltips - 128px

Settings>Appearance>Fonts Defualt Font: Noto Sans 10 Enable Anti-aliasing - On Custom DPI Setting: 188px

Window Manager Style - Default-xhdpi Style>Title Font - Arimo 10

Window Buttons (*This one is tricky, and accessed by right-clicking in the blank space to the right of the Launcher Items in the panel). Appearance>Show Button Labels - Off I have not yet found a way to to display minimized window button labels on a single line given my panel size preference).

Additional Notes

  1. There are a number of leftover portions that are not scaled appropriately. These items are hard-coded and would require a different fix.
  2. Chromium will not scale appropriately without starting by utilizing "chromium --force-device-scale-factor=2"
  3. Many applications will have parts that do not scale appropriately, (Such as Gimp) however menu's should be usable.

caskaid avatar May 24 '16 18:05 caskaid

Hey @caskaid thanks for the input. Those are some excellent suggestions. I have found a a few tweaks I'd like to share as well, all applicable to using Gallium at the full 2560x1700 resolution:

hdpi screenshot 1

Use Arc with HDPI Unfortunately, when using the default-xhdpi in window manager, I get really ugly window controls (close, min, max). For some reason they come out as the wrong color and have weird hover colors. Secondly, as a matter of personal preference, I don't really care for that skin.

I found a fork of the default Arc theme that has had the window controls redone for HDPI. Arc has been updated since then, so I created another repo and merged in the latest changes, but kept all the HDPI-specific alterations. This new HDPI-friendly Arc can be installed in parallel with the flavors that come out of the box with Gallium!

To install:

git clone https://github.com/msolters/arc-hdpi
cd arc-hdpi
./autogen.sh --prefix=/usr
sudo make install

Then from the WIndow Manager, "Arc," "Arc-Dark," etc. will be available.

Chrome In my experience, the official Chrome browser is better for HDPI screens than the Chromium that comes with GalliumOS. You can download the .deb right from the official website. It scales everything out-of-the-box. (see above)

Atom Atom has a package called HIDPI that automagically scales the whole interface (will require a restart of the app): atom hidpi

System Icon & Cursor SIzes Settings Editor > xsettings IconSizes = gtk-large-toolbar=32,32:gtk-small-toolbar=48,48 CursorThemeSize = 48 I found these became consistent across all apps after rebooting.

File Selector I found it frustrating when an app would ask me to open a file as the selection window is initially rendered very tiny. This can be resolved by modifying the file ~/.config/gtk-2.0/gtkfilechooser.ini. Change the following values to increase the window size:

GeometryWidth=1220
GeometryHeight=800

Whisker Menu I dragged the upper-right corner of my whisker menu to change the size to a reasonable percentage of my screen when open. It seems to remember this across reboots!

I am trying to find a way to make all windows open larger, TBH. Once the font DPI is increased many windows spawn far too small to contain the text. I'm not sure this is something I can change through GTK2/theme management?

msolters avatar May 26 '16 04:05 msolters

@caskaid @msolters This is great info, it helps a lot! I'll link to this ticket from the wiki to help others find the info until we're able to incorporate and test it all. Thanks for posting it!

reynhout avatar May 26 '16 15:05 reynhout

I'm also working on some other tweaks for the Arc theme that I think make it bit easier:

  • [x] Larger pane dividers (so that resizing is touch friendly)
  • [x] Larger radio/check boxes (these are very small by default because they use pixbuf assets)
  • [ ] Increase text spacing (e.g. labels -- I can't figure this one out)
  • [ ] Increase icons inside address bars (e.g. "refresh" thunar)
  • [ ] Perhaps merge this hdpi theme into the GalliumOS/Arc theme if they can be installed separately in Window manager but equivalent in theme color selector

msolters avatar May 26 '16 16:05 msolters

Some improved settings for very HiDPI (2560x like SAMUS) displays are in the testing repodist now.

See https://github.com/GalliumOS/galliumos-distro/issues/100#issuecomment-241928033 or https://wiki.galliumos.org/Installing/Samus#Post-install_Customization for details.

reynhout avatar Aug 24 '16 18:08 reynhout

Is there any way to adjust the size given to chromium after the new changes?

doscero avatar Sep 13 '16 23:09 doscero

Does updating to xfce 4.13 settings fix the problem? "Xfce4-settings 4.13 is out and is a development release for the 4.13 series. This initial release marks Xfce Settings being fully-ported to GTK+ 3.x. That's the main change with this release is the port from GTK2 to GTK3 but some bugs do remain. There are some screenshots via this blog post." https://smdavis.us/2016/11/09/xfce-settings-4-13-0-released/

Eduardo-Alves avatar Nov 11 '16 19:11 Eduardo-Alves

@Eduardo-Alves When all of Xfce (or at least all of the bits used in GalliumOS) is ported to GTK+3, it should solve the HiDPI issues.

It looks like there's been an uptick in Xfce releases lately, but I think xfce-settings 4.13 is the only package ported so far. I don't know if we can expect the 4.13 versions of the other packages to be GTK+3 as well.

Settings is a relatively small app, but hopefully it's the starting point for a fully GTK+3 Xfce!

reynhout avatar Nov 11 '16 20:11 reynhout

With the release of XFCE 4.14 we finally have a GTK+3 version of XFCE with native HiDPI support. So updating to XFCE 4.14 we could close the issue once and for all.

tblaschke avatar Aug 14 '19 12:08 tblaschke

@tblaschke Indeed, this is great news. Xfce 4.14 includes a screensaver as well, which will hopefully improve another of our longstanding rough spots.

It looks like we'll need to do custom packaging for this release -- I don't think we'll get any help from Ubuntu here. I'll try some test builds here and if things go well, push to the GalliumOS testing repository.

reynhout avatar Aug 14 '19 14:08 reynhout

@reynhout If I'm not mistaken the Xubuntu staging PPA contains XFCE 4.14 packages for 18.04 . I don't have my Chromebook with me to try out if they just work or not.

tblaschke avatar Aug 14 '19 15:08 tblaschke