How to properly create new users

I am able to create a new user. However, when I attempt to log in as that user, the desktop crashes and I land back on the login page.

Things I have tried:

  • I am able to ssh in as the new user.
  • I am able to switch to the new user in a terminal via the su command.
  • I have re-flashed my device. Problem is still present.
  • I have created the new user via useradd and with the GUI too. No effect.
  • A have attempted to create the user as a regular user and as an admin user. No effect.
  • I have copied all files from the working nvidia user’s home directory into the new user’s home directory (chown -R applied). No effect.

Looking in the /var/log/Xorg logs I suspect that the following may be related:

[ 3804.239] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!
[ 3804.239] (EE) NVIDIA(0): Failing initialization of X screen 0
[ 3804.239] (II) UnloadModule: “nvidia”
[ 3804.239] (II) UnloadSubModule: “wfb”
[ 3804.239] (II) UnloadSubModule: “fb”
[ 3804.239] (EE) Screen(s) found, but none have a usable configuration.
[ 3804.239] (EE)
Fatal server error:
[ 3804.239] (EE) no screens found(EE)

Any insight would be appreciated.

The GPU (for hardware accelerated access) requires the user be a member of group “video”. This is true for both GUI and CUDA use. You can append group “video” to the user as a supplemental group:

sudo usermod -a -G video <username>

Thanks linuxdev. I was able to create properly functioning users using this method, but with one additional step. It looks like there are one or more config files in the home directory that are not auto-generated. Here is how I ended up doing it.

sudo adduser MYUSER
sudo usermod -a -G video MYUSER
sudo rm -r /home/MYUSER
sudo cp -r /home/nvidia /home/MYUSER
sudo chown -R MYUSER:MYUSER /home/MYUSER

It isn’t clean but it gets the job done.