0

When I suspend my PC there are two different issues that might/don't always occur when it resumes:

  1. ~/.xsessionrc settings are not active (they are after a full reboot, and if I run them manually)
  2. I get random noise/corruption in the desktop image

It's 20.04.1 LTS with a GeForce 210 PCIe SSE2 video card using the recommended NVIDIA 340.108 driver. Looking around here I see the NVIDIA cards can be problematic (with no silver bullet, as far as I've seen), but was wondering if the X configuration issues cast any additional light on what is going wrong?

Iain
  • 41
  • When the desktop image is corrupt, I can change it to any other picture in the gallery adn they display just fine; oddly, if I change it back to the original/default image the corruption is still there. What is going on there? – Iain Jan 05 '21 at 19:27
  • I've tried adding a script in /lib/systemd/system-sleep/, which I can see is firing correctly on post-sleep/resume; however, /home/iain/.xsessionrc is not being executed/working (looking at some other posts, that may be because the resume is a root process, not associated with my ID, but I cannot confirm, and I don't understand enough about X11 to make sense of/adapt suggestions made elsewhere). Any pointers? – Iain Jan 07 '21 at 17:46

1 Answers1

0

Here's a fix for making the x settings permanent: I gave up on .xsessionrc when I found this post Making the xinput --set-button-map changes permanent and created /usr/share/X11/xorg.conf.d/Microsoft-Wireless-Optical-Mouse.conf (name doesn't seem to matter; not sure what the number prefix on some pre-existing files is for) as follows:

    Section "InputClass"
        Identifier  "Microsoft Microsoft Wireless Optical Mouse® 1.00 Mouse"
        Option  "ButtonMapping" "1 2 3 4 5 6 7 9 8"
    EndSection

The correct "Identifier" having been found using "xinput list" (there were three "Microsoft Microsoft Wireless Optical Mouse® 1.00" entries). Swapping 8 & 9 in the button mapping makes the side button a back button; almost worth the hassle;)

I found I had to delete ~/.xsessionrc after making the above changes, due to it seeming to create a conflict when resuming. The mouse (which was working on the login screen) was dead until reset.

The desktop image seems to be stable on resume when changed away from the default; I still have no idea what's going on there...

Iain
  • 41