Prevent xrandr scaling from becoming blurry

7,188

All scaling is going to look blurry. That's because it's inherently what happens if you try to make 1.3 pixels out of one pixel. You can improve the results with a bit of filtering, but it will always be worse quality.

What (likely, there's not enough info) happens with the second line is that the output won't use scaling, instead it will use the correct resolution and additional framebuffer.

Options:

  • Find out the physical resolution of your TV (it's likely to be 1920x1080, but can be smaller for cheaper/smaller TVs).
  • Find out what logical resolutions your TV supports (look into Xorg.log). It will likely be more than 1920x1080.
  • Find a logical resolution that will map 1366x768 to your physical TV resolution in the best way. Try this resolution. Scaler and filters in the TV will be better than than the scaler in X.
  • Use this resolution to clone your complete display (centered, smaller).
Share:
7,188
user102873891
Author by

user102873891

Updated on September 18, 2022

Comments

  • user102873891
    user102873891 over 1 year

    I am attempting to connect a laptop with a LVDS1 resolution of 1366x768 to a HDMI1 resolution of 1920x1080 (hardware that HDMI1 is connected to is a 4k Samsung TV).

    I am trying to clone my laptops LVDS1 display to the TV without the scale blurring.

    When running

    xrandr --output HDMI1 --auto --scale-from 1366x768 
    

    The output does fill the entire TV with 1080p resolution but the text is a bit blurred and everything seems blown up in size.

    When running

    xrandr --output LVDS1 --auto --output HDMI1 --auto --right-of LVDS1
    

    The output also fills the entire TV with 1080p resolution, but this time the text is perfectly clear and the UI and other aspects of the system is not fuzzy/blurry and seems to be proper in size (the UI is physically smaller and sharper on screen).

    The problem with the second method is that it adds the TV as a new monitor on its own virtual desktop in i3. This means that if I am doing a presentation I have to make sure that I have that virtual desktop selected to manipulate it. EVEN WORSE is that I can't view the display on my laptops monitor so I have to do all the work blind.

    Is there a way to clone the monitor as with the first command so that the TV replicates the vision I get on the laptop, but with the clarity and sharpness of the second command?

    Thanks

  • user102873891
    user102873891 over 5 years
    Thanks for the input. A second framebuffer for the second command makes sense to me as well. With this being said I wonder if it is possible to have X create a second framebuffer that simply redraws everything in the second resolution and tell xrandr or X to output the contents of that buffer to the HDMI port. If it was so that a second frame buffer was created for the second command, I don't see why I couldn't manually tell X to draw both FB with the exact same contents only differing by resolution and present one to LVDS1 and the other to HDMI1.
  • dirkt
    dirkt over 5 years
    Well, you can't draw the "exact same content" in two different resolutions - the content has to be different for different resolutions. You'd have to tell each application to render each element twice, using different font sizes etc. So that won't work. You need some form of scaling to duplicate an image at different resolutions, and the best you can do is pick ratios that minimize blur, and display paths that have good scalers and filters (like the in-built resolution scaling in the TV).