dglt1 / optimus-switch-sddm

easy installer for optimus-switch for SDDM, sets up nvidia PRIME and also allows for easy switching between intel/nvidia (prime mode) and intel only mode where nvidia gpu is powered down and no longer visible. modes are switched with "sudo set-intel.sh" or "sudo set-nvidia.sh" .
166 stars 14 forks source link

(EE) no screens found(EE) #8

Closed Ridder90 closed 4 years ago

Ridder90 commented 5 years ago

Hi, Thanks for this work!

When boot in nivdia mode. I get aan tty screen with (EE) no screens found(EE) error.

See the log below:

.local/share/xorg/Xorg.1.log https://pastebin.com/U2NNs5nK

My GPU is not on bus 1:0:0:

lspci | grep -E 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake)
3c:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX250] (rev a1)

So i modified: ~/optimus-switch-sddm/switch/nvidia/nvidia-xorg.conf

#/etc/X11/xorg.conf.d/99-nvidia.conf
#adjust BusID to match your nvidia GPU
#uncomment and edit the DPI option as needed
#to fix scaling issues.

Section "Module"
    Load "modesetting"
EndSection

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

Section "Extensions"
    Option  "Composite" "Enable"
EndSection

Furthermore i have runned the gpu switch check. And i get a lot of warnings:

/etc/switch/gpu_switch_check.sh: line 63: warning: command substitution: ignored null byte in input

I did however found that \_SB.PCI0.GFX0._DSM works. So i changed /etc/switch/intel/no-optimus.sh to:

#!/bin/sh

#this script is run as a display setup script
#that replaces the one used by nvidia/prime.
##
#this powers-down/disables the nvidia dGPU and
#removes it from /sys/bus/pce/devices
#for the current boot. this is reset after reboot.
# PLEASE READ BELOW TO ENABLE THIS

xrandr --auto
echo 'auto' > '/sys/bus/pci/devices/0000:3c:00.0/power/control'  #adjust busid if needed

#############
##make sure the line below is the correct acpi_call to disable your nvidia gpu.
#to find out what call disables your nvidia gpu,
#run this (not while using nvidia gpu, this is why i left it commented out.
#
#` sudo /etc/switch/gpu_switch_check.sh `
#
#and see which acpi_call is returned as "works!" and then uncomment and edit this file to match.
#same goes for the the BusID of nvidia card,
#default is set to 0000:01:00.0 (syntax is important)
#if your nvidia gpu has a 1:00:0 busID, just uncomment the line, no change needed.

echo `\_SB.PCI0.GFX0._DSM' > /proc/acpi/call
echo -n 1 > '/sys/bus/pci/devices/0000:3c:00.0/remove'

Boot in in intel mode works. However it starts in tty.. after login and running startx it starts the desktop environment.

What am i missing here? Not sure if i am in the right place btw. Thanks in advance.

dglt1 commented 5 years ago

first, confirm there are no conflicting .conf files in any of these directories. the only video related .conf files should be 99-nvidia.conf or 99-intel.conf, depending on which mode you have set. if there are other video related conf files you need to move/delete them.

/etc/X11/xorg.conf.d/
/etc/modprobe.d/
/etc/modules-load.d/

Boot in in intel mode works. However it starts in tty..

make sure sddm is enabled, if sddm is disabled or fails to load then so will the display setup script that gets run by sddm when it starts.

systemctl status sddm

BusID "PCI:3c:0:0"

i've seen many different bus id's but not once have i seen one with a letter on an optimus laptop. 3c:0:0 actually converts to another bus id with only numbers but i cant for the life of me remember how the conversion works. anyway, the BusID is an extra step but not always a necessary one in regards to the Xorg configuration so after checking the directories i listed above, edit /etc/switch/nvidia/nvidia-xorg.conf and comment out the BusID line and save/exit. then set nvidia mode again to apply the changes and reboot.

if that should fail to load, dont reboot yet and get to a TTY please post these outputs. you can use a paste service from cli to make things easier sudo pacman -S pastebinit and add | pastebinit to the end of each command and it will paste it for you and provide a link to each. post those links.

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
ls -la /etc/modules-load.d ; cat /etc/modules-load.d/*.conf
cat /var/log/Xorg.0.log
dglt1 commented 5 years ago

BusID "PCI:3c:0:0"

ok, 3c:00.0 converts to 60:0:0 so edit /etc/switch/nvidia/nvidia-xorg.conf

#/etc/X11/xorg.conf.d/99-nvidia.conf
#adjust BusID to match your nvidia GPU
#uncomment and edit the DPI option as needed
#to fix scaling issues.

Section "Module"
    Load "modesetting"
EndSection

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

Section "Extensions"
    Option  "Composite" "Enable"
EndSection