Problems with setting aspect ratio in Ubuntu

Hello. How can I change my aspect ratio in Ubuntu Nvidia settings? I know how to do it in Windows XP: Display -> Adjust desktop size and position -> Scaling -> Aspect Ratio. But in Ubuntu there are only three strange points in Nvidia settings. I have Ge Force MX130 (GM108M) videocard and Ubuntu version 18.04.2.

Please give an example what you what to achieve and post the output of

sudo lspci |grep "VGA\|3D"

If it’s an Optimus (hybrid graphics) notebook, you can use
xrandr --output eDP-1-1 --set “scaling mode” “Full”
xrandr --output eDP-1-1 --set “scaling mode” “Full aspect”
xrandr --output eDP-1-1 --set “scaling mode” “Center”
to set the scaling mode.

That’s the output of first command:

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce MX130] (rev a2)

The trouble is that my 3D-game is drawing incorrect. It renders screen left upper side and I have one big black stripe right side, on other computers it renders at the center and there are two black equal stripes both left and right size. I need to make content be centered of the screen with two black stripes both sides. I am not sure that the problem is in game, I’ve tried to run two different games on this computer and on others and I see the difference.

Now that’s a rather odd behaviour. Might be caused by a detail specific to hybrid graphics. With Optimus, the intel graphics is responsible for scaling, but there’s only one screen size available (xrandr --q1) but many resolutions (xrandr). Please check if the picture gets centered if you switch manually to the game resoltion beforehands.
Then you could a workaround for the affected games starting them like e.g. (for a 800x600 res.)

xrandr --output eDP-1-1 --mode 800x600 && <yourapplication> && xrandr --output eDP-1-1 --mode 1920x1080

No, it still doesn’t work. Screen is not centered and content tied to upper left corner. This command is just setting the width and height of rendering zone, I don’t need it. I need to change location X and Y coordinates of screen Content (if to be specific). Game doesn’t have this options.

That’s not really what’s expected. Does your desktop display correctly (scaled,centered, black bars right and left if you switch it to a lower resolution with a different aspect ratio (e.g.1024x768)?
Please run as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.

No, my desktop never display black bars right and left side, it is just always crazy stretched. I’ve runned right now, but where can I find log file? I executed sudo in console and then received this: will now collect information about your
system and create the file ‘nvidia-bug-report.log.gz’ in the current
directory. It may take several seconds to run. In some
cases, it may hang trying to capture data generated dynamically
by the Linux kernel and/or the NVIDIA kernel module. While
the bug report log file will be incomplete if this happens, it
may still contain enough data to diagnose your problem.

Please include the ‘nvidia-bug-report.log.gz’ log file when reporting
your bug via the NVIDIA Linux forum (see
or by sending email to ‘’.

ls: невозможно получить доступ к ‘/proc/driver/nvidia/./gpus/’: Нет такого файла или каталога

If the bug report script hangs after this point consider running with
–safe-mode and --extra-system-data command line arguments.

nvidia-bug-report.log.gz (82.7 KB) will … create the file ‘nvidia-bug-report.log.gz’ in the current

The file is in the directory where you ran the script.

I had just attached file to my last but one post.

Sorry, didn’t saw that… )

The nvidia driver isn’t even loaded, probably due to secure boot being enabled. Please disable secure boot in bios.
Afterwards, run
sudo prime-select nvidia
reboot, then create a new nvidia-bug-report.log.

I don’t know how to disable secure boot in bios. Bios passwords are not set. I have only login password in Ubuntu, but I tried so namy ways to turn it off, unfortunately. I executed sudo prime-select nvidia and received: Info: the nvidia profile is already set.

Here’s the manual for your notebook:
The ‘secure boot’ option is in bios, tab ‘security’
If you can’t disable secure boot, another option is to reinstall Ubuntu and during install, use the option ‘install third-party software’ and select the nvidia drivers. This will set up module signing so the nvidia driver will work with secure boot enabled.