Re: [SLIM] Définir SLiM comme gestionnaire de connexion (résolu)

Xorg, Compiz, KDE / Gnome / Xfce / Fluxbox / e17 / fvwm ... GDM/KDM/XDM...
Hiroshima
newbie
Messages : 8
Inscription : jeu. 02 juil. 2015, 13:40

Re: [SLIM] Définir SLiM comme gestionnaire de connexion (résolu)

Message par Hiroshima »

Bonjour à tous les archers,
J'ai installé Archlinux dont la philosophie me plaît bien et j'en suis à la configuration de l'environnement graphique. Je n'arrive pas à lancer SLiM au démarrage de l'ordinateur, il faut que je me log en ligne de commande et que je lance manuellement startxfce4 pour atterir sur l'environnement graphique. Ce que j'ai fait : j'ai donc installé xorg

Code : Tout sélectionner

pacman -Syu xorg-server xorg-xinit xorg-server-utils
et xfce

Code : Tout sélectionner

pacman -S xfce4
Puis j'ai ôpté pour le gestionnaire de connexion SLiM :

Code : Tout sélectionner

pacman -S slim
J'ai créé un .xinitrc dans mon $HOME contenant

Code : Tout sélectionner

exec $1
que j'ai rendu exécutable avec chmod +x, puis pour lancer SLiM au démarrage j'ai exécuté :

Code : Tout sélectionner

 systemctl enable slim 
et

Code : Tout sélectionner

 systemctl enable slim.service
Voici le contenu de mon /etc/slim.conf :

Code : Tout sélectionner

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth 

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
 numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login ~/.xinitrc %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd	some command
# sessionstop_cmd	some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon	yes

# Set directory that contains the xsessions.
# slim reads xsesion from this directory, and be able to select.
sessiondir            /usr/share/xsessions/

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg         Session: 

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user       mathieu

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
focus_password      yes

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login          no


# current theme, use comma separated list to specify a set to 
# randomly choose from
current_theme       default

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log
Quant au fichier /var/log/slim.log, il est rempli de plusieurs :

Code : Tout sélectionner

slim: waiting for X server to begin accepting connections.
Giving up.
slim: unable to connect to X server
Je pense que c'est plus une erreur due au serveur X qu'à SLiM. Quand je lance la commande startx dans une console virtuelle, j'ai un écran noir pendant quelques secondes avant de revenir sur la ligne de commande avec la sortie suivante en console :

Code : Tout sélectionner

X.Org X Server 1.17.2
Release Date: 2015-06-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.0.4-2-ARCH x86_64 
Current Operating System: Linux laptop-mathieu 4.0.7-2-ARCH #1 SMP PREEMPT Tue Jun 30 07:50:21 UTC 2015 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=630c2de5-2f29-48f5-9c4a-e6f13f3c22b7 rw quiet
Build Date: 16 June 2015  05:24:27PM
 
Current version of pixman: 0.32.6
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Thu Jul  2 14:16:07 2015
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
modprobe: FATAL: Module nvidia not found.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
xinit: connection to X server lost

waiting for X server to shut down .(II) Server terminated successfully (0). Closing log file.
Je comprends pas trop les messages d'erreurs qu'il indique, le "modprobe: FATAL: Module nvidia not found." m'intrigue, j'ai bien installé le driver "nouveau" avec la commande

Code : Tout sélectionner

pacman -S xf86-video-nouveau
Enfin voilà, votre aide serait bienvenue,
Merci :chinois:
Dernière modification par Hiroshima le jeu. 02 juil. 2015, 22:05, modifié 1 fois.
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17632
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [SLIM] Définir SLiM comme gestionnaire de connexion

Message par benjarobin »

Bonjour,
Je ne suis pas sur de tout comprendre... On va y aller par étape :
  • Si tu ne les possèdes pas déjà installe : pacman -S xterm tree hwinfo
  • Modifie le .xinitrc de ton utilisateur avec juste dedans :

    Code : Tout sélectionner

    #!/bin/bash
    exec xterm
  • Désactive le lancement de slim, suite à cela donne nous la sortie de

    Code : Tout sélectionner

    tree /etc/systemd/system
  • Donne nous la sortie de

    Code : Tout sélectionner

    grep -REv "^ *$|^ *#" /etc/X11/xorg*
    hwinfo --gfxcard
  • Redémarre
  • Depuis un tty en tant qu'utilisateur : startx Indique nous ce que tu as (normalement juste xterm)
  • Ferme xterm, en tapant exit, ignore les erreurs affichées dans le tty
  • En root, lance systemctl start slim
  • Précise si slim se lance correctement, et si oui arrives tu à te connecter, et si oui obtiens tu bien la même chose que via startx (un xterm ?)
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Hiroshima
newbie
Messages : 8
Inscription : jeu. 02 juil. 2015, 13:40

Re: [SLIM] Définir SLiM comme gestionnaire de connexion

Message par Hiroshima »

Merci pour la réponse rapide,
Alors pour la commande

Code : Tout sélectionner

tree /etc/systemd/system
Elle renvoie après avoir désactivé slim avec "systemctl disable slim" :

Code : Tout sélectionner

/etc/systemd/system
├── getty.target.wants
│   └── getty@tty1.service -> /usr/lib/systemd/system/getty@.service
└── multi-user.target.wants
    ├── dhcpcd@enp4s0f2.service -> /usr/lib/systemd/system/dhcpcd@.service
    ├── dhcpcd@eth0.service -> /usr/lib/systemd/system/dhcpcd@.service
    └── remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
La sortie de « grep -Rev "^ *$|^ *#" /etc/X11/xorg* » :

Code : Tout sélectionner

/etc/X11/xorg.conf.d/10-keyboard-layout.conf:Section "InputClass"
/etc/X11/xorg.conf.d/10-keyboard-layout.conf:    Identifier         "Keyboard Layout"
/etc/X11/xorg.conf.d/10-keyboard-layout.conf:    MatchIsKeyboard    "yes"
/etc/X11/xorg.conf.d/10-keyboard-layout.conf:    Option             "XkbLayout"  "fr"
/etc/X11/xorg.conf.d/10-keyboard-layout.conf:    Option             "XkbVariant" "bepo" 
/etc/X11/xorg.conf.d/10-keyboard-layout.conf:EndSection
La sortie de "hwinfo --gfxcard" :

Code : Tout sélectionner

09: PCI 02.0: 0300 VGA compatible controller (VGA)              
  [Created at pci.328]
  Unique ID: _Znp.fH_EJiEe_JC
  SysFS ID: /devices/pci0000:00/0000:00:02.0
  SysFS BusID: 0000:00:02.0
  Hardware Class: graphics card
  Device Name: "Onboard IGD"
  Model: "Intel 3rd Gen Core processor Graphics Controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x0166 "3rd Gen Core processor Graphics Controller"
  SubVendor: pci 0x1558 "CLEVO/KAPOK Computer"
  SubDevice: pci 0x3700 
  Revision: 0x09
  Driver: "i915"
  Driver Modules: "drm"
  Memory Range: 0xf7400000-0xf77fffff (rw,non-prefetchable)
  Memory Range: 0xd0000000-0xdfffffff (ro,non-prefetchable)
  I/O Ports: 0xf000-0xf03f (rw)
  IRQ: 33 (570 events)
  Module Alias: "pci:v00008086d00000166sv00001558sd00003700bc03sc00i00"
  Driver Info #0:
    Driver Status: i915 is active
    Driver Activation Cmd: "modprobe i915"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

21: PCI 100.0: 0300 VGA compatible controller (VGA)
  [Created at pci.328]
  Unique ID: VCu0.Lta8nM+O854
  Parent ID: vSkL.xta5pj6a3m6
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "nVidia VGA compatible controller"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x0fd4 
  SubVendor: pci 0x1558 "CLEVO/KAPOK Computer"
  SubDevice: pci 0x3700 
  Revision: 0xa1
  Driver: "nouveau"
  Driver Modules: "drm"
  Memory Range: 0xf6000000-0xf6ffffff (rw,non-prefetchable)
  Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)
  Memory Range: 0xf0000000-0xf1ffffff (ro,non-prefetchable)
  I/O Ports: 0xe000-0xefff (rw)
  Memory Range: 0xf7000000-0xf707ffff (ro,non-prefetchable,disabled)
  IRQ: 32 (46 events)
  Module Alias: "pci:v000010DEd00000FD4sv00001558sd00003700bc03sc00i00"
  Driver Info #0:
    Driver Status: nouveau is active
    Driver Activation Cmd: "modprobe nouveau"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #8 (PCI bridge)

Primary display adapter: #9
Après avoir redémarré, startx lance bien xterm.
En revanche, la commande "systemctl start slim" en root ne donne rien : un nouveau prompt, et l'écran qui clignote 4-5 fois.

Encore merci pour l'aide !
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17632
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [SLIM] Définir SLiM comme gestionnaire de connexion

Message par benjarobin »

Bonjour,
Tu as la technologie optimus, je te conseil de lire le Wiki anglophone car cela bouge pas mal...
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
GuilouV
Elfe
Messages : 539
Inscription : jeu. 25 nov. 2010, 15:34

Re: [SLIM] Définir SLiM comme gestionnaire de connexion

Message par GuilouV »

Salut,

Dans ton slim.conf corrige la commande login_cmd en la remplaçant par celle-ci:

Code : Tout sélectionner

login_cmd           exec /bin/bash --login ~/.xinitrc %session
il te manquait un "-" devant login

Sinon pour la technologie optimus de ta carte graphique je te conseille bumblebee en complément de la réponse de benjarobin
https://wiki.archlinux.org/index.php/Bumblebee
[ Vaio S (VJS131X0211B) ]==[ Arch64 i3 Bépo ]==[ KISS spirit ]
Hiroshima
newbie
Messages : 8
Inscription : jeu. 02 juil. 2015, 13:40

Re: [SLIM] Définir SLiM comme gestionnaire de connexion

Message par Hiroshima »

Ah, je pensais gérer ça plus tard mais si c'en est la cause, je vais en effet me pencher sur bumblebee.
Merci GuilouV pour la typo du slim.conf
Je vous tiens au courant.

EDIT : il se trouve que désinstaller le pilote nouveau et installer le pilote propriétaire nvidia règle le problème.

À propos, pour désinstaller proprement le pilote nouveau, un simple

Code : Tout sélectionner

pacman -Rns xf86-video-nouveau
suffit ?

EDIT 2 : bon j'ai bien installé et configuré bumblebee (bien penser à installer bbswitch pour désactiver la carte Nvidia au démarrage) et tout fonctionne nickel, c'était donc bien vu de la part de benjarobin.

Merci pour les réponses, je passe en résolu :D
Répondre