Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
install gentoo on new laptop with optimus [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Frautoincnam
n00b
n00b


Joined: 19 May 2017
Posts: 44

PostPosted: Sun Mar 25, 2018 8:33 pm    Post subject: install gentoo on new laptop with optimus [solved] Reply with quote

[Solution]
It was just a SDDM bug ! https://bugs.gentoo.org/584960#c3 /var/lib/sddm is not created by sddm install (or first use)

Code:
mkdir /var/lib/sddm && chown sddm /var/lib/sddm

and ALL works fine. All my config was allready right. 2 days spent because of this dir.
[/Solution]


Hi,

I use Gentoo for about 15 ans, but not a guru. I'm trying to install it on a laptop my son gave me, but I don't know anything about Optimus system.
I tried a lot of things but I always have a black screen (where I can see the touchpad pointer).
I use sddm.

What I have actually :
Code:
# LC_MESSAGES=C lshw | head -n 9
svs15                       
    description: Notebook
    product: SVS15116GAB (N/A)
    vendor: Sony Corporation
    version: C60AF6PB
    serial: 27554846-7000678
    width: 4294967295 bits
    capabilities: smbios-2.7 dmi-2.7 smp vsyscall32
    configuration: boot=normal chassis=notebook family=VAIO sku=N/A uuid=B0B527F2-C833-E111-B722-30F9EDEA44DA

Code:
# dmidecode -t system
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Sony Corporation
        Product Name: SVS15116GAB
        Version: C60AF6PB
        Serial Number: 27554846-7000678
        UUID: F227B5B0-33C8-11E1-B722-30F9EDEA44DA
        Wake-up Type: Power Switch
        SKU Number: N/A
        Family: VAIO

Handle 0x000F, DMI type 32, 20 bytes
System Boot Information
        Status: No errors detected

Code:
# lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 640M LE] (rev a1)

Code:
# cat /usr/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Code:
# xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x2b6 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x48 cap: 0x2, Sink Output crtcs: 3 outputs: 6 associated providers: 1 name:modesetting

- kernel gentoo-source configured by hand with .config
Code:
# lsmod
Module                  Size  Used by
snd_hda_codec_hdmi     57344  1
snd_hda_codec_realtek    98304  1
snd_hda_codec_generic    77824  1 snd_hda_codec_realtek
snd_hda_intel          40960  0
snd_hda_codec         122880  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           81920  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_pcm               106496  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd_timer              36864  1 snd_pcm
iwldvm                151552  0
snd                    86016  6 snd_hda_intel,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_pcm
btusb                  40960  0
nvidia_drm             40960  2
nvidia_modeset       1081344  2 nvidia_drm
soundcore              16384  1 snd
iwlwifi               204800  1 iwldvm
nvidia              13889536  93 nvidia_modeset
btintel                16384  1 btusb
x86_pkg_temp_thermal    16384  0
coretemp               16384  0
kvm_intel             217088  0

- no /etc/X11/xorg.conf
Code:
# cat /etc/X11/xorg.conf.d/20-nvidia.conf
Section "Module"
        Load    "modesetting"
EndSection

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:01:0:0"
        Option          "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    Option "AccelMethod" "none"
EndSection

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

Code:
# cat /etc/X11/xorg.conf.d/20opengl.conf
Section "Files"
        ModulePath "/usr/lib64/opengl/nvidia"
        ModulePath "/usr/lib64/xorg/modules"
EndSection

Code:
# cat /etc/X11/xorg.conf.d/50-synaptics.conf
Section "InputClass"
        Identifier      "touchpad catchall"
        Driver          "synaptics"
        MatchIsTouchpad "on"
        Option          "VertEdgeScroll"        "on"
        Option          "CircularScrolling"     "on"
        Option          "VertScrollDelta"       "-111"
        Option          "HorizScrollDelta"      "-111"
        Option          "TapButton1"            "1"
EndSection

- dmesg
Don't know if the line
Code:
nvidia-modeset: WARNING: GPU:0: Correcting number of heads for current head configuration (0x00)
is the problem
- emerge --info
- /var/log/Xorg.0.log
No error, but :
Code:
(WW) NVIDIA(0): Unable to get display device for DPI computation.


If I use (as suggested in https://wiki.gentoo.org/wiki/NVIDIA/Optimus)
Code:

# cat 20-nvidia.conf
Section "Module"
        Load    "modesetting"
EndSection

Section "Device"
        Identifier      "nvidia"
        Driver          "nvidia"
        BusID           "PCI:1:0:0"
        Option          "AllowEmptyInitialConfiguration"
EndSection
I get /var/log/Xorg.0.log with 2 errors :
Code:
[  1528.864] (EE) modeset(G0): eglGetDisplay() failed
[  1528.896] (EE) modeset(G0): glamor initialization failed


Tell me if I forgot to tell something.
I hope that someone will know what I have to do...
Thanks


Last edited by Frautoincnam on Mon Mar 26, 2018 3:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


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

PostPosted: Mon Mar 26, 2018 2:56 pm    Post subject: Reply with quote

I'm going through what you're going through. What I do know:

Enter BIOS, make sure the graphics option is set to either use discrete only (if this option is available) or use both. Mine has a choice between use on-board only or use both, and I've selected the latter. Or you can decide you don't care much about 3D graphics and set it to use on-board only, in which case you want VIDEO_CARDS="intel" and do emerge -uDN world, restart X.

Otherwise, set VIDEO_CARDS="nvidia" in make.conf and run emerge -uDN world. eselect opengl nvidia, eselect opencl nvidia, restart X.

You might need to reconfigure your kernel to not use nouveau.

OR... you can not use nvidia-drivers and use nouveau, but that's a path I didn't take, so I can't say much about that.

I'm also interested in advice others might offer.
_________________
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
saboya
Guru
Guru


Joined: 28 Nov 2006
Posts: 395
Location: Brazil

PostPosted: Mon Mar 26, 2018 3:14 pm    Post subject: Reply with quote

I had Optimus working until some xorg / gnome combination, then it stopped working and I gave up trying to configure it, so there's that =P
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1419
Location: United Kingdom

PostPosted: Mon Mar 26, 2018 3:22 pm    Post subject: Reply with quote

In case it's of any help, this is how I got my Clevo W230SS laptop working with Optimus hardware, the NVIDIA closed-source driver and the Intel driver (I can switch between either driver): https://forums.gentoo.org/viewtopic-p-8114450.html#8114450
_________________
Clevo W230SS: amd64, OpenRC, nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64, OpenRC, xf86-video-ati, dual booting with Win 7 Pro 64-bit.
KDE on both laptops.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Frautoincnam
n00b
n00b


Joined: 19 May 2017
Posts: 44

PostPosted: Mon Mar 26, 2018 4:02 pm    Post subject: Re: install gentoo on new laptop with optimus [solved] Reply with quote

Frautoincnam wrote:

Tell me if I forgot to tell something.

I just forgot to tell that startx worked fine since the begining.
I tried to startkde, and I realized that my install wasn't yet finished.
I terminated it, but SDDM couldn't start.
I've founded https://www.reddit.com/r/linuxquestions/comments/7c97ez/sddm_doesnt_work_with_optimus/ but my SDDM already had #!/bin/sh in Xsetup.
I've founded https://forums.fedoraforum.org/showthread.php?316354-SDDM-shows-black-screen-with-Nvidia but my sddm.conf really pointed to /usr/share/sddm/scripts/Xsetup
I read @Fitzcarraldo guide, and I saw he had all working EXCEPT sddm and he links https://bugs.gentoo.org/584960#c3 where somebody talks about /var/lib/sddm/ missing.
I juste created it, and SDDM now starts.
Code:
mkdir /var/lib/sddm && chown sddm /var/lib/sddm


Note that I always have those 2 errors :
Code:
nvidia-modeset: WARNING: GPU:0: Correcting number of heads for current head configuration (0x00)
(WW) NVIDIA(0): Unable to get display device for DPI computation.


Thanks for your help.
Back to top
View user's profile Send private message
Frautoincnam
n00b
n00b


Joined: 19 May 2017
Posts: 44

PostPosted: Thu Apr 05, 2018 10:03 pm    Post subject: Reply with quote

Something I don't understand about all of that.
If if load nvidia-drm with modeset=1, I have no dmesg error
Code:
[ 1734.779909] nvidia-nvlink: Nvlink Core is being initialized, major device number 252
[ 1734.780331] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[ 1734.780449] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.42  Sat Mar  3 04:10:22 PST 2018 (using threaded interrupts)
[ 1734.782799] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.42  Sat Mar  3 03:30:48 PST 2018
[ 1734.783440] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 1735.141228] nvidia-modeset: Allocated GPU:0 (GPU-1e18cad1-23ee-a3c8-134b-49c7b29c9946) @ PCI:0000:01:00.0
[ 1735.141820] nvidia-modeset: WARNING: GPU:0: Correcting number of heads for current head configuration (0x00)
[ 1735.141912] nvidia-modeset: Freed GPU:0 (GPU-1e18cad1-23ee-a3c8-134b-49c7b29c9946) @ PCI:0000:01:00.0
[ 1735.141943] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1735.141943] [drm] No driver support for vblank timestamp query.
[ 1735.141946] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1


but I can't start X :
Code:
[  1263.829] (II) LoadModule: "nvidia"
[  1263.829] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[  1263.830] (II) Module nvidia: vendor="NVIDIA Corporation"
[  1263.830]    compiled for 4.0.2, module version = 1.0.0
[  1263.830]    Module class: X.Org Video Driver
[  1263.830] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1263.830] (II) NVIDIA dlloader X Driver  390.42  Sat Mar  3 03:00:31 PST 2018
[  1263.830] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  1263.830] (--) using VT number 8

[  1263.844] (II) modeset(G0): using drv /dev/dri/card1
[  1263.857] (II) modeset(G1): using drv /dev/dri/card0
[  1263.857] (EE) No devices detected.
[  1263.857] (EE)
Fatal server error:
[  1263.857] (EE) no screens found(EE)
[  1263.857] (EE)


And without modeset, I can't "synchronize" :
Code:
$ xrandr --verbose | grep PRIME
        PRIME Synchronization: 0
        PRIME Synchronization: 1
        PRIME Synchronization: 1
        PRIME Synchronization: 1
        PRIME Synchronization: 1
        PRIME Synchronization: 1


What do I miss please ?
Back to top
View user's profile Send private message
peterflax
n00b
n00b


Joined: 14 Apr 2018
Posts: 1

PostPosted: Sat Apr 14, 2018 8:52 pm    Post subject: yo Reply with quote

saboya wrote:
I had Optimus working until some xorg / gnome combination, then it stopped working and I gave up trying to configure it, so there's that =P

same happened to me as well :roll:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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