You are not logged in.

#1 2022-08-07 21:31:34

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

[SOLVED] 1024x768 resolution with nearest neighbor scaling

I'm using a 4K or rather UHD screen (3840x2160) and would like to use a 1024x768 resolution with black bars on
the left and right side and nearest neighbor scaling instead of bilinear filtering which is the default for all monitors that I've ever seen.
There's ways to kind of get this to work by actually running 3840x2160 but rendering a 1024x768 and scaling it up.

This can be done with xrandr or nvidia-settings.
I also managed to get some black bars going.
So what worked best for me so far was this command:

nvidia-settings -a CurrentMetaMode="DP-2: 3840x2160_60 {ViewPortIn=1024x768, ViewPortOut=2880x2160+480+0, ResamplingMethod=Nearest}"

This gives me the crisp upscaling and black bars.
There's one problem though: The right side of the screen is "cut off".
Which means when I maximize windows it acts as if I was still using a 16:9 resolution, rendering the right part of let's say a browser not accessible.
In games that scroll by putting the mouse at the edge of the screen it makes this not work for the right side, while working on the left, top and bottom.

Does anyone know about this problem or has a better solution?
I'm open to anything, like for example using some WINE settings to pull this off or something.
I've already tried all kinds of things over the last few days. At this point I would jump into the air if somebody knows of a way to get this to work.

Last edited by Lyxodius (2022-08-12 06:34:26)

Offline

#2 2022-08-08 20:34:19

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

What's the resulting "xrandr -q" output and "xwininfo -root"?
What WM do you use?

Online

#3 2022-08-10 18:11:35

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

Thanks for your reply!

xrandr -q:

Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
DP-0 connected (normal left inverted right x axis y axis)
   3840x2160     60.00 +
   2560x1440     59.95  
   1920x1080     60.00    59.94  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 632mm x 360mm
   3840x2160     60.00*+  30.00    29.97  
   2560x1440     59.95  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected (normal left inverted right x axis y axis)
   3840x2160     60.00 +  30.00    29.97  
   2560x1440     59.95  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-5 disconnected (normal left inverted right x axis y axis)
USB-C-0 disconnected (normal left inverted right x axis y axis)

xwininfo -root:

xwininfo: Window id: 0x1e5 (the root window) (has no name)

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1024
  Height: 768
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+0  -0+0  -0-0  +0-0
  -geometry 1024x768+0+0

Offline

#4 2022-08-10 19:34:44

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

Those are both ok, the issue is likely your window manager.
1. can you move the mouse into the "dead" area or does it stop at the visible borders?
2. What window manager do you use?

Online

#5 2022-08-11 07:35:23

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

1. The mouse works as expected. I cannot move it into dead areas, it stops at the borders.
2. I use Cinnamon. Xfce does not have this problem, but it has a different problem (screen is cut off at the right side, with a dead area like in your first question).

Offline

#6 2022-08-11 12:48:08

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

Try "muffin --replace" after altering the randr configuration w/ nvidia-settings.

Online

#7 2022-08-11 16:54:02

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

mutter-Message: 18:44:18.147: Enabling experimental feature 'x11-randr-fractional-scaling'

(muffin:13103): mutter-WARNING **: 18:44:18.944: Impossible to resize screen at size 2880x2160, error id 8: BadMatch (invalid parameter attributes)

(muffin:13103): mutter-WARNING **: 18:44:18.946: Impossible to resize screen at size 2880x2160, error id 8: BadMatch (invalid parameter attributes)

After doing that I get this message and a resolution that seems to be 2880x2160, but it's just the regular 2880x2160, not an upscaled 1024x768.
Also, the bar at the bottom is missing.

Offline

#8 2022-08-11 17:05:04

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

Can you try the behavior in an openbox session?

Online

#9 2022-08-11 17:38:30

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

Amazing!
This works!
Is there a way to make it work in Cinnamon, though?

Offline

#10 2022-08-11 20:48:18

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

Rolling w/ your previous warning and https://wiki.archlinux.org/title/HiDPI#Xorg

gsettings get org.gnome.mutter experimental-features
gsettings set org.gnome.mutter experimental-features "[]"

Warning: I've no idea what I'm talking here - I don't use gnome (or derivates) and you're not getting me to do so, so pay attention what and when you do!
I expect the 1st command to respond sth. like "x11-randr-fractional-scaling", if that's not the case, the second command may be a really stupid idea to apply willy-nilly!

Online

#11 2022-08-11 21:16:57

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

The first command says:

No such schema “org.gnome.mutter”

Offline

#12 2022-08-11 21:31:22

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

gsettings get org.gnome.muffin experimental-features

?

Online

#13 2022-08-12 06:22:53

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

This one says the same, unfortunately.

No such schema “org.gnome.muffin”

Offline

#14 2022-08-12 06:24:47

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

This is the output of "gsettings list-schemas":

org.blueman
org.blueman.general
org.blueman.gsmsettings
org.blueman.network
org.blueman.plugins.autoconnect
org.blueman.plugins.discvmanager
org.blueman.plugins.killswitch
org.blueman.plugins.netusages
org.blueman.plugins.powermanager
org.blueman.plugins.recentconns
org.blueman.plugins.serialmanager
org.blueman.transfer
org.cinnamon
org.cinnamon.SessionManager
org.cinnamon.background
org.cinnamon.control-center.display
org.cinnamon.desklets
org.cinnamon.desklets.launcher
org.cinnamon.desktop.a11y.applications
org.cinnamon.desktop.a11y.keyboard
org.cinnamon.desktop.a11y.magnifier
org.cinnamon.desktop.a11y.mouse
org.cinnamon.desktop.background
org.cinnamon.desktop.background.slideshow
org.cinnamon.desktop.default-applications
org.cinnamon.desktop.default-applications.calculator
org.cinnamon.desktop.default-applications.office
org.cinnamon.desktop.default-applications.office.calendar
org.cinnamon.desktop.default-applications.office.tasks
org.cinnamon.desktop.default-applications.terminal
org.cinnamon.desktop.input-sources
org.cinnamon.desktop.interface
org.cinnamon.desktop.keybindings
org.cinnamon.desktop.keybindings.media-keys
org.cinnamon.desktop.keybindings.wm
org.cinnamon.desktop.lockdown
org.cinnamon.desktop.media-handling
org.cinnamon.desktop.notifications
org.cinnamon.desktop.peripherals
org.cinnamon.desktop.peripherals.keyboard
org.cinnamon.desktop.peripherals.mouse
org.cinnamon.desktop.peripherals.touchpad
org.cinnamon.desktop.peripherals.trackball
org.cinnamon.desktop.privacy
org.cinnamon.desktop.screensaver
org.cinnamon.desktop.session
org.cinnamon.desktop.sound
org.cinnamon.desktop.thumbnail-cache
org.cinnamon.desktop.thumbnailers
org.cinnamon.desktop.wm.preferences
org.cinnamon.invalid-schema
org.cinnamon.keyboard
org.cinnamon.launcher
org.cinnamon.muffin
org.cinnamon.muffin.keybindings
org.cinnamon.muffin.wayland
org.cinnamon.muffin.wayland.keybindings
org.cinnamon.muffin.x11
org.cinnamon.recorder
org.cinnamon.runtime-keybindings
org.cinnamon.settings-daemon.peripherals
org.cinnamon.settings-daemon.peripherals.input-devices
org.cinnamon.settings-daemon.peripherals.keyboard
org.cinnamon.settings-daemon.peripherals.smartcard
org.cinnamon.settings-daemon.peripherals.touchscreen
org.cinnamon.settings-daemon.plugins
org.cinnamon.settings-daemon.plugins.color
org.cinnamon.settings-daemon.plugins.csdwacom
org.cinnamon.settings-daemon.plugins.housekeeping
org.cinnamon.settings-daemon.plugins.media-keys
org.cinnamon.settings-daemon.plugins.power
org.cinnamon.settings-daemon.plugins.xrandr
org.cinnamon.settings-daemon.plugins.xsettings
org.cinnamon.sounds
org.cinnamon.theme
org.freedesktop.ColorHelper
org.freedesktop.pulseaudio.module-groups
org.gnome.Evince
org.gnome.Evince.Default
org.gnome.FileRoller
org.gnome.FileRoller.Dialogs
org.gnome.FileRoller.Dialogs.Add
org.gnome.FileRoller.Dialogs.Extract
org.gnome.FileRoller.Dialogs.LastOutput
org.gnome.FileRoller.Dialogs.New
org.gnome.FileRoller.FileSelector
org.gnome.FileRoller.General
org.gnome.FileRoller.Listing
org.gnome.FileRoller.UI
org.gnome.Terminal.Legacy.Settings
org.gnome.Terminal.ProfilesList
org.gnome.antler
org.gnome.caribou
org.gnome.crypto.pgp
org.gnome.desktop.a11y
org.gnome.desktop.a11y.applications
org.gnome.desktop.a11y.interface
org.gnome.desktop.a11y.keyboard
org.gnome.desktop.a11y.magnifier
org.gnome.desktop.a11y.mouse
org.gnome.desktop.app-folders
org.gnome.desktop.background
org.gnome.desktop.calendar
org.gnome.desktop.datetime
org.gnome.desktop.default-applications
org.gnome.desktop.default-applications.office
org.gnome.desktop.default-applications.office.calendar
org.gnome.desktop.default-applications.office.tasks
org.gnome.desktop.default-applications.terminal
org.gnome.desktop.input-sources
org.gnome.desktop.interface
org.gnome.desktop.lockdown
org.gnome.desktop.media-handling
org.gnome.desktop.notifications
org.gnome.desktop.peripherals
org.gnome.desktop.peripherals.keyboard
org.gnome.desktop.peripherals.mouse
org.gnome.desktop.peripherals.touchpad
org.gnome.desktop.peripherals.trackball
org.gnome.desktop.privacy
org.gnome.desktop.screensaver
org.gnome.desktop.search-providers
org.gnome.desktop.session
org.gnome.desktop.sound
org.gnome.desktop.thumbnail-cache
org.gnome.desktop.thumbnailers
org.gnome.desktop.wm.keybindings
org.gnome.desktop.wm.preferences
org.gnome.eog
org.gnome.eog.fullscreen
org.gnome.eog.plugins
org.gnome.eog.ui
org.gnome.eog.view
org.gnome.libgnomekbd
org.gnome.libgnomekbd.desktop
org.gnome.libgnomekbd.indicator
org.gnome.libgnomekbd.keyboard
org.gnome.libgnomekbd.preview
org.gnome.nm-applet
org.gnome.system.dns_sd
org.gnome.system.locale
org.gnome.system.location
org.gnome.system.proxy
org.gnome.system.proxy.ftp
org.gnome.system.proxy.http
org.gnome.system.proxy.https
org.gnome.system.proxy.socks
org.gtk.Settings.ColorChooser
org.gtk.Settings.Debug
org.gtk.Settings.EmojiChooser
org.gtk.Settings.FileChooser
org.nemo
org.nemo.compact-view
org.nemo.desktop
org.nemo.icon-view
org.nemo.list-view
org.nemo.plugins
org.nemo.preferences
org.nemo.preferences.menu-config
org.nemo.search
org.nemo.sidebar-panels
org.nemo.sidebar-panels.tree
org.nemo.window-state
org.virt-manager.virt-manager
org.virt-manager.virt-manager.confirm
org.virt-manager.virt-manager.connections
org.virt-manager.virt-manager.console
org.virt-manager.virt-manager.details
org.virt-manager.virt-manager.new-vm
org.virt-manager.virt-manager.paths
org.virt-manager.virt-manager.stats
org.virt-manager.virt-manager.urls
org.virt-manager.virt-manager.vmlist-fields
org.x.apps
org.x.apps.favorites
org.x.apps.mate-panel-applet
org.x.apps.statusicon

Offline

#15 2022-08-12 06:32:59

Lyxodius
Member
Registered: 2022-07-30
Posts: 15

Re: [SOLVED] 1024x768 resolution with nearest neighbor scaling

Holy shit,

gsettings set org.cinnamon.muffin experimental-features "[]"

did the trick!
Wow, thank you so very much!
You are a true genius!

Offline

Board footer

Powered by FluxBB