Xserver not starting on boot

I am using using a laptop with dual GPU configuration, with discrete Nvidia GPU and integrated intel.
After recent update, xserver doenst start after boot. Laptop crashes on this screen. Im unable to switch to even tty.

On starting manjaro with parameters quiet 3, im able to start lightdm using startx from tty.
Even then, manjaro crashes on opening manjaro hardware settings or mhwd -li

Please let me know if you need any output to diagnose the error.
Thank you.

PS: Im using bumblebee

i recommend using optimus-manager

They kind of need to get into the system first.

Try this:

You need a manjaro LiveUSB to chroot
You boot to the liveUSB and wait for it to load the Live desktop.
Then you open a terminal and type manjaro-chroot -a
Once it finishes mounting your system.
sudo pacman-mirrors -f5 && sudo pacman -Syyu
After it's done, type exit
Reboot and see if you can get into your system.

1 Like

Hi thanks a lot for reply.
I'm able to access the tty and do startx.
I have updated the system but Im still facing the issue

Ok, that's a start. :wink:

Read this and follow the instructions to the letter. This should get you up and running.
Be mindful of the steps to remove previous drivers in the instructions.

Hi im unable to use mhwd commands

im guessing you currently have the free nouveau drivers installed and sometimes when running mhwd commands they just stop or cause a lockup, is that what your saying?

if yes, do as @SinisterBrain suggested and boot your manjaro usb, connect to network, open a terminal and sudo manjaro-chroot -a

it would look something like this if it chroots properly

~ >>> sudo manjaro-chroot -a                                                                            
[sudo] password for dglt: 
==> Mounting (ManjaroLinux) [/dev/sda2]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]
[manjaro /]# 

if your asked to enter a number and the only option is " 0 " enter the number " 1 " instead
then you can run the mhwd commands you need to run and any others instructed in the optimus-switch instructions.

just to be sure, the linked optimus-switch github page is for lightdm, there are also sddm and gdm repos so follow the correct one depending on which DM your using

Hi, @dglt
I have used your installer for optimus switch.
Everything seems to work fine except the brightness controll.
Im unable to use xbacklight as it gives no output.
On doing xbacklight -set 40 , nothing happens

Also, getting black screen with blinking cursor after set-nvidia.sh(after roboot)

add acpi_backlight=vendor to your kernel parameters

after you installed optimus-switch and rebooted did it bring you to a desktop?

post these outputs

inxi -Fxxxza --no-host
mhwd -li
ls -laR /etc/X11 ; cat /etc/X11/xorg.conf.d/*.conf
ls -la /etc/modprobe.d/ ; cat /etc/modprobe.d/*.conf

@dglt thanks a lot for the reply
here are the outputs

inxi -Fxxxza --no-host

System:    Kernel: 5.2.8-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.1.0 
           parameters: \\boot\vmlinuz-5.2-x86_64 ro root=UUID=d289c48e-cd03-4982-b580-2b102b28e2be quiet 3 
           resume=UUID=6b4e4449-c0a6-44d0-8188-f5df22ea6c83 initrd=boot\initramfs-5.2-x86_64.img 
           Console: tty 1 dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:   Type: Laptop System: HP product: HP Pavilion Gaming Laptop 15-cx0xxx v: Type1ProductConfigId serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: HP model: 8478 v: 70.39 serial: <filter> UEFI: Insyde v: F.11 date: 08/13/2018 
Battery:   ID-1: BAT1 charge: 47.4 Wh condition: 47.4/52.8 Wh (90%) volts: 13.0/11.6 model: Hewlett-Packard PABAS0241231 
           type: Li-ion serial: <filter> status: Full 
CPU:       Topology: Quad Core model: Intel Core i5-8300H bits: 64 type: MT MCP arch: Kaby Lake family: 6 model-id: 9E (158) 
           stepping: A (10) microcode: 96 L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 36872 
           Speed: 940 MHz min/max: 800/4000 MHz Core speeds (MHz): 1: 1000 2: 1001 3: 1002 4: 1001 5: 1000 6: 1001 7: 1000 
           8: 1000 
           Vulnerabilities: Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:3e9b 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Hewlett-Packard driver: nvidia v: 430.40 bus ID: 01:00.0 
           chip ID: 10de:1c8d 
           Display: tty server: X.org 1.20.5 driver: intel tty: 192x60 
           Message: Advanced graphics data unavailable in console. Try -G --display 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:a348 
           Sound Server: ALSA v: k5.2.8-1-MANJARO 
Network:   Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus ID: 00:14.3 
           chip ID: 8086:a370 
           IF: wlo1 state: down mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8168 
           v: 8.047.02-NAPI port: 3000 bus ID: 03:00.0 chip ID: 10ec:8168 
           IF: eno1 state: down mac: <filter> 
           Device-3: TP-Link TL-WN722N v2 type: USB driver: r8188eu bus ID: 1-1:2 chip ID: 2357:010c serial: <filter> 
           IF: wlp0s20f0u1 state: up mac: <filter> 
Drives:    Local Storage: total: 931.51 GiB used: 157.03 GiB (16.9%) 
           ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS721010A9E630 size: 931.51 GiB block size: physical: 4096 B 
           logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: A3T0 scheme: GPT 
Partition: ID-1: / raw size: 70.00 GiB size: 68.40 GiB (97.72%) used: 13.19 GiB (19.3%) fs: ext4 dev: /dev/sda9 
           ID-2: /home raw size: 440.67 GiB size: 432.75 GiB (98.20%) used: 143.84 GiB (33.2%) fs: ext4 dev: /dev/sda10 
           ID-3: swap-1 size: 4.00 GiB used: 0 KiB (0.0%) fs: swap swappiness: 60 (default) cache pressure: 100 (default) 
           dev: /dev/sda8 
Sensors:   System Temperatures: cpu: 47.0 C mobo: 29.8 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 173 Uptime: 6m Memory: 11.62 GiB used: 291.2 MiB (2.4%) Init: systemd v: 242 Compilers: gcc: 9.1.0 
           Shell: zsh v: 5.7.1 running in: tty 1 inxi: 3.0.35


Installed PCI configs:
                  NAME               VERSION          FREEDRIVER           TYPE
           video-linux            2018.05.04                true            PCI
          video-nvidia            2018.08.09               false            PCI
         network-r8168            2016.04.20                true            PCI

   Warning: No installed USB configs!

ls -laR /etc/X11 ; cat /etc/X11/xorg.conf.d/*.conf

ls -laR /etc/X11 ; cat /etc/X11/xorg.conf.d/*.conf
total 12
drwxr-xr-x  3 root root 4096 Aug 16 02:07 .
drwxr-xr-x 97 root root 4096 Aug 16 11:54 ..
drwxr-xr-x  2 root root 4096 Aug 16 11:54 xorg.conf.d

total 16
drwxr-xr-x 2 root root 4096 Aug 16 11:54 .
drwxr-xr-x 3 root root 4096 Aug 16 02:07 ..
-rw-r--r-- 1 root root  133 Aug 16 02:07 20-intel.conf
-rw-r--r-- 1 root root  481 Aug 16 11:54 99-nvidia.conf
Section "Device"
    Identifier  "Intel Graphics" 
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
#adjust BusID to match your nvidia GPU
#uncomment and edit the DPI option as needed
#to fix scaling issues.

Section "Module"
    Load "modesetting"

Section "Device"
    Identifier "nvidia"
    Driver  "nvidia"
    BusID   "PCI:1:0:0"
    #Option  "DPI" "96 x 96"    #adjust this value as needed to fix scaling
    Option  "AllowEmptyInitialConfiguration"

Section "Extensions"
    Option  "Composite" "Enable"
ls -la /etc/modprobe.d/ ; cat /etc/modprobe.d/*.conf
ls -la /etc/modprobe.d/ ; cat /etc/modprobe.d/*.conf
total 16
drwxr-xr-x  2 root root 4096 Aug 16 11:54 .
drwxr-xr-x 97 root root 4096 Aug 16 11:54 ..
-rw-r--r--  1 root root  150 Aug 16 11:54 99-nvidia.conf
-rw-r--r--  1 root root   16 Jul  7 23:13 r8169_blacklist.conf
#necessary blacklist and
#nvidia_drm modeset for nvidia/prime

blacklist nouveau
blacklist nvidiafb
blacklist rivafb
options nvidia_drm modeset=1
blacklist r8169

Also ive noticed that on doing sudo set-nvidia.sh

Removing intel only mode setup......
Setting nvidia prime mode.......
cp: cannot create regular file '/etc/X11/mhwd.d/99-nvidia.conf': No such file or directory
Done! After reboot you will be using nvidia prime mode.

is cannot create regular file...... ok or im missing something here?

ok, you made some mistakes setting it up. heres a few things

just to be sure, did you add this 3 during boot or is it something you added to /etc/default/grub by mistake? if it's during boot to be able to get to a TTY thats fine, if you added it to grub this will prevent a graphical environment from starting during boot.

you were suppose to uninstall video-linux

sudo mhwd -r pci video-linux

you were suppose to remove all video related .conf files from this directory.

sudo rm -rf /etc/X11/xorg.conf.d/20-intel.conf

yikes, it looks like you deleted the entire /etc/X11/mhwd.d and /etc/X11/xinit directories.

can you please check again and see if you made a mistake posting these outputs. after you run the commands i gave you above, post the output of these

ls -laR /etc/X11
pacman -Qs | grep -Ei 'xrandr|nvidia|xf86-video|dkms|acpi_call'

Yes i added it during boot because i wanted to access the tty and switch to intel(which works fine)

ls -laR /etc/X11

total 16
drwxr-xr-x  4 root root 4096 Aug 16 12:12 .
drwxr-xr-x 97 root root 4096 Aug 16 19:53 ..
drwxr-xr-x  2 root root 4096 Aug 16 12:14 mhwd.d
drwxr-xr-x  2 root root 4096 Aug 16 19:54 xorg.conf.d

total 8
drwxr-xr-x 2 root root 4096 Aug 16 12:14 .
drwxr-xr-x 4 root root 4096 Aug 16 12:12 ..

total 16
drwxr-xr-x 2 root root 4096 Aug 16 19:54 .
drwxr-xr-x 4 root root 4096 Aug 16 12:12 ..
-rw-r--r-- 1 root root  209 Aug 16 12:07 30-touchpad.conf
-rw-r--r-- 1 root root  672 Aug 16 12:14 99-intel.conf

pacman -Qs | grep -Ei 'xrandr|nvidia|xf86-video|dkms|acpi_call

local/acpi_call-dkms 1.1.0-238
    Provide a simple visual front end for XRandR 1.2.
    An interactive xrandr interface using bash
local/dkms 2.7.1-1
local/lib32-nvidia-utils 1:430.40-1
    NVIDIA drivers utilities (32-bit)
    Nvidia VDPAU library
local/libxrandr 1.5.2-1
local/linux414-nvidia 1:430.40-3 (linux414-extramodules)
    NVIDIA drivers for linux.
local/linux419-nvidia 1:430.40-4 (linux419-extramodules)
    NVIDIA drivers for linux.
local/linux52-nvidia 1:430.40-5 (linux52-extramodules)
    NVIDIA drivers for linux.
local/mhwd-nvidia 1:430.40-1
    MHWD module-ids for nvidia 430.40
local/mhwd-nvidia-340xx 340.107-1
    MHWD module-ids for nvidia 340.107
local/mhwd-nvidia-390xx 390.129-1
    MHWD module-ids for nvidia 390.129
local/nvidia-utils 1:430.40-1
    NVIDIA drivers utilities
local/xorg-xrandr 1.5.0-2 (xorg-apps xorg)

your also missing xf86-video-intel
sudo pacman -S xf86-video-intel

the issue remains that you somehow deleted those 2 directories i mentioned.

I may have deleted the directories.
How should i fix them?

may have? they're gone :laughing:. i think it's safe to say they didnt go on vacation.

what DE/WM are you using? i3 ?

also post this output:

cat /etc/lightdm/lightdm.conf

good question, if it comes down to it i can put the xinit directory up for you to download>extract>copy over. i'm looking to see if there is anything that may cause issues. post that output while i look

1 Like

Hi i re ran the setup after deleting installing video-Intel. I'm able to switch now. Just that xbacklight works with Intel but not with nvidia

so everything seems to be working without that xinit directory?

you can switch between intel and nvidia modes?

run these to get rid of the error while switching

sudo mkdir /etc/X11/mhwd.d
sudo mkdir /etc/X11/xinit