[mythtv-users] Messed up xorg configuration
Kenneth Emerson
kenneth.emerson at gmail.com
Fri May 27 14:52:00 UTC 2022
On Thu, May 26, 2022 at 6:15 PM Hika van den Hoven <hikavdh at gmail.com>
wrote:
> Hoi Kenneth,
>
> Friday, May 27, 2022, 12:50:00 AM, you wrote:
>
>
>
>
> > On Sun, May 22, 2022 at 2:32 AM Stephen Worthington <
> stephen_agent at jsw.gen.nz> wrote:
>
> > On Sat, 21 May 2022 19:16:49 -0500, you wrote:
> >
> >>While trying to solve another issue, I've created a new one for myself.
> >>While playing with different themes, I forgot that I had made a custom
> >>theme from one of the existing ones. When I tried to upgrade and/or
> change
> >>the theme I ended up in a deep hole. Nothing would work except the
> >>myth-center-wide. Every other one gave me errors regarding the video.
> >>
> >>In trying to fix this, thinking it really was a video issue, I upgraded
> my
> >>Nvidia driver, which worked (the driver did) but of course, it didn't
> solve
> >>the problem. Once I got my head out of my arse, I realized what I had
> done
> >>and restored the custom theme in my home directory. That fixed theme
> >>problem and then the problem I currently have:
> >>
> >>The frontend works fine when the TV is turned on and the AVR is
> switched to
> >>the correct HDMI input (the mythtv server). But as soon as I either
> turn
> >>off the TV or the AVR, the NVIDIA driver or the GUI kills the HDMI
> output
> >>and my only recourse is to restart the GUI (I'm using lightdm). I've
> set up
> >>what I thought used to work in the xorg.conf file:
> >>
> >>Section "ServerLayout"
> >> Identifier "Layout0"
> >> Screen 0 "Screen0" 0 0
> >> InputDevice "Keyboard0" "CoreKeyboard"
> >> InputDevice "Mouse0" "CorePointer"
> >> Option "StandbyTime" "0"
> >> Option "SuspendTime" "0"
> >> Option "OffTime" "0"
> >> Option "BlankTime" "0"
> >> Option "Xinerama" "0"
> >>EndSection
> >>
> >>Section "Files"
> >>EndSection
> >>
> >>Section "InputDevice"
> >>
> >> # generated from default
> >> Identifier "Mouse0"
> >> Driver "mouse"
> >> Option "Protocol" "auto"
> >> Option "Device" "/dev/psaux"
> >> Option "Emulate3Buttons" "no"
> >> Option "ZAxisMapping" "4 5"
> >>EndSection
> >>
> >>Section "InputDevice"
> >>
> >> # generated from default
> >> Identifier "Keyboard0"
> >> Driver "kbd"
> >>EndSection
> >>
> >>Section "Monitor"
> >>
> >> # HorizSync source: edid, VertRefresh source: edid
> >> Identifier "Monitor0"
> >> VendorName "Unknown"
> >> ModelName "DENON, Ltd. DENON-AVR"
> >> HorizSync 30.0 - 255.0
> >> VertRefresh 24.0 - 120.0
> >># ModeLine "3840x2160_60" 593.41 3840 4016 4104 4400 2160 2168
> 2178
> >>2250 +hsync +vsync
> >> Option "DPMS"
> >>EndSection
> >>Section "Device"
> >>
> >> Option "ConnectedMonitor" "DFP-1"
> >> Option "CustomEDID" "DFP-1:/etc/X11/edid.bin"
> >> Option "IgnoreEDID" "FALSE"
> >> Option "UseEDID" "TRUE"
> >> Identifier "Device0"
> >> Driver "nvidia"
> >> VendorName "NVIDIA Corporation"
> >> BoardName "GeForce GT 1030"
> >>EndSection
> >>
> >>Section "Screen"
> >> Identifier "Screen0"
> >> Device "Device0"
> >> Monitor "Monitor0"
> >> DefaultDepth 24
> >> Option "Stereo" "0"
> >> Option "nvidiaXineramaInfoOrder" "DFP-1"
> >> Option "metamodes" "3840x2160 +0+0"
> >> Option "SLI" "Off"
> >> Option "MultiGPU" "Off"
> >> Option "BaseMosaic" "off"
> >># Option "ModeDebug" "TRUE"
> >> SubSection "Display"
> >> Depth 24
> >> EndSubSection
> >>EndSection
> >>
> >>I've tried several different drivers (430, 450, 470, 510) and currently
> >>have 470 installed, but they all produced the same problem. So the
> >>configuration is a PC with a GT 1030 video card, HDMI out to a Denon AVR
> >>and HDMI from Denon to an LG TV capable of 3840x2160. I've set the
> power
> >>options in lightdm to all off for the monitor (no sleep, no auto off,
> >>etc). Either turn off the TV or the Denon and I cannot get a signal
> out of
> >>the GT 1030 card that either the Denon or the TV sees ( I'm assuming
> it's
> >>the Denon that needs to see the signal and if the TV is turned off, the
> >>Denon switches off the HDMI input. There are no errors shown in the
> >>Xorg.0.log and it does show the DFP-1 is connected to the LG even if
> they
> >>are turned off (both DVR and TV) which, I assume, is because I am using
> a
> >>custom edid.bin file.
> >>
> >>Any thoughts as to what I'm forgetting to do?
> >>
> >>Regards,
> >>
> >>Ken Emerson
> >
> > I am also using an Nvidia GT1030 card, with the 470 drivers and
> > updated to the 510 drivers today.
> >
> > The usual cause for your problem is that X is trying to read the EDID
> > data and is unable to when the AVR is off or switched to a different
> > video output, or the TV is off. If the AVR is doing its job properly,
> > it will be doing EDID passthrough and emulation where it reads and
> > saves the EDID data whenever it is read from the TV and when the TV is
> > unavailable, will provide that saved EDID data instead. However, it
> > looks like the AVR is not doing that. The next thing is the TV. Good
> > TVs (like my Sony Bravia KDL-32V5500) will provide the EDID data even
> > when they are switched off completely (and unplugged from the wall).
> > They do this by taking power from the HDMI input and using that to
> > power the EDID circuit. However, there are lots of TVs (and most
> > monitors) that do not do this and will only provide EDID data when
> > they are on. Some will not even provide EDID data when they have
> > power but are in standby. And for everything to work properly, when
> > the AVR is in standby, it should also be providing the EDID data, or
> > connecting to the TV to get it to provide it.
> >
> > The solution to EDID problems is normally to take a copy of the EDID
> > data and use the CustomEDID option in xorg.conf. However, you seem to
> > already have done that, but you should check that it is working by
> > checking the /var/log/Xorg.0.log file to see where the EDID is coming
> > from. I am not exactly sure how you tell that, but if it is working,
> > you should be able to unplug the HDMI cable from the PC to the AVR and
> > boot and it should boot up correctly with a full desktop and you
> > should be able to use VNC (if you have that set up) to see that
> > desktop from another machine. My guess is that, despite your
> > CustomEDID option, the custom EDID is not actually working - maybe
> > there is a permissions problem on the EDID file, or something like
> > that.
> >
> > One other thing to check for is screensaver problems. I have a
> > problem at the moment that my video is going into a screensaver mode
> > (blank screen) after a timeout. This did not used to happen before a
> > couple of months ago, so it is likely some recent change in the Nvidia
> > drivers or Xorg that is causing it. My guess is Xorg, as I saw a new
> > version of it being installed around the time the problem started. In
> > my case, the screen unblanks if I use the keyboard (the shift key is
> > sufficient). I can disable this screensaver using this command:
> >
> > xset s off
> >
> > If I do the "xset q" command before "xset s off", I see that the
> > "Screen Saver: timeout:" setting is 600. After "xset s off" it is 0.
> >
> > I have not found any setting for xorg.conf that affects this screen
> > saver, so I have just now set up a systemd user service to run the
> > "xset q" command at user startup:
> >
> > root at mypvr:~# cat /home/stephen/.config/systemd/user/startup.service
> > [Unit]
> > Description=JSW user startup
> >
> > [Service]
> > ExecStart=/home/stephen/bin/jsw-user-startup.sh
> >
> > [Install]
> > WantedBy=multi-user.target
> >
> > root at mypvr:~# cat /home/stephen/bin/jsw-user-startup.sh
> > #!/bin/bash
> >
> >
> >
> ##############################################################################
> > # Commands to be run at startup by a systemd user service.
> >
> >
> ##############################################################################
> >
> > # Prevent screensaver from blanking screen.
> > xset s off
> >
> > # Show that this file has been run.
> > echo "$(date) $0 ran" >>/tmp/$(basename "$0").log
> >
> > To do this fix, create files equivalent to the above and make sure
> > they have the correct permissions. Then do:
> >
> > sudo systemctl daemon-reload
> > systemctl --user enable --now startup.service
> >
> > I have not tested this by rebooting yet, but it works when the unit is
> > run manually (systemctl --user start startup) and should work at boot
> > time or when the desktop is restarted.
> >
> > There appear to be three different screensavers that can blank the
> > screen. The other two are the xscreensaver program, and DPMS.
> >
> > To disable xscreensaver, you can just stop it from being started. With
> > the XFCE4 desktop, go to Applications > Settings > Session and Startup
> >> Application Autostart and find the Screensaver line and untick it.
> >
> > To disable DMPS, you can do "xset -dpms", or you can put:
> >
> > Option "DPMS" "false"
> >
> > in xorg.conf in Section "Monitor". However, there seems to be
> > something the re-enables DPMS periodically, so I have found it better
> > to do as you have already done and put:
> >
> > Section "ServerFlags"
> > Option "BlankTime" "0"
> > Option "StandbyTime" "0"
> > Option "SuspendTime" "0"
> > Option "OffTime" "0"
> > EndSection
> >
> > in xorg.cong and leave DPMS enabled. Those settings turn off all the
> > timeouts that control DPMS.
>
>
>
>
>
> > Stephen:
>
>
> > This is getting even more frustrating. I've cleaned up my
> > xorg.conf file, remade the edid.bin file from the nvidia-settings
> > program, doing everything that I think is correct and it works as
> > long as I don't disconnect the video feed from the TV (via the Denon
> > AVR). As soon as I do that the video signal from the graphics card is
> gone. But . . .
>
>
> > Here is some more interesting data. If I leave the Denon
> > connecting the PC to the TV (where I'm getting 'No Signal' from the
> > TV) and then shutdown X (via service lightdm stop), I see the PC
> > console vt #5 (dedicated to the graphical UI IIRC. From there, I
> > can open another console VT and restart X (service lightdm start)
> > and viola! The output comes back on. But if I repeat turning the TV
> > off and back on, I'm back to square one and I can't open another VT
> > because I'm actually still connected, somehow, the the UI but the video
> is turned off.
>
>
> > So in my opinion, it's either X or lightdm that shuts off the video
> > output when it sees there isn't a monitor connected. Now the
> > Xorg.log.0 file shows the TV is connected via DFP-1 (and it never
> > goes disconnected) so I'm leaning towards the problem with lightdm
> > or some configuartion I have that causes it to act this way. I did
> > do your 'xset s off' and checked that the timeout was set to zero, but
> that didn't help.
>
>
> > Maybe you or someone else reading this thread can come up with some
> > other ideas that I can try. I guess I could try getting xfce to run
> > or some other window UI, but I've had this system running for 2
> > years now with no problems. Obviously, I changed something but I have
> no idea what it could be.
>
>
> > Regards,
>
>
> > Ken Emerson
>
> It took me some time to remember, but I think it is the kernelmodule
> that shuts down (in its opinion) unused ports. But you can override
> this through mode setting. This is my kernel line:
>
> append="root=/dev/sda2 dolvm modeset=1 video=VGA-0:1280x960-32 at 85
> video=HDMI-0:1920x1080-32 at 60 video=DVD-D-0:1280x1024-32 at 60"
>
> See more at: https://wiki.archlinux.org/title/Kernel_mode_setting
>
>
> Tot mails,
> Hika mailto:hikavdh at gmail.com
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
>
>
> Problem Solved!
I want to thank everyone that reached out to me to try to help with my
(self-inflicted) problems. When I checked my email this morning and read my
daily logwatch report from my MythTV server, I saw this entry:
WARNING: Kernel Errors Present
WARNING: GPU:0: Unable to read EDID for display ...: 3 Time(s)
This was the actual entry in kern.log:
May 27 08:42:48 MythTV kernel: [244612.551764] nvidia-modeset: WARNING:
GPU:0: Unable to read EDID for display device DENON, Ltd. DENON-AVR (HDMI-0)
Well, that was a surprise and a clue. Evidently, through updates in X,
even if you're not using one of your graphic outputs, X cares. The GT-1030
that I'm using has an HDMI and a DVI connection of which I am only using
the HDMI. My xorg.conf file only tells X that DFP-1 is used (connected)
and to use an edid.bin file for information. In the past that has worked
stupendously, but not anymore. I added "Option "CustomEDID"
"DFP-0:/etc/X11/edid.bin"" to the Device section and restarted lightdm and,
viola!, the output stays on when the system (TV, AVR) is turned off and
back on.
BTW: Currently using nvidia driver version 510.
Perhaps this information will help others.
Regards,
Ken Emerson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220527/c2ec834c/attachment.htm>
More information about the mythtv-users
mailing list