Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, guys, I hope someone can help. Since the release of Slackware 15.0 I have been trying to use XFCE after many years with Fluxbox. I am liking XFCE 4.16 so far except for this odd behavior, which never happened in Fluxbox. I never tried XFCE in Slackware 14.2 so I don't know if this would have benn happening then.
For the monitor I am using a Toshiba 19 inch HDTV. It is capable of 1920x1080 resolution, but for a computer desktop it is much too small without a lot of font and icon resizing. I normally use 1280x720, it has always been fine in Fluxbox, and is fine in XFCE when first logging in. My video card is a GTX 750Ti using the proprietary 390.147 driver.
The odd thing is anytime the monitor is powered off or disconnected (such as an HDMI selector box), upon reconnection the display is automatically changed to 1920x1080 on top of 1280x720 with everything enlarged so that it pans around with the mouse. I wonder if it is triggering events such as sleep and wakeup.
When I look at the Xorg.0.log immediately after this happens I see this line at the end
I got the monitor rates and modelines, and screen metamodes line yesterday from nvidia-settings when it offered to save the config. The DPMS Option in the monitor section is also from the nvidia-settings config and was not in xorg.conf before yesterday.
And this is the output of xrandr in case it helps. This tv has two HDMI and 1 VGA input but does not have any DVI
Code:
Screen 0: minimum 8 x 8, current 1280 x 720, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1280x720+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
1920x1080 60.00 + 59.94 59.93 23.98 60.05 60.00
1680x1050 59.95 59.88
1600x900 59.95 59.82
1440x480 60.05
1400x1050 59.98
1400x900 59.96 59.88
1368x768 59.88 59.85
1360x768 60.02 60.02
1360x765 60.00
1280x1024 60.02
1280x960 60.00
1280x800 59.91 59.81
1280x768 59.99
1280x720 60.00* 59.94
1024x768 60.00
1024x576 59.90 59.82
960x540 59.82 59.63 59.99 59.96
864x486 59.92 59.57
840x525 60.01 59.88
800x600 60.32 56.25
800x450 59.95 59.82
720x480 59.94
720x405 59.51 58.99
700x525 59.98
700x450 59.96 59.88
684x384 59.88 59.85
640x480 59.94 59.93
640x400 59.98 59.88
640x360 59.84 59.32 59.86 59.83
512x384 60.00
512x288 60.00 59.92
480x270 59.82 59.63
432x243 59.92 59.57
360x202 59.51 59.13
320x240 60.05
320x180 59.84 59.32
DVI-D-0 disconnected (normal left inverted right x axis y axis)
The nvidia-settings gui has the correct resolution, and XFCE's Display settings has the correct resolution; but XFCE detects the monitor as a Toshiba 72 inch. I wish it was that! I have opened both showing 1280x720, left them open, then disconnected the HDMI cord. When reconnected the display is enlarged again, and both settings windows still show 1280x720.
I've searched here a little but not really sure what to search for. In Google I found a few things, only this reddit that sounds similar, but is unanswered. I found where some have solved other resolution problems by setting Option "PreferredMode" in xorg.conf. I tried that but it doesn't work for me.
Is there something to add to xorg.conf, or an nvidia setting, to stop the nvidia-auto-select; or to force it to auto-select my preferred mode? In XFCE's Display settings, Advanced tab, I have made sure that identifying and configuring new displays are off. I even toggled them on and back off to save the off setting.
I needed that in the past with older drivers to correct overscan or underscan on a 1366x768 HDTV. Now, after X is already running nvidia is automatically overriding the ViewPortOut (but not ViewPortIn) to 1920x1080 on a reconnect event.
Does switching to a vtty and back to XFCE restore 1280x720?
I suspect this issue may need to be taken to NVidia's own forums, at least, if you're committed to its proprietary drivers. There are a lot of behavioral differences between FOSS drivers and proprietaries. PreferredMode would seem to be the ticket if you were using FOSS. It does work here, though I don't have any NVidia's with XFCE to test.
I tried with a 22" Samsung FullHDTV (which rejects attempts to use 1280x720). The following:
Following every power down of the Samsung, power up brings it back in 1360x768. You might try this file as a template to use without NVidia's proprietary drivers installed. There's absolutely no configuration required if all that is wanted is the display's native 1920x1080p resolution.
If you're lucky, XFCE could be like KDE/Plasma with an xrandr mechanism for controlling display configuration that can be disabled, so as not to mess with automagic or your own xrandr setup or /etc/X11/xorg.con*. Plasma's is called KScreen 2. Or, it might have one that can be used to lock it down to 1280x720.
Note that my Samsung lies big about its size, so inxi shows a very bogus DPI. It's actual size is around 480mm X 270mm.
Thanks, mrmazda. I will try the vtty idea this evening. Over the weekend I thought I'd try the nouveau driver, but X wouldn't start and the log file ends with several lines of
Code:
(EE) [drm] Failed to open DRM device for pci:0000:0b:00.0: -19
NVidia's drivers aren't as easy to remove as to install. They're supposed to come with installation instructions and include removal instructions that need to be strictly followed. I have a bunch of old NVidia GPUs. They all work just fine on FOSS. I've never installed NVidia's proprietary drivers on any PC I own, though I did once on someone else's as an adjunct to building his new PC and installing openSUSE on it. Thus I don't have hands-on experience in their purging. That error message I think may suggest initrd needs rebuilding to exclude nvidia module and include nouveau module.
Last night I reconnected the HDMI to trigger the problem, then switched to another vtty with Ctrl+Alt+F2. When switching back with Ctrl+Alt+F1 it was still the same.
I'll try modifying my monitor section of xorg.conf. The main difference appears to be my inclusion of the ModeLines. How can i get the numbers for DisplaySize?
That's what I suspected regarding the nvidia driver. I think the installer has a uninstall option. It's been a few years since I tried nouveau, but when I did some OpenGL games didn't work. When I have time this weekend I might give it another try. And if nouveau works better now than in my previous attempt I might keep it.
Maybe XFCE's settings manager, or just the Display component, has something to do with it. Those are not running when I use Fluxbox even when I launch the nm-applet and xfce4-terminal. I'm still familiarizing with XFCE and don't know how to disable it (if it can be). The options that I toggled off in the Advanced tab of the Display settings is the closest I've found to that.
DisplaySize isn't necessary to employing 1280x720. However, it is an alternate solution to your actual problem. DPI is the "dial" that Gnome, KDE and various other DEs use to adjust font sizes, likely XFCE among them. If you want to use DisplaySize, it just takes a little math applied to your numbers shown by inxi (which it gets from /var/log/Xorg.0.log or ~/.local/share/xorg/Xorg.0.log or a call to xdpyinfo). Or, you can choose one from a lookup table. What I suggest is adjusting nvidia settings to:
leave the mode at 1920x1080
force DPI to 132
If you were using FOSS drivers instead of NVidia's, it would be something like the following in /etc/X11/xorg.conf.d/50-monitor.conf:
In going this route, there is another setting that may need to be changed for Firefox and other GTK apps. As I'm not an XFCE user, I can't be sure. To ~/.Xresources, add Xft.dpi: 132, followed by logging out & back in.
1) In the nVidia control panel do you have any of the scaling options enabled? The 'zoom and pan' you describe feels like a pretty typical 'nvidia thing' that their driver/GPUs will offer as scaling options if left to defaults/auto settings (it probably has a place, don't get me wrong, but clearly your use case is not it). Try changing the scale settings to either 'on display' or 'disabled' if they're set to 'on GPU.'
2) XFCE actually has two levers for 'scaling' - you can change DPI (which primarily impacts font sizes - changing things like panel size is done individually), but you can also set a global scaling factor in 'Displays' - values >1 will make things relatively smaller, and <1 will make things relatively larger. Adjusting this setting can also cause some applications trouble, because it generates a 'fake' resolution to implement this feature (e.g. if you have a 4K display, and set scaling to 2.0x, it will report being an 8K display - I haven't seen this cause problems for GTK/'2D' applications, but it can make trouble for OpenGL applications). Are either of these settings active/configured to anything but default?
As far as the 'resetting' - it sounds like there could be a handshaking issue with the TV and the computer (there's no maybe 'nice' way to fix this depending on origin - welcome to the world of HDMI) where it isn't being 'remembered' properly. Hotplugging displays on XFCE should recall previous settings to the limits of what is possible - it shouldn't revert every time the system starts up. There are a variety of HDMI devices that are meant to capture or spoof EDID to solve these kinds of problems, but most of them are not cheap. Generally TVs do not handle sleep/wake events properly (or at least, not like a monitor does).
Questions:
1) Does this TV support any other comparable inputs, such as VGA? In my experience the VGA ports on TVs behave much more consistently (or 'monitor-like') than the HDMI inputs.
2) Do you need this HDMI switch box in the chain? It may be part of the problem, if its causing the computer/display to register disconnect events (if its very basic it probably is just cutting the signal out, as in it really IS a disconnect event) that may be causing this - if you attach the monitor directly to the GTX 750 Ti does the behavior change?
3) Do you have some other display you can test this with, to try and isolate if the issue is the TV<->computer interaction or something squarely on the computer's configuration?
obobskivich, thanks for these ideas. I will check those nvidia control panel and XFCE settings when I get a chance. IIRC, my nvidia control panel scaling is currently set to auto.
This tv does have a VGA input, and I used it several years ago with a Trendnet kvm. Never had anything like this happen with the kvm.
I do need this HDMI switch to switch between this computer and raspberry pi projects. It is a basic switch so probably is just cutting the signal, as you put it.
I had it directly into the tv for a long time, before adding the HDMI switch, but never experienced this behavior because I never had a reason to disconnect it.
I do not have any other HDMI display available.
obobskivich, thanks for these ideas. I will check those nvidia control panel and XFCE settings when I get a chance. IIRC, my nvidia control panel scaling is currently set to auto.
This tv does have a VGA input, and I used it several years ago with a Trendnet kvm. Never had anything like this happen with the kvm.
I do need this HDMI switch to switch between this computer and raspberry pi projects. It is a basic switch so probably is just cutting the signal, as you put it.
I had it directly into the tv for a long time, before adding the HDMI switch, but never experienced this behavior because I never had a reason to disconnect it.
I do not have any other HDMI display available.
I'm wondering if going VGA+KVM wouldn't be the easiest way around this, if you still have the KVM - maybe I'm just spoiled but IME KVMs should do EDID capture/replay (so the computer never thinks its been disconnected from the monitor, even when the KVM switches inputs), but I'm not sure what output options the Raspberry Pi offers - I know HDMI to VGA adapters are cheap though.
Thanks, obobskivich. I already have one (cheap) passive HDMI-VGA adapter with a Pi Zero2 on an old 15" VGA-only monitor - a dedicated MAME2003 setup While it works, it draws a significant amount of the power, limiting power available to other components, and the system needs an alternative device for audio. My Pis that share the HDMI already have USB Wi-Fi dongles and additional hardware attached for cameras, NAS, fans and LED displays; so they probably can't handle an HDMI-VGA adapter in addition to their current loads.
On my main pc, if I switch to VGA output I would have to install an extra sound card for audio. i do still have my Trendnet kvm; but I remember having a problem with it when, occasionally, the display would not work on any of the attached computers. The only way to fix it is to disconnect all attached computers, power them all off, then reconnect them to the kvm. Quite frustrating :-)
I checked my nvidia control panel and it does not have a scaling option. The ones I remember being set to auto are rotation and refresh. In XFCE the scaling factor in Display settings is always 1x; and in Appearance -> Fonts settings at 1280x720 resolution I have DPI set to 92. As previously mentioned I found a setting for configuring new displays when connected under Advanced Display settings, and I have it toggled off.
mrmazda, I got X to start with the nouveau driver just now. Had to run the nvidia .run file with --uninstall, disable the nvidia-blacklist-nouveau.conf file, and reboot. At first it still failed with an error that /usr/lib64/xorg/modules/dri/nouveau_dri.so is missing, and that the ABI module's major version doesn't match the server's version. Indeed I don't have the nouveau_dri.so file and I got past the error by disabling the IgnoreABI option in the ServerFlags section of xorg.conf.
Now, X started in 1920x1080, so I changed it to 1280x720 and tried the switch again. It still reset itself to 1920x1080 again, but instead of being enlarged now it is scaled so there is no panning and the fonts and icons were smaller. I used your suggestion to increase the DPI to 132 and that raises the fonts to a good size. I can use X like this.
With nouveau any native program that requires OpenGL fails with a GLX error, and anything that runs in wine that requires OpenGL cannot initialize GL. SDL programs work fine. Hopefully I can find an easy fix for this.
Edit: Fixed it. Found some leftover nvidia files to remove, and due to my own clumsy self had to reinstall glu, glew and libglvnd to replace some libGL** files. LOL OpenGL things are working now and all seems good.
Awesome, and what an adventure and I'm glad you got it working.
One thing to question this system on: newer nvidia GPUs don't allow themselves to be 'clocked up' (brought out of idle state) without the nvidia driver (read: they deliberately break things for nouveau), which will limit performance severely (because 'idle state' is usually about 10% of typical clocks). I'm not sure where your GTX 750 fits into that, but it may be worth looking into if you need performance in OpenGL. A really unsatisfying answer to all of this would be to ditch the nvidia card (and concomitant drivers) and grab an old Radeon or FirePro off of ebay (or some similar) - GTX 750 isn't exactly state of the performance, so finding something comparable (performance wise) would not be impossible even in the current market. Just a thought.
Thanks for the tip, obobskivich. I'll check on that. You're correct that this card is not state-of-the-art. In fact, the 750 and 750Ti were released in 2014 and the first Maxwell-based nvidia gpus.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.