LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-09-2020, 09:44 PM   #1
GreyBeard
Member
 
Registered: Oct 2003
Location: Taxachusetts, USA
Distribution: Slackware
Posts: 45

Rep: Reputation: 1
Angry Need to force monitor size to 1920x1080 60Hz under Slackware 14.2


Hi,

I've been using an LG 1920x1080 60 Hz, flat screen monitor with VGA from an Intel Atom SBC running Slackware 14.2 for some time now. When I start the Atom up it takes a while to correctly size the screen output to the monitor, and that happens sometime during setting up KDE, but it does eventually get the size right.

Recently I acquired another computer and expect to get more. The new machine has only an HDMI monitor output whereas the old machine has only a VGA output. The LG monitor has both a VGA and an HDMI input.

I want to be able to switch back and forth using a KVM, but the KVM I bought has only HDMI inputs, not VGA, so I bought a VGA-to-HDMI converter to link my old machine's output to the KVM. I did check to make sure the VGA-to-HDMI converter could handle 1920x1080 60 Hz and the documentation says it can. The new machine linked to the monitor via the KVM works fine. The old machine linked to the monitor via the VGA-to-HDMI converter and the KVM gets the screen size wrong. Since I know the old machine can handle the screen when connected directly via the VGA port, I figure that the problem must be that the VGA-to-HDMI converter is somehow blocking the configuration information which the software needs to get the size right.

I've tried KDE's System Settings --> Display And Monitor but it only shows (I guess) default sizes, 1024x768 and smaller.

Then I looked in /var/log/Xorg.0.log and it says:

[115.870] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[115.900] (==) No Layout section. Using the first Screen section.
[115.900] (==) No screen section available. Using defaults.
[115.900] (**) |-->Screen "Default Screen Section" (0)
[115.900] (**) | |-->Monitor "<default monitor>"
[115.900] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.

Which leads me to believe that the converter is blocking configuration info. HOWEVER, xrander says this:

atomik $?=1> xrandr
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.00*
800x600 60.32 56.25
848x480 60.00
640x480 59.94
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
"1920x1080_60.00" (0x13c) 173.000MHz -HSync +VSync
h: width 1920 start 2048 end 2248 total 2576 skew 0 clock 67.16KHz
v: height 1080 start 1083 end 1088 total 1120 clock 59.96Hz

which suggests to me that the monitor's size IS known but is not used.

I also tried to make the configuration known using the following script using "cvt" and "xrandr" which I found in multiple places on the Internet:

atomik $?=0> RES="1920 1080 60"

atomik $?=0> echo RES="'$RES'"
RES='1920 1080 60'

atomik $?=0> DISP=$(xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")

atomik $?=0> echo DISP="'$DISP'"
DISP='VGA1'

atomik $?=0> MODELINE=$(cvt $(echo $RES) | grep -e "Modeline [^(]" | sed -r 's/.*Modeline (.*)/\1/')

atomik $?=0> echo MODELINE="'$MODELINE'"
MODELINE='"1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync'

atomik $?=0> MODERES=$(echo $MODELINE | grep -o -P '(?<=").*(?=")')

atomik $?=0> echo MODERES="'$MODERES'"
MODERES='1920x1080_60.00'

atomik $?=0> xrandr --newmode $MODELINE
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 139 (RANDR)
Minor opcode of failed request: 16 (RRCreateMode)
Serial number of failed request: 28
Current serial number in output stream: 28

atomik $?=1>

which I have NO IDEA how to fix. Since the xrandr --newmode fails then the xrandr --addmode $DISP $MODERES won't work, and it doesn't.

So at this point I don't know what to do. Honestly this whole thing with screen sizes on Slackware has been a nightmare over the years. This is, I think, the 4th time I've had to fight with it.

I think I am going to go to the grocery store and buy some ice cream.
 
Old 01-09-2020, 11:58 PM   #2
vtel57
Senior Member
 
Registered: Jul 2006
Location: VPN Tunnel, USA
Distribution: Slackware64 14.2
Posts: 1,281

Rep: Reputation: 274Reputation: 274Reputation: 274
Video card?

Drivers?
 
Old 01-10-2020, 05:43 AM   #3
GreyBeard
Member
 
Registered: Oct 2003
Location: Taxachusetts, USA
Distribution: Slackware
Posts: 45

Original Poster
Rep: Reputation: 1
Sorry, the computer in question is an SBC so there is no separate graphics card for me to tell you about. I really don't know what information you are specifically looking for so I just went digging around in KDE's graphical hardware viewer looking for likely things, and also in the Intel Atom PDFs. I have attached that information as images in no particular order. Note that I plugged the VGA back in so this information is showing VGA stuff.

If you need more please tell me how to get it. Thank you.
Attached Thumbnails
Click image for larger version

Name:	graphical_info.1.jpg
Views:	24
Size:	159.2 KB
ID:	32257   Click image for larger version

Name:	graphical_info.2.jpg
Views:	15
Size:	33.5 KB
ID:	32258   Click image for larger version

Name:	graphical_info.3.jpg
Views:	16
Size:	78.3 KB
ID:	32259   Click image for larger version

Name:	graphical_info.4.jpg
Views:	14
Size:	70.5 KB
ID:	32260   Click image for larger version

Name:	graphical_info.5.jpg
Views:	13
Size:	74.7 KB
ID:	32261  

 
Old 01-10-2020, 08:04 AM   #4
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 -current (started with 13.37(32))
Posts: 520

Rep: Reputation: 215Reputation: 215Reputation: 215
I run slightly different xranr command to set resolutions in VBox, maybe it helps.

--addmode will (hopefully) add the resolution to the KDE list. It works with Xfce and LXDE.
--output will apply immediately the resolution, if not then something went wrong.
Code:
cvt 1440 900
xrandr --newmode "1440x900"  60.00 1440 1528 1672 1904  900 903 909 934 -Hsync +Vsync
xrandr --addmode VGA-0 "1440x900"
xrandr --output VGA-0 --mode "1440x900"
 
Old 01-10-2020, 08:07 AM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,364

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Your Intel Atom SBC has an Intel GMA 3150 integrated graphics controller (vendor id 0x8086, device id 0xA001). This is supported by the i915 kernel module.
You can likely force the graphics display to 1920x1080 at 60Hz at boot by adding the kernel options " video=LVDS-1:d video=VGA-1:1920x1080@60e" to the append line of your boot loader. (Check the output names from the output of 'ls /sys/class/drm').
You could consider adding a file /etc/X11/xorg.conf.d/20-intel.conf containing:
Code:
Section "Monitor"
  Identifier "Internal Display"
EndSection

Section "Monitor"
  Identifier "External Display"
EndSection

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "monitor-LVDS1" "Internal Display"
  Option      "monitor-VGA1"  "External Display"
EndSection
 
Old 01-10-2020, 01:15 PM   #6
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware 14.2
Posts: 130

Rep: Reputation: 23
atomik $?=0> xrandr --newmode "$MODELINE"

Does that work?

Edit: You might need to add HorizSync and VertRefresh in the xorg.conf,

Last edited by slacktroll; 01-10-2020 at 01:37 PM.
 
Old 01-12-2020, 03:27 PM   #7
GreyBeard
Member
 
Registered: Oct 2003
Location: Taxachusetts, USA
Distribution: Slackware
Posts: 45

Original Poster
Rep: Reputation: 1
Well the suggestion of adding " video=LVDS-1:d video=VGA-1:1920x1080@60e" to the append line of your boot loader had an effect. KDE now allows a 1920x1080 choice BUT it the screen comes up as 1024x768 and when I do select 1920x1080 the image on the screen is compressed horizontally with a strip of black about 1.5 inches (38 mm) wide on both sides of the physical screen, and the mouse cursor cannot move outside the desktop onto the black strips. I suspect, therefore, that there is additional information which the graphics controller needs but it is not getting.

I am also confused about the name of the device. I did Check the output names from the output of 'ls /sys/class/drm' and I see a "VGA-1" in some directory name, but I have seen "VGA1" many times on this system, so I don't know which to use.

I'm going to go try something else. Thank you for your help thus far.

Quote:
Originally Posted by allend View Post
Your Intel Atom SBC has an Intel GMA 3150 integrated graphics controller (vendor id 0x8086, device id 0xA001). This is supported by the i915 kernel module.
You can likely force the graphics display to 1920x1080 at 60Hz at boot by adding the kernel options " video=LVDS-1:d video=VGA-1:1920x1080@60e" to the append line of your boot loader. (Check the output names from the output of 'ls /sys/class/drm').
You could consider adding a file /etc/X11/xorg.conf.d/20-intel.conf containing:
Code:
Section "Monitor"
  Identifier "Internal Display"
EndSection

Section "Monitor"
  Identifier "External Display"
EndSection

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "monitor-LVDS1" "Internal Display"
  Option      "monitor-VGA1"  "External Display"
EndSection
 
Old 01-12-2020, 11:50 PM   #8
GreyBeard
Member
 
Registered: Oct 2003
Location: Taxachusetts, USA
Distribution: Slackware
Posts: 45

Original Poster
Rep: Reputation: 1
Getting there. Still have unused screen on both sides.

OK, I added the file you suggested with the content shown below. That had an effect too, and that was to cause the initial pixel size displayed by KDE to be 1920x1080 rather than 1024x768 as before, meaning that the right pixel size now appears automatically. HOWEVER there are still the 1.5 inch black bars on each side of the 1920 X pixels compressing the images on the screen horizontally.

Quote:
Originally Posted by allend View Post
You could consider adding a file /etc/X11/xorg.conf.d/20-intel.conf containing:
Code:
Section "Monitor"
  Identifier "Internal Display"
EndSection

Section "Monitor"
  Identifier "External Display"
EndSection

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "monitor-LVDS1" "Internal Display"
  Option      "monitor-VGA1"  "External Display"
EndSection
 
Old 01-13-2020, 07:02 AM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,364

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Quote:
I am also confused about the name of the device.
Different output names are used by the i915 kernel module and the intel Xorg driver.
The output of 'ls /sys/class/drm' shows the names that will be recognised by the i915 kernel module.
On this laptop, I see card0-LVDS-1 and card0-VGA-1 for the internal display and the external VGA display on the GPU.
When X is started, then xrandr shows the names that will be recognised by the intel Xorg driver.
On this laptop, I see LVDS1 and VGA1 for the internal display and the external VGA display on the GPU.

I suspect that the KVM switch is stopping the probing of the EDID information from the monitor.
As has been suggested, you can try adding a modeline for the monitor. The example below works for me, but it would be better to attach the monitor directly and look at the output in /var/log/Xorg.0.log to get the appropriate information.
Code:
Section "Monitor"
  Identifier "External Display"
  Modeline "1920x1080_60.0"  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
EndSection
Another approach, but not for the faint of heart, is to extract the EDID from the monitor into a small binary file and then use the 'Option "CustomEDID" ' to the intel Xorg driver.

Last edited by allend; 01-13-2020 at 07:05 AM.
 
Old 01-13-2020, 09:27 AM   #10
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware 14.2
Posts: 130

Rep: Reputation: 23
What about
Code:
xrandr --output LVDS1 --off
xrandr --newmode "1920x1080@60"  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
xrandr --addmode VGA1 "1920x1080@60"
xrandr -s 1920x1080@60
? :-)
 
  


Reply

Tags
displays, kde configuration, slackware, slackware 14.2, x-windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Force Resolution of 4K monitor to 1920x1080 in lenovo laptop giobaxx Linux - Newbie 9 12-02-2016 03:26 PM
3D rendering seems jerky though FPS is fixed at monitor refresh rate (60Hz) 10110111 Linux - Hardware 5 07-02-2010 11:10 AM
Modifying xorg.conf to set up monitor to 1280x1024 60hz refresh rate. glore2002 Slackware 10 09-11-2008 06:40 PM
Force Linux to run at 60hz refresh rate gfx Linux - Hardware 1 10-26-2003 09:12 PM
Monitor Recomended 60Hz but 'drake sets it at 70Hz mgbgt Linux - Newbie 1 06-15-2003 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration