Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]startx ok, but can not log on graphically
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
laipc2005
n00b
n00b


Joined: 20 Oct 2013
Posts: 5

PostPosted: Wed Dec 25, 2013 2:10 pm    Post subject: [solved]startx ok, but can not log on graphically Reply with quote

hello, my laptop can log on GNOME windows via startx command, but i can not log on graphically.

I have read the wiki: https://wiki.gentoo.org/wiki/GNOME/Configuration and my configs are:

Code:

pc@localhost ~ $ cat /etc/conf.d/xdm
# We always try and start X on a static VT. The various DMs normally default
# to using VT7. If you wish to use the xdm init script, then you should ensure
# that the VT checked is the same VT your DM wants to use. We do this check to
# ensure that you haven't accidentally configured something to run on the VT
# in your /etc/inittab file so that you don't get a dead keyboard.
CHECKVT=7

# What display manager do you use ?  [ xdm | gdm | kdm | gpe | entrance ]
# NOTE: If this is set in /etc/rc.conf, that setting will override this one.
DISPLAYMANAGER="gdm"

pc@localhost ~ $ cat ~/.xinitrc
xrandr --setprovideroutputsource modesetting NVIDIA-0
#xrandr --output LVDS-0 --set BACKLIGHT_CONTROL native
xrandr --auto
export XDG_MENU_PREFIX=gnome- DISPLAY=:0.0
exec gnome-session



and my xconf:
Code:

pc@localhost ~ $ cat /etc/X11/xorg.conf
Section "ServerLayout"
   Identifier     "laipc Configured"
   Screen      0  "nvidia"
   Inactive       "intel"
EndSection

Section "Device"
   Identifier  "nvidia"
   Driver      "nvidia"
   BusID       "PCI:1:0:0"
#        Option      "RegistryDwords" "EnableBrightnessControl=1"
EndSection

Section "Device"
   Identifier  "intel"
   Driver      "modesetting"
   BusID       "PCI:0:2:0"
EndSection

Section "Screen"
   Identifier "nvidia"
   Device     "nvidia"
   Option     "UseDisplayDevice" "none"
EndSection

Section "Screen"
   Identifier "intel"
   Device "intel"
EndSection

Section "Files"
   FontPath   "/usr/share/fonts/wqy-zenhei/"
EndSection
pc@localhost ~ $


when i reboot my laptop, i can see the gdm has been start, and also the "local host:", then one second later, only the blank screen.
If i run "rc-service xdm start" in GNOME desktop, there will be blank for 6 times, and get the message:Display Server has been shutdown 6 times in last 90 seconds...
And the log is
Code:

pc@localhost ~ $ cat /var/log/gdm/:0.log

Fatal server error:
Server is already active for display 0
   If this server is no longer running, remove /tmp/.X0-lock
   and start again.

(EE)
Please consult the The X.Org Foundation support
    at http://wiki.x.org
 for help.
(EE)


any idea?


Last edited by laipc2005 on Wed Jan 08, 2014 3:10 am; edited 1 time in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6308
Location: /usr/lib64/lv2

PostPosted: Wed Dec 25, 2013 5:36 pm    Post subject: Reply with quote

The first thing I would try is using another display manager. Try LXDM or SLiM. If either of those work, there may be something wrong with GDM (bug or configuration error), but at least you know everything else is OK and that the display manager issue can be worked out on its own.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
laipc2005
n00b
n00b


Joined: 20 Oct 2013
Posts: 5

PostPosted: Fri Dec 27, 2013 1:50 am    Post subject: Reply with quote

thanks audiodef.

i have tried xdm and slim, but the same result for me.

maybe some config file need to modify or less some what kernel configuation.

i am on holiday these days, and will figure out this problem next year.

see you :)
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6308
Location: /usr/lib64/lv2

PostPosted: Fri Dec 27, 2013 6:34 pm    Post subject: Reply with quote

OK. Happy new year!

When you get back, just as a general tip that may or may not help this issue, but will give you a more efficient kernel anyway, check out Pappy's Kernel Seeds.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
laipc2005
n00b
n00b


Joined: 20 Oct 2013
Posts: 5

PostPosted: Sun Jan 05, 2014 9:42 am    Post subject: Reply with quote

Hi, audiodef, i am back.

It is my fault, i forgot to put 2 command lines to gdm init script.

My laptop use 2 graphic cards, one is nvidia, the other is intel. The graphic datas output from nivida are put into intel card to display.

When i use startx command, it will exec $HOME/.xinitrc after X server started. The red line in .xinitrc set the mode above.

Quote:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

export XDG_MENU_PREFIX=gnome-
exec gnome-session


So, these critical 2 red line should also be add to /etc/X11/gdm/Init/Default script.

I add them just before exit.
Code:

      elif [ -n "$XKBSYMBOLS" ]; then
        $SETXKBMAP -symbols "$XKBSYMBOLS"
      fi
    fi
  fi
fi

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

exit 0


And i finally see the beautiful log picture.

Oh, BTW, Pappy's Kernel Seeds is a good site which i've been searching for long time, thanks!
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6308
Location: /usr/lib64/lv2

PostPosted: Mon Jan 06, 2014 11:19 pm    Post subject: Reply with quote

Sure! Glad you got it working.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum