LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-18-2017, 02:48 PM   #1
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 268

Rep: Reputation: 25
How to set preferred resolution of FHD for a 4K TV in XFCE?


Hi, I'm posting this in hardware since I'm working with a HDMI TV rather than a monitor.

Anyway here's the issue. My TV is 4K and I connected it to my linux PC over a HDMI cable. I've set the resolution to FHD (1920x1080p60) and it works fine. Now the thing is that whenever I turn the TV off and back on again the resolution will change back to 4K UHD. I don't reboot or logout, just turning the TV off and on will cause the change. I take it turning off the TV is equivalent to disconnecting it from HDMI.

Is there a way to prevent this from happening? The system should remember the last used resolution (FHD). Been searching online, but all I found were some outdated guides that suggest to edit the xorg.conf file that doesn't seem to exist any more on newer systems.

I'm using xubuntu 17.10.
 
Old 11-18-2017, 06:47 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
One thing that might help is to go to Display Settings and uncheck "Configure new displays when connected". But this might already be unchecked and it might not help since things are a bit different when there's only one display connected (or no displays connected).

A crude hack which could at least mitigate the problem is to make a script which runs xrandr to set the display resolution to 1920x1080 once every few seconds. This will have no effect at all if the resolution is already the desired resolution. But it will switch the display resolution back to what you want if it ever switches to 4K.
 
Old 11-18-2017, 08:54 PM   #3
batman23
Member
 
Registered: Mar 2004
Posts: 67

Rep: Reputation: 8
Quote:
Originally Posted by displace View Post
Hi, I'm posting this in hardware since I'm working with a HDMI TV rather than a monitor.

Anyway here's the issue. My TV is 4K and I connected it to my linux PC over a HDMI cable. I've set the resolution to FHD (1920x1080p60) and it works fine. Now the thing is that whenever I turn the TV off and back on again the resolution will change back to 4K UHD. I don't reboot or logout, just turning the TV off and on will cause the change. I take it turning off the TV is equivalent to disconnecting it from HDMI.

Is there a way to prevent this from happening? The system should remember the last used resolution (FHD). Been searching online, but all I found were some outdated guides that suggest to edit the xorg.conf file that doesn't seem to exist any more on newer systems.

I'm using xubuntu 17.10.
Please post "lspci"
 
Old 11-19-2017, 02:34 AM   #4
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 268

Original Poster
Rep: Reputation: 25
Configure new displays is already unchecked.

Quote:
Originally Posted by IsaacKuo View Post
A crude hack which could at least mitigate the problem is to make a script which runs xrandr to set the display resolution to 1920x1080 once every few seconds.
I was afraid of having to use a script.
Is there not some setting where one can set a default/preferred resolution for a given device (I think xorg.conf is no longer used on modern systems)?
How does XFCE/X11 decide to use the 4K resolution - where is the logic located?
Also, assuming your approach, would it not be better to use a udev rule instead of running a script every few seconds?

Here is lspci output:
Quote:
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD9x0/RX980 Host Bridge (rev 02)
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GFX port 0)
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 0)
00:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 4)
00:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 5)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 42)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0)
00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 5
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970]
02:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
04:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
05:0e.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0)
Here is xrandr output:
Code:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
   4096x2160     24.00    23.98  
   3840x2160     30.00    25.00    24.00    29.97    23.98  
   1920x1080    120.00   100.00   119.88    60.00*   50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94  
   1280x1024     60.02  
   1360x768      60.02  
   1152x864      59.97  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
   720x400       70.08  
DVI-0 disconnected (normal left inverted right x axis y axis)
DVI-1 disconnected (normal left inverted right x axis y axis)
 
Old 11-21-2017, 11:07 PM   #5
batman23
Member
 
Registered: Mar 2004
Posts: 67

Rep: Reputation: 8
Quote:
Originally Posted by displace View Post
Hi, I'm posting this in hardware since I'm working with a HDMI TV rather than a monitor.

Anyway here's the issue. My TV is 4K and I connected it to my linux PC over a HDMI cable. I've set the resolution to FHD (1920x1080p60) and it works fine. Now the thing is that whenever I turn the TV off and back on again the resolution will change back to 4K UHD. I don't reboot or logout, just turning the TV off and on will cause the change. I take it turning off the TV is equivalent to disconnecting it from HDMI.

Is there a way to prevent this from happening? The system should remember the last used resolution (FHD). Been searching online, but all I found were some outdated guides that suggest to edit the xorg.conf file that doesn't seem to exist any more on newer systems.

I'm using xubuntu 17.10.
hmmmmm

You are using XFCE4?

Settings > Settings Manager > Display

What is the setting set at on this control panel?
 
Old 11-22-2017, 02:29 AM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by displace View Post
Is there a way to prevent this from happening? The system should remember the last used resolution (FHD). Been searching online, but all I found were some outdated guides that suggest to edit the xorg.conf file that doesn't seem to exist any more on newer systems.
Modern automagic has made xorg.conf an optional file. If you create one, and suitably include
Code:
Option  "PreferredMode" "1920x1080"
in it, all users whose DE settings do not override it should find it to be the startup mode. As an alternative to /etc/X11/xorg.conf, /etc/X11/xorg.conf.d/50-monitor.conf can be used to specify PreferredMode.
 
Old 11-24-2017, 03:15 PM   #7
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 268

Original Poster
Rep: Reputation: 25
batman23: Yes, it's Xubuntu 17.10. The settings are set to FHD upot boot. When I turn the TV off and back on it changes to UHD (4K), and I have to set it back to FHD manually using that display window.

mrmazda: I tried putting that into xorg.conf and got a black screen upon reboot. It seems that X11 doesn't like the option in the root section according to xorg logs. I'll probably have to put it into an appropriate subsection. I'll do some reading on this part.

bbl
 
Old 11-24-2017, 03:35 PM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by displace View Post
I tried putting that into xorg.conf and got a black screen upon reboot. It seems that X11 doesn't like the option in the root section according to xorg logs. I'll probably have to put it into an appropriate subsection. I'll do some reading on this part.
PreferredMode belongs in 'Section "Monitor"'. As an alternative to using any xorg.conf at all, 'Section "Monitor"' can comprise the entirety of /etc/X11/xorg.conf.d/50-monitor.conf. I don't recall ever finding the use of PreferredMode to cause a black screen. Either it works, or it is ignored.
 
  


Reply

Tags
change, constant, resolution, tv, xfce



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Current Preferred Slack Method Preventing Xfce Tearing? enorbet Slackware 12 04-16-2014 07:34 PM
xrandr maximum resolution is well below the preferred Dornith Linux - Software 7 09-17-2013 04:02 PM
xubuntu on eeepc - xfce - need to set custom resolution - how? superchar42 Ubuntu 4 11-16-2012 11:55 AM
how can I set preferred apps other than web browser and email client in Ubuntu 7.04? atmartin50 Linux - Newbie 2 05-22-2007 02:18 AM
Unable to set preferred browser to Firefox: FC3/Gnome essdeeay Linux - Software 1 04-04-2005 05:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration