You are not logged in.

#1 2020-12-23 22:03:03

EisfreeF12
Member
Registered: 2020-11-08
Posts: 4

[SOLVED] NVIDIDA GPU not being used (when using lightdm)

Hardware:

Dell Latitude 3400 (laptop)

Intel Core i7-8565 (CPU)

Intel UHD 620 (integrated GPU)

NVIDIA GeForce MX130 (discrete GPU)

Software:

5.9.14-arch1-1 (Linux kernel)

NVIDIA 455.45.01 (NVIDIA driver)

i3-gaps 4.19 (window manager)

lightdm 1.30.0 (display manager)


When I enter a TTY and begin my X session with startx, everything works normally. When I use lightdm, however, everything functions, but my NVIDIA GeForce MX130 graphics card is not used at all. Using nvidia-smi, there are several processes reported to be running such as xorg and kitty when I begin my session with startx, and my GPU usage is reported at around 126 MiB. But when I use lightdm, there are no processes and GPU usage is at 0.

I have followed the archwiki page for using NVIDIA graphics only with NVIDIA Optimus (my Dell Latitude 3400 has both NVIDIA and Intel graphics), including creating a display_setup.sh for lightdm and making it the display setup script in lightdm.conf, but it seems to not be working whatsoever.

Last edited by EisfreeF12 (2020-12-29 04:28:07)

Offline

#2 2020-12-23 22:06:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,740

Re: [SOLVED] NVIDIDA GPU not being used (when using lightdm)

Is the display_setup.sh execute/readable for the lightdm user?

Offline

#3 2020-12-26 03:56:16

EisfreeF12
Member
Registered: 2020-11-08
Posts: 4

Re: [SOLVED] NVIDIDA GPU not being used (when using lightdm)

Yes, I ran

sudo chmod a=rwx /etc/lightdm/display_setup.sh

Just to double check and be be completely sure that those permissions were available for everything.

Offline

#4 2020-12-26 09:02:03

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [SOLVED] NVIDIDA GPU not being used (when using lightdm)

Make the script log the current date, eg. run "touch /tmp/display_setup.date" or "date >> /tmp/display_setup.date" to ensure it gets executed. If it's not, look at your lightdm.conf.

Offline

#5 2020-12-29 04:27:27

EisfreeF12
Member
Registered: 2020-11-08
Posts: 4

Re: [SOLVED] NVIDIDA GPU not being used (when using lightdm)

I solved it, it was an incredibly mundane error! I accidentally forgot the exclamation mark in the #!/bin/sh line of my display_setup.sh, and that made it a comment and completely ruined it. After removing it, everything works smoothly. smile

Offline

Board footer

Powered by FluxBB