Dist upgrade to 18.04 breaks left & right mouse clicks and shortcut keys

Thank you in advance to anyone who reads this and offers any suggestions that might help.
I have been working for over 3 days to find a solution and not being a ‘power user’ I have no real way of getting around without the mouse. We use this machine to run 2 businesses and are basically dead in the water =(

Our Dell Precision M6800 was happily running ubuntu 17.? for about 1.5 years, and have just done a dist upgrade to 18.04.2. Now I can’t click anything left or right click on either the touchpad or wireless mouse and most of the keyboard shortcuts are broken.

When the ubuntu login screen pops up, mouse clicks work fine, but as soon as I log in they stop.

If I press CTRL + ALT + F1, the login screen reappears and mouse clicks work again, but as soon as I log in again, they stop.

CTRL + ALT + T does not work to open a terminal.
ALT + F2 does not work to open a quick terminal command box.
Basically I can’t get to a terminal window =(

After many hours of frustration trying many different things I walked away for some time, when I came back the screen saver (black screen) had activated, and when I woke it up, then I discovered both these shortcut key commands to open a terminal worked, but still no mouse clicks.
Rebooting the computer repeats the same issues, so I have to wait at least 10 mins for the screen saver to activate to enable the shortcut keys to open a terminal.

The laptop is in a dock that feeds 2 external monitors and a wired keyboard. I disconnected it from the dock and rebooted so it was just running the laptop’s own hardware, no change.

I have spent days researching forums of similar problems others have experienced and tried many of their suggestions including (not necessarily in this order):

  1. Software update to ensure any more changes available are applied
    $ sudo apt-get update $ sudo apt-get upgrade

  2. A suggestion to wake things up
    ALT + CTRL + F6 Sign in ALT + CTRL + F7

  3. Another one
    ALT + CTRL + F1 ALT + CTRL + F8 ALT + CTRL + F7

  4. Tried to update all the drivers to recommendations
    $ sudo ubuntu-drivers autoinstall

  5. Updated video drivers to recommended nvidia 418, blacklisted the nouveau drivers
    $ ubuntu-drivers devices $ sudo apt install nvidia-418 $ sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf" $ sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf" $ cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf $ sudo update-initramfs -u

  6. Removed the nvidia video drivers and set it back to nouveau with:
    $ sudo apt install nouveau-firmware $ sudo apt purge nvidia-driver-418 $ sudo apt autoremove $ sudo apt install xserver-xorg-video-nouveau

  7. Reinstall inputattach
    $ sudo apt-get install --reinstall inputattach

  8. Reinstall xserver-xorg-input-all
    $ sudo apt-get --purge autoremove xserver-xorg-input-all && sudo apt-get install xserver-xorg-input-all

  9. remove and reinstate the mouse driver
    $ sudo modprobe -r psmouse
    $ sudo modprobe psmouse proto=imps

  10. Remove the synaptics and install libinput
    $ sudo apt-get update && sudo apt-get --auto-remove purge xserver-xorg-input-synaptics && sudo apt-get install xserver-xorg-input-libinput

Did a reboot after trying each suggestion, nothing made any changes to the problems, only changing the video drivers affected the multi-screen positioning.

Also, I ran:
$ xinput -list
it said my mouse is: id=11
then I ran:
$ xinput -test 11
Then I clicked left, middle & right buttons, it showed:
button press 1 button release 1 button press 2 button release 2 button press 3 button release 3
Seems the clicks are registering.

Also another odd behavior I observed:
if I go: CTRL + ALT + F1 to take me back to the login screen, I then log in (and as mentioned all the mouse clicks work fine there so I can even click the login button!), but when I come back to the desktop, I can see a 2nd mouse pointer.
Only one moves as I move the mouse, and sometimes the other one disappears once the moving pointer enters the screen with the fixed pointer.
The moving pointer is black with a white border, the fixed pointer is white with a black border.
2 things both trying to display the mouse pointer?

There have been no hardware changes or software programs added before the dist upgrade.

The machine has 16GB of RAM and has a nvidia Quadro K4100M video card and an Intel Integrated graphics controller with i915 driver.

I am a terminal novice so happy to try commands to get more info but will need the full command please.

Hoping someone will be able to help, thanks in advance to anyone with some suggestions.

porque obtengo error: lvalue required as left operand of assignment al reasignar un valor a una variable

Estoy sacando los valores de un vector que viene por parametro, pero necesito que si dado un condicional. Esta variable tome un nuevo valor, sin embargo he intentado con & pero no comprendo a un del todo como funciona este comando. Adjunto mi codigo :

void KalmanFilter::JcobianMatrix(const VectorXd &x_in){ //recover state parameter const float & px = x_in(0); const float & py = x_in(1); const float vx = x_in(2); const float vy = x_in(3); // check division by zero if (px==0 && py == 0){   std::cout<<"Err0r: division by zero is not permitted"<<std::endl;   std::cout<<"Adjusting to values px 0.01 and py 0.01"<<std::endl;   & px = 0.01;   & py = 0.01; } 

Al intentar compilar obtengo el siguiente error:

error: lvalue required as left operand of assignment

& px = 0.01;

How to prevent enemies from oscillating left and right during chase?

I have a grounded enemy with a simple chase state. When in this state, the enemy moves with constant vel.x toward the player.

If my player jumps directly above the enemy however, the enemy will quickly flip directions back and forth a few times, since each time the vel.x is updated it flips sign. If the player is on a ladder above the enemy, the enemy will just oscillate back and forth indefinitely. Very ugly.

My enemy does have an engaged state where he pauses and then attacks, but my player has a high jump and so can maintain a far enough distance to avoid triggering the enemy to enter this state.

I am wondering what design choices I can make to prevent this ugly oscillation back and forth during chase.

New Div CSS not taking “top” and “left” types

When appending a new div and changing the css values, the top and left values do not apply. Other values have no issue.

I temporarily used marginLeft and marginTop which seemed to work, but it is not as accurate as I would like it to be.

const createNewDiv = () => {   for (let i = 1; i < 10; i++) {     let newDiv = document.createElement("div");     newDiv.innerHTML = -i;     document.getElementById("zero").appendChild(newDiv);     $  (newDiv).css({       top: -i * 50,       left: -3     })   } } 

I would like it to add 50px to the top for each div created. Here is the application I’m using it for: https://jsfiddle.net/gewerh/3g47ujtq/

Move up, right, left and down functions

I have some code which moves the users position up, right, down or left depending on the direction entered.

function up(field, player) {     player.column = player.column + 1;     field[player.row][player.column] = 'P';  }  function east(field, player) {     player.row = player.row + 1;     field[player.row][player.column] = 'P'; }  function down(field, player) {     player.column = player.column - 1;     field[player.row][player.column] = 'P'; }  function up(field, player) {     player.row = player.row - 1;     field[player.row][player.column] = 'P'; } 

The code works fine for what I need, but I was curious if there is a more efficient way of writing the 4 functions above? As in maybe use one function rather than 4?

note Edge cases will be implemented – if the next position is greater than the dimensions of the field, etc. So I’m not sure if this will impact making it more efficient

Vicious cycle: No DPKG & No space left on device

Ubuntu 18.04.02 LTS on GCP

df -i Filesystem      Inodes  IUsed   IFree IUse% Mounted on /dev/root      3870720 158973 3711747    5% / devtmpfs       1923380    387 1922993    1% /dev tmpfs          1924177      1 1924176    1% /dev/shm tmpfs          1924177    554 1923623    1% /run tmpfs          1924177      8 1924169    1% /run/lock tmpfs          1924177     18 1924159    1% /sys/fs/cgroup /dev/loop0       12823  12823       0  100% /snap/core/7270 /dev/loop1       23213  23213       0  100% /snap/google-cloud-sdk/86 /dev/loop2       12820  12820       0  100% /snap/core/6964 /dev/sda15           0      0       0     - /boot/efi /dev/loop3       23074  23074       0  100% /snap/google-cloud-sdk/88 tmpfs          1924177     10 1924167    1% /run/user/1001 

Trying to do anything with the boot partition, such as

ls -l >>>... >>>cannot copy extracted data for './usr/lib/file/magic.mgc' to '/usr/lib/file/magic.mgc. dpkg-new': failed to write (No space left on device) 

Broken partition

sudo apt-get remove  linux-headers-4.15.0-1036-gcp    >>>E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct th e problem.  

Same when trying

sudo apt remove p7zip-full 

No space to fix the broken partition !

sudo dpkg --configure >>>dpkg: error: failed to write status database record about 'libstdc++6:amd64' to '/var/l ib/dpkg/status': No space left on device$