• Almost perfect HiDPI experience on Linux (Xorg)

    Awesome HiDPI on Xorg

    In 2013 I bought a Macbook Pro 13” which came with a HiDPI display (also known as retina display). Already back then the support for a single HiDPI display was quite alright with KDE4 and a few tweaks here and there. Months later Qt5 got native HiDPI support and most applications switched from GTK2 to GTK3 and finally the outliers (chromium based apps, godot, arduino…) got support for higher DPIs as well.

    This would have meant perfect support for HiDPI on linux already in 2015 or so but we are missing one important thing which is supporting both HiDPI and normal DPI screens at the same time. In order to support HiDPI screens applications need to render themselves bigger than they used to, how much bigger depends on the screen pixel density which, for example, in the case of my laptop is from 1.75 to 2 times bigger.

    This means that applications rendered for HiDPI look huge on normal screens:

    HiDPI File dialog on regular screen

    Open dialog looking huge

    Scaled HiDPI File dialog on regular screen

    Open dialog looking ok

    Here is where the internet seems to tell you that there is nothing to do but wait until Wayland arrives and saves us all (I can’t wait for that btw) but that’s actually not true, X can do it.

    XRandR allows us to apply transformations on the outputs, like for example rotation, and it also allows us to scale the screens. Scaling the screens means that X will virtually increase the amount of pixels available in the display and automatically adapt the final image size to the actual output resolution. For example:

    If a 2x2 scale transformation is applied to a 1920x1080 screen it will be seen as a 3840x2160 screen by the applications but X will magically cut that in half before sending the image to the monitor. So we have effectively turned our normal density screen into HiDPI.

    This is an example of how the xrandr command line looks like:

    xrandr --output eDP1 --auto --output DP1 --auto --scale 2x2 --right-of eDP1
    

    This will set DP1 to the default mode, scale it by 2 and place it at the right of the HiDPI laptop screen (eDP1).

    Wow! Awesome! This is so cool! Why is everybody not doing this? Where is the catch?
    Mostly because of one bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=39949

    If you read through the bug entry you will find a patch created by Chris Wilson in 2014 which is shipped by default in some distributions but it has never been integrated into master.

    If your distribution doesn’t ship with this patch by default (good for them!) you can build your own xorg-server, the patch should apply until 1.18 and for 1.19 you have a ported version here.

    Although with this patch the experience is already way better since the applications will look correctly on all screens Qt has a few bugs that will create weird glitches specially by placing windows where they don’t belong.

    Drunk comboboxes

    Shy tooltips

    Jumpy Drag And Drop


    I have been working on 3 patches that solve most of these at least in my day to day use.

    These two still need to be reviewed and might not get accepted:
    https://codereview.qt-project.org/#/c/182207/
    https://codereview.qt-project.org/#/c/182392/

    This one seems to be on track to be merged (Drag and Drop):
    https://codereview.qt-project.org/#/c/182391/

    With all this patches the HiDPI experience in any modern Linux distro is as good as in macOS and the best part is that we do not have to wait until Wayland.


  • open365, let's declare war at Google and Microsoft

    Open365 is a public and/or private cloud designed to compete with the likes of Google Drive or Office365 by leveraging all the best free software out there.

    The service is designed to scale horizontally as well as to be resilient to components crashing or going crazy. In order to achieve this we have implemented a microservice architecure that communicate using a bus (rabbitmq) plus some other tricks so we can scale using commodity hardware horizontally. Nothing fancy, nothing revolutionary but it had to be done :)

    Finally, we’ve integrated under the same system very well know software solutions for File sinchronization, PIM (Email, calendar,contacts…) and office.

    Specifically

    For the last two, we re using SPICE and our HTML5/Javascript client to run those applications in the server and send only the interface to the Web browser in a really efficient way.

    This is how it looks like:

    Status

    The public service is in open beta so you can go to Open365 and try it out for free.

    As I write this blogpost we are working hard to release all the code as free software. There is a lot to be done before we can release all the code such as: creating a simple installer, preparing documentation and accomodating the new repositories to our CI.

    We expect to release everything within days, but it will be done when it is done :)

    Cheers!


  • Where have I been?

    I can’t imagine anything worse than waking up every morning without any energy for going to work.

    The first time I heard that statement I was 17 and it made an impression on me. It made me think of how we use our limited time, which roughly is: 1/3 sleeping, 1/3 at work and 1/3 at what we call spare time. We can’t control how much we need to sleep, but we can take a stance on the other two thirds (work and spare time).

    And this is the reason behind my disappearance, my job at BlueSystems was not fun anymore and every project I mantained at KDE felt more like a chore than anything else. After a month of not jumping out of the bed to head to work it was time to move on. So I passed maintainership to the people that were actually doing the job (special mention to David) and I quit my job as a full time KDE hacker.

    Nowadays I am working at a company called eyeOS, but more on that in the next post :)

    I appreciate all the people that have been asking how I have been during this last year, my apologies for disappeararing without notice.

    Cheers!


  • For community free of Trolls

    In light of the last comments containing insults and other attacks to members of our community I have decided to make a video blog explaining my thoughts on the issue.

    The video contains two separate topics:

    • Explanation of why we can't tolerate this behavior
    • Some ideas on the actual matter (Baloo)

    Please, watch the whole thing before commenting and I hope we all work together to push away the trolls in our community.

    Cheers !


  • Desktop applications of tomorrow (I)

    This is the first of three posts where I am going to share my vision for the desktop apps of the short-term future.

    When I am using my workstation or laptop I find myself spending most of my time in the browser, with it I do a lot of different tasks I used to be doing with many different native applications for example: listening to music, watching videos, chatting with friends, sending pictures...

    When I am using my tablet or phone though the situation changes. I find myself rarely using the browser, in fact I only use it to visit some site I saw on another app like Twitter or Facebook.
    At the beginning (HTC Magic, my first Android phone) I thought this was because the browser was so unbearable that they had to come out with an alternative to the web, so they came out with "specific apps", that is one app per each internet service or purpose.

    But things have evolved since, and now my Nexus5 and 7 can render websites some times even better and faster than my laptop, but anyway I still prefer to use Android apps. Why?

    Content

    Both web and android apps are way better at managing content than we are.

    They always have something to show to you: perhaps something new that might interest you? perhaps a bold guess based on you previous search? or perhaps just what is "hot" nearby? Two of the best example are Youtube and Spotify.

    Your content is available everywhere, and I am not talking only about putting stuff into the "cloud" but I am talking about your online profile. Continuing with the example of Youtube and Spotify on both apps you will have your: playlist, subscriptions, radios, friend list on any device either via the app or the web.

    Sharing content is damn easy on both either by copying the url on the Web or by clicking the omnipresent share button in Android. As a matter of fact I don't remember the last time I shared a picture or an article using a desktop app... Probably it was really long ago.

    They know what content you like... They know your habits... They know everything and they use it to provide the most convenient content at all time. Oh look! It is Monday, perhaps you want to watch the new video uploaded in this Youtube channel as you do every week?

    Finally, both web and Android apps try to avoid making the user think too much which I find it to be a relief when I am using them. Again they do this by knowing what content you are interested on and by providing it to you in the best possible way.

    That is it for now, In part II I will explain the current situation of the desktop apps and in part III I will show a mockup of a video app I hope to work on someday. In the meanwhile what do you think? Is the same thing I describe in this article happening to you?