Bug 1227313 - /usr/etc/X11/xinit/xinitrc.common leaves behind zombie nvidia-settings process
Summary: /usr/etc/X11/xinit/xinitrc.common leaves behind zombie nvidia-settings process
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: X11 3rd Party Driver (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P3 - Medium : Minor (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: Stefan Dirsch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-02 21:12 UTC by BZZZZ DZZZZ
Modified: 2024-07-04 12:45 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BZZZZ DZZZZ 2024-07-02 21:12:15 UTC
this is very similar to #1218458 but not FIXED for me

here is copy+paste from htop (user threads hidden by pressing H):
S  CPU% MEM%   TIME+  Command

S   0.0  0.0  0:00.31 ├─ /usr/sbin/lightdm
S   0.7  0.3  0:23.78 │  ├─ /usr/bin/Xorg.bin :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
S   0.0  0.0  0:00.03 │  └─ lightdm --session-child 13 20
S   0.0  0.1  0:00.05 │     └─ /usr/bin/startplasma-x11
Z   0.0  0.0  0:00.03 │        ├─ nvidia-settings
S   0.0  0.0  0:00.00 │        ├─ /usr/bin/ssh-agent /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
S   0.0  0.0  0:00.05 │        └─ /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc


notice nvidia-settings line contains "Z", that means process is zombie (exited but not waited)

nvidia-settings is started by bash script "/usr/etc/X11/xinit/xinitrc.common":
#
# Load nvidia settings
#
if test -r $HOME/.nvidia-settings-rc && type -p nvidia-settings > /dev/null ; then
    nvidia-settings --load-config-only > /dev/null 2>&1 &
fi


theory what happened:
1. bash started nvidia-settings
2. bash replaced itself with startplasma-x11
3. nvidia-settings exited
4. startplasma-x11 didn't wait nvidia-settings
Comment 1 Stefan Dirsch 2024-07-03 09:14:11 UTC
I no longer can remember why I put this process in the background. It's so long ago I added this to xinit startup process, that I no longer can find the changelog for it. :-(

Could you try without putting the nvdia-settings process in the background, i.e. remove the '&' a the end:

#
# Load nvidia settings
#
if test -r $HOME/.nvidia-settings-rc && type -p nvidia-settings > /dev/null ; then
    nvidia-settings --load-config-only > /dev/null 2>&1
fi
Comment 2 Stefan Dirsch 2024-07-03 09:17:56 UTC
Also, possibly there is some error message with your config file. So try this on a working nvidia desktop.

  nvidia-settings --load-config-only

  nvidia-settings --load-config-only &

Any error message? Or just works?
Comment 3 BZZZZ DZZZZ 2024-07-04 04:45:52 UTC
> Could you try without putting the nvdia-settings process in the background, i.e. remove the '&' a the end:
>
> #
> # Load nvidia settings
> #
> if test -r $HOME/.nvidia-settings-rc && type -p nvidia-settings > /dev/null ; then
>     nvidia-settings --load-config-only > /dev/null 2>&1
> fi

login works and no zombie nvidia-settings


> Also, possibly there is some error message with your config file. So try this on a working nvidia desktop.
>
>   nvidia-settings --load-config-only
>
>   nvidia-settings --load-config-only &
>
> Any error message? Or just works?

I run these commands in terminal emulator (konsole), bash (PS1='$ '):
$ nvidia-settings --load-config-only

(nvidia-settings:28863): dbind-WARNING **: 07:41:50.095: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
$ echo "$?"
0
$ nvidia-settings --load-config-only &
[1] 28874
$ 
(nvidia-settings:28874): dbind-WARNING **: 07:42:01.914: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files


ignore warning, all gtk3 programs do that
Comment 4 Stefan Dirsch 2024-07-04 12:08:39 UTC
Thanks! Fixed now. And submitted to factory/Tumbleweed. I will also update xinit for sle15-sp7/Leap 15.7.

-------------------------------------------------------------------
Thu Jul  4 12:02:51 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>

- xinitrc.common: no longer start nvidia-settings in background in
  order to avoid a zombie process under certain circumstances 
  (boo#1227313)

Closing ...
Comment 5 OBSbugzilla Bot 2024-07-04 12:45:02 UTC
This is an autogenerated message for OBS integration:
This bug (1227313) was mentioned in
https://build.opensuse.org/request/show/1185381 Factory / xinit