You are not logged in.

#1 2010-12-12 22:43:18

ReggieMantle
Member
Registered: 2010-12-12
Posts: 4

Intel Graphics and xrandr commands at startup

Hi all, I am new at Arch.  I'm trying to setup a P4 computer as a media player.  It is hooked up to 40" LCD panel.  The computer has Intel 845 graphics and no open PCI slots, so I am stuck with using the onboard graphics for the resolution I want.  I was able to do this with Ubuntu/Gnome by adding these lines to /etc/gdm/init.d/default

xrandr --newmode "1920x1080" 148.5 1920 2008 2052 2200 1080 1089 1095 1125 +hsync +vsync
xrandr --addmode VGA1 1920x1080
xrandr --output VGA1 --mode  1920x1080

That solved the problem, I got a great picture but the OS with Gnome was hogging all my memory.  I've tried lighter distros but, if I run this as an executable script after the window manager loads, the screen doesn't render properly.  I've only been able to get Gnome or XFCE to work properly.  With XFCE, I ran it as a shell script in the autostart applications.

My question is, where is the best place to run these commands in the Arch startup sequence?  If I get this to run at the proper time, should I be able to use LXDE or E17?

Offline

#2 2010-12-12 22:47:18

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Intel Graphics and xrandr commands at startup

If it doesn't pick the right resolution itself, the best way to fix it is using a video= option in the kernel line (in your bootloader config). That way you get the right resolution everywhere, and you don't need to run any commands to switch it.

If you put the xrandr stuff in xinitrc it should work though.

Something like this:

video=VGA-1:1920x1080@60e (with the right refresh rate)

Last edited by thestinger (2010-12-12 22:51:39)

Offline

#3 2010-12-12 23:02:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Intel Graphics and xrandr commands at startup

@ thestinger
I think Intel drivers need KMS and KMS doesn't like video= or vga= options in the kernel line.

@ ReggieMantle
Put them in ~/.xinitrc.

Last edited by karol (2010-12-12 23:04:01)

Offline

#4 2010-12-12 23:17:39

ReggieMantle
Member
Registered: 2010-12-12
Posts: 4

Re: Intel Graphics and xrandr commands at startup

Thanks, will this work even if this resolution is not listed?  That is, will putting this command in xinitrc add the new mode, if it is not present?

Offline

#5 2010-12-12 23:21:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Intel Graphics and xrandr commands at startup

ReggieMantle wrote:

Thanks, will this work even if this resolution is not listed?

Not listed where? Using xrandr you can sort of force your resolution.

Try it and see if it works.

Offline

#6 2010-12-12 23:30:07

ReggieMantle
Member
Registered: 2010-12-12
Posts: 4

Re: Intel Graphics and xrandr commands at startup

OK thanks.  I'll put the xrandr commands in .xinitrc  and see if it works.

Offline

#7 2010-12-12 23:31:09

Japanlinux
Member
Registered: 2010-05-18
Posts: 173

Re: Intel Graphics and xrandr commands at startup

On my netbook I use a program to give an artificial resolution above the limits of the hardware. There is a script that does this called newrez (@ http://gtk-apps.org/content/show.php/ne … nt=134686) that requires zenity and bc. So if everything else fails to give you a better resolution, you could try that app.

Offline

#8 2010-12-13 00:09:48

ReggieMantle
Member
Registered: 2010-12-12
Posts: 4

Re: Intel Graphics and xrandr commands at startup

Thanks everyone.  It worked!  I'm running e16 at full resolution.  This is a great forum!

Offline

#9 2010-12-13 01:08:39

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Intel Graphics and xrandr commands at startup

karol wrote:

@ thestinger
I think Intel drivers need KMS and KMS doesn't like video= or vga= options in the kernel line.

The video= option is kernel mode setting, you can use it to do stuff like really disable the LCD on a laptop when you're using an external monitor - xrandr only works in Xorg and the connector will probably still be powered on.

You can use video= to use a framebuffer (similar to vga=), and that would probably break any KMS driver because you're trying to use two at once.

Best source a quick google can find (go down to forcing modes):
http://nouveau.freedesktop.org/wiki/KernelModeSetting

Last edited by thestinger (2010-12-13 01:19:49)

Offline

#10 2010-12-13 01:24:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Intel Graphics and xrandr commands at startup

@ thestinger
I'm just relying on the wiki: https://wiki.archlinux.org/index.php/KMS#Enabling_KMS

Offline

#11 2010-12-13 01:34:31

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Intel Graphics and xrandr commands at startup

fixed that page up, it seems like at one point video= was only used for framebuffers and didn't work with KMS, but now it's the standard KMS interface

Offline

#12 2010-12-13 01:48:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Intel Graphics and xrandr commands at startup

thestinger wrote:

fixed that page up, it seems like at one point video= was only used for framebuffers and didn't work with KMS, but now it's the standard KMS interface

Cool, thanks for clearing that up :-)

Offline

Board footer

Powered by FluxBB