Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I can add HDMI monitor only after 5 minutes after boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
young-druid
n00b
n00b


Joined: 15 Oct 2015
Posts: 20

PostPosted: Sun Jul 10, 2016 12:12 pm    Post subject: I can add HDMI monitor only after 5 minutes after boot Reply with quote

I have the second monitor connected via HDMI to my laptop.
Gentoo boots in text mode first. And it used to detect the second monitor in a proper mode. When I logged then under my user it successfully loaded dwm with two monitors as well.
I think after some kernel/driver update it broke but not exactly after update probably after next boot. But is not broken completely. If I wait for 4-5 minutes and call
Code:
xrandr --output HDMI1 --auto --right-of LVDS1

monitor is detected again.
Also I noticed when I update kernel first boot after restart is fine. Monitor is detected. But then it is broken again. I do not see anything suspicious in dmesg.
Can anyone advise what the problem could be or where else I can check logs for potential errors?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Tue Jul 12, 2016 1:22 pm    Post subject: Reply with quote

MAy I ask what drivers are you using.

For my laptop ASUS g75VW with nvidia-drivers.

I fire up nvidia-settings. Than i click detect monitors and set it up. nvidia-settings offer to safe the config files which I should than apply to the box. But I have not done that yet. I do this every time, because I change the resolution left / right depending on the work I want to do.

---

Depends on your used gpu drivers and gpu, content of xorg.log check /var/log directory, how the xorg-server detects your montior ...

my notebook hardware does not really well detect my monitor over the vga connector.

manually creating the xorg related config files regarding gpu and monitor section can solve such issues.

--

log files are

# cat /var/log/Xorg.0.log

also check if there are other files 0 => 1 => 2 .... the log files are numbered. also check

/var/log/messages

and ofc as said dmesg

--

You should have something like this for your hardware. This is an example from arch linux wiki, should be adapted to your needs

Code:
/etc/X11/xorg.conf.d/10-monitor.conf
Section "ServerLayout"
    Identifier     "TwinLayout"
    Screen         0 "metaScreen" 0 0
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    Option         "Enable" "true"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    Option         "Enable" "true"
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"

    #refer to the link below for more information on each of the following options.
    Option         "HorizSync"          "DFP-0: 28-33; DFP-1 28-33"
    Option         "VertRefresh"        "DFP-0: 43-73; DFP-1 43-73"
    Option         "MetaModes"          "1920x1080, 1920x1080"
    Option         "ConnectedMonitor"   "DFP-0, DFP-1"
    Option         "MetaModeOrientation" "DFP-1 LeftOf DFP-0"
EndSection

Section "Screen"
    Identifier     "metaScreen"
    Device         "Card0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "True"
    SubSection "Display"
        Modes          "1920x1080"
    EndSubSection
EndSection


I have read a bit recently about this topic.

you need to define those meta modes, if you want ot mirror / position of the screen and such, which gpu connector and such ...

I gave you an example for nvidia-drivers binary gpu driver, because i use that.
Back to top
View user's profile Send private message
young-druid
n00b
n00b


Joined: 15 Oct 2015
Posts: 20

PostPosted: Tue Jul 12, 2016 9:40 pm    Post subject: Reply with quote

Quote:
MAy I ask what drivers are you using.

I am using x11-drivers/xf86-video-intel for intel i965
But I think problem is not even in x11 driver because monitor is not detected in text mode. And after I login and wait for 4-5 minutes I can easily add the second monitor with
Code:
xrandr --output HDMI1 --auto --right-of LVDS1

And auto-detection used to work in both text/x11 mode. I think some update broke it but cannot understand which. May be udev but may be something in kernel was changed.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Wed Jul 13, 2016 9:38 am    Post subject: Reply with quote

I guess this is a kernel issue.
You can try to force the HDMI monitor to on using the video=... kernel parameter like this:
Code:
video=HDMI-A-1:e
(replace HDMI-A-1 with the actual kernel name for that connector from /sys/class/drm)
But then the graphics chip will treat the monitor as on all the time even if none is connected.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Wed Jul 13, 2016 9:42 am    Post subject: Reply with quote

My monitor behaves differently. nvidia-settings detects the resolution differently when the power is on or off of my vga connected monitor.

only advise so far

change your title / or at least append => intel gpu do not detect instantly second external screen
A Better phrased title makes it easier to guys to help you

Is there a way to tell your intel gpu driver to detect displays? i can click in nvidia-settings to detect all screens!

afaik there were a debug package for the intel gpus in portage (was 1-2 years ago, before I sold that laptop ...)

you may create a config file for X so you tell the x-server the specs of your external screen, how it is connected, where, which specs and such, which gpu to use ...
Back to top
View user's profile Send private message
young-druid
n00b
n00b


Joined: 15 Oct 2015
Posts: 20

PostPosted: Wed Jul 27, 2016 7:36 pm    Post subject: Reply with quote

Thanks for tips. I didn't have time to investigate further. But I also noticed one interesting thing. I have a dual boot with Windows 10. Each time I boot into Gentoo after I booted into Windows 10 the second monitor is always detected at startup by Gentoo.
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 621
Location: France

PostPosted: Fri Jul 29, 2016 1:06 pm    Post subject: Reply with quote

If you don't poweroff your computer (i.e. you select "restart" on Windows), it makes a warm boot.
Back to top
View user's profile Send private message
young-druid
n00b
n00b


Joined: 15 Oct 2015
Posts: 20

PostPosted: Sun Jul 31, 2016 9:22 am    Post subject: Reply with quote

I will put some progress here.
I noticed that monitor is always detected fine when in dmseg I have the following:
Code:
agpgart-intel 0000:00:00.0: Intel GM45 Chipset
agpgart-intel 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable
agpgart-intel 0000:00:00.0: detected 131072K stolen memory
agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xc0000000
...
[drm] Initialized drm 1.1.0 20060810
...
fbcon: inteldrmfb (fb0) is primary device
...
Console: switching to colour frame buffer device 170x48
i915 0000:00:02.0: fb0: inteldrmfb frame buffer device

But is strange too because I have VIDEO_CARDS="intel i965" in make.conf. But anyway monitor is detected and everything works

But sometimes I have the following in dmesg:
Code:

[drm] Initialized drm 1.1.0 20060810
pci 0000:00:00.0: Intel GM45 Chipset
pci 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable
pci 0000:00:00.0: detected 131072K stolen memory
[drm] Memory usable by graphics device = 2048M
[drm] Replacing VGA console driver
Console: switching to colour dummy device 80x25
pmd_set_huge: Cannot satisfy [mem 0xc0000000-0xc0200000] with a huge-page mapping due to MTRR override.
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
acpi device:1c: registered as cooling_device2
input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input7
[drm] Initialized i915 1.6.0 20151010 for 0000:00:02.0 on minor 0
fbcon: inteldrmfb (fb0) is primary device
agpgart: Erk, registering with no pci_dev!
agpgart-intel: probe of 0000:00:00.0 failed with error -22

In that case monitor sometimes is detected and sometimes is not. It seems the order of modules is wrong. agpgart should be the first. I found something related here and here but it was in old kernel and not really sure if it is a regression bug.
Back to top
View user's profile Send private message
young-druid
n00b
n00b


Joined: 15 Oct 2015
Posts: 20

PostPosted: Sun Jul 31, 2016 9:42 am    Post subject: Reply with quote

I added the following into /etc/conf.d/modules
Code:

modules="intel-agp"
modules="agpgart"

as it is recommended here. I will check if it helps for a few days. Should I consider that udev or xf86-video-intel do not work properly and do not load drivers in a proper order automatically?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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