Nvidia settings are keep being lost

Ubuntu Support Template

Ubuntu Version:
Ubuntu 24.04.4 LTS

Desktop Environment (if applicable):
LXQt

Problem Description:
I have two screens, one being HDMI and the other DisplayPort (DP). I have the HDMI on the left and the other as my main working screen on the right.

I use sudo nvidia-settings command in a terminal and make sure the setup is as above. I also ensure the main primary (RH) screen is set to right of the LH screen but I find that the monitor name is greyed out and cannot therefore make this setting. I cannot easily scroll across from screen to screen without this setting being saved.

The output from there is:

(nvidia-settings:28415): GLib-GObject-CRITICAL **: 17:58:59.138: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 17:58:59.300: PRIME: No offloading required. Abort
** Message: 17:58:59.300: PRIME: is it supported? no

Relevant System Information:

I am using the nvidia-driver-595-open (propriety, tested) driver.

1 Like

Try running it without sudo. I am not an NVIDIA user so this is just a guess, but you might be trying to set those properties for the root user, which is not the same account as your normal user and therefore your changes are “lost”; technically not lost, probably, just invisible since they don’t apply to your desktop session. Even the example on NVIDIA’s website doesn’t use sudo.

Generally, you should always try to run programs without sudo first; only if that results in an error message to the effect that you lack privileges, i.e. permission denied or similar, do you need sudo.
See the Ubuntu docs for more info:

2 Likes

Thank you but still no change with or without sudo.

'lost’, I should have been more ‘correct’ and said, ‘not retained’.

I have a feeling that this may be caused by differences between my current desktop LXQt and the previous one, Xfce. LXQt has ‘Desktops 1 and 2’ which is different to Xfce which only had one Desktop and I was easily able to switch across both with the Primary screen being set as my RH and main screen.

1 Like

What is the exact problem then? Because this can’t be it:

What you see in the screenshot is the greyed out name of your second monitor beside “Right of”; since there is only one choice available, it’s greyed out. The check mark is set for “Make this the primary display for the X screen”.

You should probably just use the display settings dialog of LXQt, though; open the Lubuntu start menu and type “Monitor”.

1 Like

I only switched to LXQt yesterday and am still getting to terms with available setting. I was unaware of ‘Monitor’ and will check that out later as I am off to hospital now.

1 Like

Simple and easy way to control the screens with one exception and I had the same problem with Xfce - for some reason it is only possible to have the primary screen on the left. I cannot find a setting which allows this:

‘Ergonomic Best Practice: Regardless of left or right placement, ergonomic experts recommend positioning the primary monitor directly centered in front of your keyboard and chair, with the secondary monitor angled slightly inward (15–20 degrees) to the side. This configuration minimizes neck strain by keeping your head straight for most tasks, rather than forcing constant lateral head turns.

Which is my setup and that of many people I see.

It could be that having unmatched monitors don’t help.

2 Likes

I don’t believe that to be true, see the Lubuntu docs on how to place monitors. It doesn’t say “left” or “right”, you just place them on a map. The “primary” flag is independent of that.

Following the manual instructions:

  1. HDMI-0 set as ‘This screen extends another display’
  2. DP-2 set as ‘This is my primary display’
  3. Set position:
  4. Drag DP-2 to the right of HDMI-0
  5. Keep monitors attached
  6. Apply
  7. Save
  8. Reboot

Now the primary monitor should be directly in front of my keyboard and the other monitor should be on the left of that.

Apply, save and reboot

Real life view of monitors after reboot:

I rest my case.

Now, what I can do is assume the primary monitor is directly in front of my keyboard and blank, then move the trash icon and any shortcuts which are on the primary monitor to the blank screen in front of me.

In my case I don’t have any shortcuts so the trash icon is now on the screen in front of me and the left screen is blank. Thats how it should look but if I create another shortcut on the monitor in front of me it is placed on the left hand monitor which is correct according the the settings but not as I wanted it.

That means I have to turn my head left to access the new shortcut.

One thing to separate here: the LXQt monitor tool can set the primary output, but desktop icons are handled by pcmanfm-qt and may still appear on the first/left desktop area. I would check with `xrandr --query` after login whether DP-2 is actually marked `primary`. If it is not, a small autostart command like `xrandr --output DP-2 --primary --right-of HDMI-0` may be a cleaner workaround than changing the physical layout.

This sounds good. Can you explain how to make a small autostart command like xrandr --output DP-2 --primary --right-of HDMI-0 as I am not capable and I will give it a try.

Looks like a bug then, unless some file permissions got screwed up by running sudo nvidia-settings. Please check it’s the same with a brand new user; don’t make that one an administrator, so you can’t even run sudo with it. Make the changes you want with that account, reboot and see if it keeps those settings.

If it’s still the same then, report the bug:

ubuntu-bug lxqt-config

(that’s my best guess at the component to blame)

1 Like

You should check if it works first. This should also not be necessary; that’s why tools like “Monitor Settings” exist.

1 Like

You mean:

sudo xrandr --output DP-2 --primary --right-of HDMI-0

in terminal then reboot?

Will you p-l-e-a-s-e stop running everything with sudo? We’ve tried to warn you multiple times. As a reminder:

As an addendum, sudo even ties the noose for you. :wink:

No, the reboot will undo that very change, because it’s just temporary. You should check, if the command does what’s intended, i.e. switch your monitors around and mark the proper display as primary. This commnand (NO sudo):

xrandr --output DP-2 --primary --right-of HDMI-0

BTW, what exactly solved the issue? Did you report a bug or does it work with the pristine new user account?

1 Like

$ xrandr --output DP-2 --primary --right-of HDMI-0
$

Has no effect on the monitors.

Note: For health reasons I will live with things as they are. Please, no more help as I cannot reply.

For Peter: Yes a ‘pristine’ new user did not have the problems. Thank you for your help.

BTW This thread is made using that new users account.

Well, then it is not a bug; I suspect a permissions issue caused by the liberal use of sudo. :wink:

Be well!