You are not logged in.

#1 2017-10-19 12:01:36

philipW
Member
Registered: 2017-03-21
Posts: 145

xorg performance issues when automatic startx

Hello,

I got rid of kde plasma because i didnt use it anymore and afterthat the sddm login manager didnt work properly anymore so i got rid of that aswell and i am now using tty login and startx.
I wanted to do the startx automaticly after i log in so i added:

if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
  exec startx
fi

to my ".bash_profile "
But i noticed if i automaticly do startx this way i have huge performance issues.
The cpu load wich sits normaly around 0.10-0.30 is now always around 0.50 and shutdown takes a long time.
Also when i boot and shutdown my laptop my laptop fans start spinning at max.
I think this is caused by my videocard because mormaly the fans start spinning when my load is around 1.
Does anyone know what causes this or how i can automaticly start x propperly widout the xorg info being printed after startx?
When i remove the code from my .bash_profile everything functions properly.
I have a gtx 1070 mobile.

Last edited by philipW (2017-10-19 12:03:43)

Offline

#2 2017-10-19 12:48:09

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,562

Re: xorg performance issues when automatic startx

Are you using nvidia proprietary driver ?

what is in your ~/.xinitrc ?

also post full ~/.bash_profile please


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2017-10-19 13:44:13

philipW
Member
Registered: 2017-03-21
Posts: 145

Re: xorg performance issues when automatic startx

Lone_Wolf wrote:

Are you using nvidia proprietary driver ?

what is in your ~/.xinitrc ?

also post full ~/.bash_profile please

yes i am nouveau gives me huge performance issues.

This is my .xinitrc

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

numlockx &

dbus-update-activation-environment --systemd DISPLAY
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) export SSH_AUTH_SOCK

xrdb -merge ~/.Xresources

exec i3

And this is my .bash_profile

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc

#if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
#  exec startx
#fi

Offline

#4 2017-10-19 14:43:18

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: xorg performance issues when automatic startx

Your ~/.xinitrc is missing a vital section...
https://wiki.archlinux.org/index.php/Xinit#xinitrc


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2017-10-20 07:56:56

philipW
Member
Registered: 2017-03-21
Posts: 145

Re: xorg performance issues when automatic startx

slithery wrote:

Your ~/.xinitrc is missing a vital section...
https://wiki.archlinux.org/index.php/Xinit#xinitrc

Can you point me in the right direction?

Offline

#6 2017-10-20 08:13:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,869

Re: xorg performance issues when automatic startx

Look at the highlighted boxes that say "Note:" in bold font ...

Why do you have the dbus-update-activation-environment call there?
Did you ever check *what* loads your CPU?

Offline

#7 2017-10-20 08:40:42

philipW
Member
Registered: 2017-03-21
Posts: 145

Re: xorg performance issues when automatic startx

Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your .xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.

you mean this?
If this is my /etc/X11/xinit/xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

I should include this in my xinitrc?

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

Offline

#8 2017-10-20 08:43:44

philipW
Member
Registered: 2017-03-21
Posts: 145

Re: xorg performance issues when automatic startx

seth wrote:

Look at the highlighted boxes that say "Note:" in bold font ...

Why do you have the dbus-update-activation-environment call there?
Did you ever check *what* loads your CPU?

No i dindt.
I have no idea what it exactly does.
I read on the wiki that i needed to include that if i want to unlock the gnome keyring at login.
https://wiki.archlinux.org/index.php/GN … side_GNOME

Last edited by philipW (2017-10-20 08:45:50)

Offline

#9 2017-10-20 08:56:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,869

Re: xorg performance issues when automatic startx

philipW wrote:

No i dindt.

Well, maybe do?

philipW wrote:

I should include this in my xinitrc?

I refuse to give you an answer here. You cited the relevant note from the wiki but apparently did not read it.

Offline

#10 2017-10-20 09:26:21

philipW
Member
Registered: 2017-03-21
Posts: 145

Re: xorg performance issues when automatic startx

seth wrote:
philipW wrote:

No i dindt.

Well, maybe do?

philipW wrote:

I should include this in my xinitrc?

I refuse to give you an answer here. You cited the relevant note from the wiki but apparently did not read it.

I added

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

to my xinitrc

I completly understand your point of view but i was just asking for confirmation because my understanding of this code is minimal.
I also was unaware

dbus-update-activation-environment --systemd DISPLAY

had anything to do with the loading of my cpu so i am researching that now.

Offline

#11 2017-10-20 12:00:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,869

Re: xorg performance issues when automatic startx

How are twm etc. in "the last if block"  or do they "ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced"?

You're doing something with the display variable and then a display variable test controls the behavior of .bash_profile - maybe just test whether that has impact by removing/commenting the gnome-keyrings stuff from your xinitrc?

Offline

Board footer

Powered by FluxBB