Atom N2600/CedarTrail graphics problems & workarounds?[Solv]

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Atom N2600/CedarTrail graphics problems & workarounds?[Solv]

Postby jacobh » 2012-04-09 09:02

I have an Asus Eee PC with the new Intel Atom N2600 Cedar Trail chip which has integrated graphics. lspci reports:
Code: Select all
VGA compatible controller: Intel Corporation Atom Processor D2xxx Integrated Graphics Controller (rev 09)


Unfortunately, I do not think this chip is well supported by linux. Therefore, at the moment Xorg is falling back on the VESA driver and running it in 800x600 mode. This makes the laptop barely usable, not least because of the stretching that goes on to fit 800x600 into a 1024x768 ratio.

I was wondering if anyone could help me with any suggested solutions or workarounds?

I think a solution is difficult because I am not sure if the drivers (yet) exist. I read elsewhere that the 3.3.0 kernel would support the Cedar Trail. I’ve installed the 3.3.0 kernel from Experimental which seems to run fine but that does not to affect the launching of X as far as I can tell. I am not sure if I would have to load some extra kernel modules or something to get it working; but I can’t find any documentation about what they would be.

In terms of a workaround, I was wondering if it is possible to put VESA into a 1024 x 768 resolution?

At the moment, it is not loading with any flexibility. xrandr reports:
Code: Select all
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 800 x 600, current 800 x 600, maximum 800 x 600
default connected 800x600+0+0 0mm x 0mm
   800x600        61.0*


Xorg seems to detect the width of the screen (but gives the height as 600) correctly:
Code: Select all
[    78.325] (II) VESA(0): Supported detailed timing:
[    78.325] (II) VESA(0): clock: 54.2 MHz   Image Size:  220 x 129 mm
[    78.325] (II) VESA(0): h_active: 1024  h_sync: 1077  h_sync_end 1112 h_blank_end 1356 h_border: 0
[    78.325] (II) VESA(0): v_active: 600  v_sync: 604  v_sync_end 609 v_blanking: 666 v_border: 0
and polls it for the following setting:
Code: Select all
[    78.325] (II) VESA(0): Printing DDC gathered Modelines:
[    78.325] (II) VESA(0): Modeline "1024x600"x0.0   54.20  1024 1077 1112 1356  600 604 609 666 -hsync -vsync (40.0 kHz)
However, it then all goes wrong:
Code: Select all
[    78.411] (WW) VESA(0): Unable to estimate virtual size
[    78.411] (II) VESA(0): Not using built-in mode "800x600" (no mode of this na
me)
[    78.411] (II) VESA(0): Not using built-in mode "640x480" (no mode of this name)
[    78.411] (WW) VESA(0): No valid modes left. Trying less strict filter...
[    78.411] (II) VESA(0): <default monitor>: Using hsync value of 39.97 kHz
[    78.411] (II) VESA(0): <default monitor>: Using vrefresh value of 60.02 Hz
[    78.411] (WW) VESA(0): Unable to estimate virtual size
[    78.411] (II) VESA(0): Not using built-in mode "800x600" (hsync out of range)
[    78.411] (II) VESA(0): Not using built-in mode "640x480" (hsync out of range)
[    78.411] (WW) VESA(0): No valid modes left. Trying aggressive sync range...
[    78.412] (II) VESA(0): <default monitor>: Using hsync range of 31.50-39.97 kHz
[    78.412] (II) VESA(0): <default monitor>: Using vrefresh range of 50.00-60.02 Hz
[    78.412] (WW) VESA(0): Unable to estimate virtual size
[    78.412] (II) VESA(0): Not using built-in mode "640x480" (hsync out of range)
[    78.412] (--) VESA(0): Virtual size is 800x600 (pitch 800)
[    78.412] (**) VESA(0): *Built-in mode "800x600"


To try to get the higher resolution working, I have tried adding the following to /etc/defaults/grub and ran update-grub2:
Code: Select all
GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=1024x768x32
I also tried the second parameter as GRUB_GFXPAYLOAD_LINUX=allow which some other places on the internet suggested as an alternative.

I also tried adding vga=712 and vga=0x318 manually to the boot parameters in grub since these should be the codes for 1028x768 VESA but without success.

In addition to the /var/log/Xorg.0.log log the only other problem that I have seen is that if I try to automatically recreate the Xorg.conf file by killing the display manager and running X -configure it fails with this error:
Code: Select all
(EE) open /dev/fd0: No such file or directory

suggesting that the framebuffer has problems.

Would anyone be able to help me with these problems, either for a solution or a workaround to get the resolution up to scratch?

Many thanks!

-Jacob
Last edited by jacobh on 2012-04-20 12:17, edited 1 time in total.
jacobh
 
Posts: 20
Joined: 2011-03-29 23:44

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby dtl131 » 2012-04-10 22:29

The Cedar Trail GPU is about a half-step above a paperweight in Linux. The best workaround is to get a system with a GPU that's actually supported in Linux. Anyway...
Try manually setting horizsync and vertrefresh in xorg.conf. The default hsync range is not very large and excludes larger resolutions.
dtl131
 
Posts: 449
Joined: 2011-07-11 19:56

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby jacobh » 2012-04-11 14:24

dtl131 wrote:The Cedar Trail GPU is about a half-step above a paperweight in Linux. The best workaround is to get a system with a GPU that's actually supported in Linux. Anyway...
Yes, I know now, but on the wrong side of a purchase made on the basis that the first Eee was a linux machine so the more recent ones must work, too ;-)

dtl131 wrote:Try manually setting horizsync and vertrefresh in xorg.conf. The default hsync range is not very large and excludes larger resolutions.
Ok, thanks, will try.
jacobh
 
Posts: 20
Joined: 2011-03-29 23:44

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby jacobh » 2012-04-12 08:36

Sorry but could I have some help in writing the xorg.conf file? X -configure fails to generate one due to a “/dev/fb0 Not found” error and I am not sure how to start manually writing one (it’s years and years since I last did it).

I tried:
Code: Select all
Section "Monitor"
        Identifier      "Screen 0"
        HorizSync       30-81
        VertRefresh     56-75
        Option          "UseFBDev"              "true"
        Driver          "fbdev"
EndSection


but X failed to start with a no screens found error. xrandr identifies the screen as “Screen 0” which is why I went for that identifier but that may be wrong.

Thanks!
jacobh
 
Posts: 20
Joined: 2011-03-29 23:44

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby peter_irich » 2012-04-12 17:07

Show all your xorg.conf.
For example, in my xorg.conf
Code: Select all
Section "Monitor"
        Identifier   "Monitor0"
        DisplaySize  307        246
        ModeLine     "1280x1024" 145.69 1280 1376 1512 1744 1024 1025 1028 1071 -HSync +VSync
        Option      "VendorName" "ATI Open Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

and
Code: Select all
Section "Screen"
        Identifier "Screen0"
        Device     "Device0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1280x1024"
        EndSubSection
EndSection


Peter.
peter_irich
 
Posts: 1303
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby dtl131 » 2012-04-13 23:31

You should use vesa (not fbdev) if you want support for changing resolutions.
dtl131
 
Posts: 449
Joined: 2011-07-11 19:56

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby Ibidem » 2012-04-15 00:38

Ah, PowerVR bites again. The next Atom should work better, but that's irrelevant.
It will almost certainly NOT be 1024x768: that is the same old 4:3 aspect ratio as 800x600, while almost every netbook uses the 1024x600 screen.

The kernel module should be gma500_gfx or perhaps psb_gfx, from what I read [1][2]-- see if that can be modprobed in.
Code: Select all
#Do the following as root
#check for driver; take care to read the parameters (parm: )
#probaly will include a modeset: (int) line, but maybe not
modinfo gma500_gfx
#check if the firmware is installed--if not, maybe install linux-firmware-nonfree
modinfo gma500_gfx|grep firmware|awk '{print"/lib/firmware/" $2}'|xargs ls
#Load driver -add parameters as needed
#fbcon is for a console under KMS
modprobe fbcon
modprobe gma500_gfx modeset=1
#now it should flicker & change resolutions; if so, start X.


[1] http://phoronix.com/forums/showthread.php?66624-Cedar-Trail-graphics-drivers-%28N2600-N2800%29-for-Linux
[2] https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo

ANother possibility may be 915resolution.mod in grub2, if Debian ships that (I use grub1).
There's also uvesafb for the kernel, but that's a last resort
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
Ibidem
 
Posts: 160
Joined: 2010-12-24 18:28

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby jacobh » 2012-04-15 12:14

peter_irich wrote:Show all your xorg.conf.
For example, in my xorg.conf
What I showed above was all my Xorg.conf. No file was automatically generated on install and I can’t generate one with X -configure. That’s why I think I need to write one by hand and I’m not quite sure what I should put in (since X Server stuff is not anywhere near a specialty of mine). I’ll try playing around with it again.

dtl131 wrote:You should use vesa (not fbdev) if you want support for changing resolutions.

Ah, thanks. That would make sense.

Ibidem wrote:Ah, PowerVR bites again. The next Atom should work better, but that's irrelevant.
It will almost certainly NOT be 1024x768: that is the same old 4:3 aspect ratio as 800x600, while almost every netbook uses the 1024x600 screen.
Yes, you are quite right; that was my mistake.

Ibidem wrote:The kernel module should be gma500_gfx or perhaps psb_gfx, from what I read [1][2]-- see if that can be modprobed in.
Will this work with the N2600? I wasn’t sure if they were only for the slightly older Atoms with integrated graphics. As far as I can see the drivers are no available in any way within debian. There are some instructions for building the Ubuntu ones which I might try if that’s the only option.

Ibidem wrote:ANother possibility may be 915resolution.mod in grub2, if Debian ships that (I use grub1).
I tried that, but unfortunately it does not work with the N2600. (It also broke grub in all sorts of exciting ways but that’s another story ;-) ).

Thanks for all your help.
jacobh
 
Posts: 20
Joined: 2011-03-29 23:44

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby jacobh » 2012-04-15 12:41

I’ve been playing around with the following in the xorg.conf:
Code: Select all
Section "Device"
    Identifier    "Configured Video Device"
    Driver        "vesa"
EndSection

Section "Monitor"
    Identifier    "Configured Monitor"
    HorizSync 42.0 - 81.0
    VertRefresh 55.0 - 75.0
    Modeline "1024x600_75.00"   62.50  1024 1072 1176 1328  600 603 613 629
    Modeline "1024x600_60.00"   49.00  1024 1072 1168 1312  600 603 613 624
    Modeline "800x600" 38.21 800 832 976 1008 600 612 618 631
    Modeline "640x480" 24.11 640 672 760 792 480 490 495 50
EndSection

Section "Screen"
    Identifier    "Default Screen"
    Monitor        "Configured Monitor"
    Device        "Configured Video Device"
    DefaultDepth    24
    Subsection "Display"
        Depth       24
        Modes       "1024x600_75.00" "1024x600_60.00" "800x600" "640x480"
       EndSubsection
EndSection
but this fails with:
Code: Select all
[ 10000.799] (II) VESA(0): Total Memory: 123 64KB banks (7872kB)
[ 10000.799] (II) VESA(0): Configured Monitor: Using hsync range of 42.00-81.00 kHz
[ 10000.799] (II) VESA(0): Configured Monitor: Using vrefresh range of 55.00-75.00 Hz
[ 10000.799] (II) VESA(0): Not using mode "1024x600_75.00" (no mode of this name)
[ 10000.799] (II) VESA(0): Not using mode "1024x600_60.00" (no mode of this name)
[ 10000.799] (II) VESA(0): Not using built-in mode "800x600" (no mode of this name)
[ 10000.799] (II) VESA(0): Not using built-in mode "640x480" (no mode of this name)
[ 10000.799] (WW) VESA(0): No valid modes left. Trying less strict filter...
[ 10000.800] (II) VESA(0): Configured Monitor: Using hsync range of 42.00-81.00 kHz
[ 10000.800] (II) VESA(0): Configured Monitor: Using vrefresh range of 55.00-75.00 Hz
[ 10000.800] (II) VESA(0): Not using mode "1024x600_75.00" (no mode of this name)
[ 10000.800] (II) VESA(0): Not using mode "1024x600_60.00" (no mode of this name)
[ 10000.800] (II) VESA(0): Not using built-in mode "640x480" (hsync out of range)
[ 10000.800] (--) VESA(0): Virtual size is 800x600 (pitch 800)
[ 10000.800] (**) VESA(0): *Built-in mode "800x600"


From looking around elsewhere, am I right in thinking I’ll never get this to work with the vesa driver because 1024x600 is not a built in mode?
jacobh
 
Posts: 20
Joined: 2011-03-29 23:44

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby Ibidem » 2012-04-15 23:48

jacobh wrote:
Ibidem wrote:Ah, PowerVR bites again. The next Atom should work better, but that's irrelevant.
It will almost certainly NOT be 1024x768: that is the same old 4:3 aspect ratio as 800x600, while almost every netbook uses the 1024x600 screen.
Yes, you are quite right; that was my mistake.

Ibidem wrote:The kernel module should be gma500_gfx or perhaps psb_gfx, from what I read [1][2]-- see if that can be modprobed in.
Will this work with the N2600? I wasn’t sure if they were only for the slightly older Atoms with integrated graphics. As far as I can see the drivers are no available in any way within debian. There are some instructions for building the Ubuntu ones which I might try if that’s the only option.

If you read the references, you would see that one of the in-kernel drivers has recently (kernel 3.3) had Cedar Trail support added.
However, this module appears to not be built, even in kernel 3.3; this is where I'd recommend building your own kernel (read the HOWTOs, it will help)
Here's the Kconfig file from Linux 3.3.2
Looks like you should enable these:
Code: Select all
CONFIG_EXPERIMENTAL
CONFIG_DRM
CONFIG_DRM_GMA500
CONFIG_DRM_GMA3600
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
Ibidem
 
Posts: 160
Joined: 2010-12-24 18:28

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby jacobh » 2012-04-20 12:16

Ibidem wrote:If you read the references, you would see that one of the in-kernel drivers has recently (kernel 3.3) had Cedar Trail support added.
However, this module appears to not be built, even in kernel 3.3; this is where I'd recommend building your own kernel (read the HOWTOs, it will help)
Ah, sorry, I’d missed that there were modules in the 3.3 kernel which supported the hardware but they hadn’t been built by default. I think it’s because they are flagged as “experimental”.

Anyway, rebuilding the 3.3 kernel currently in experimental with those modules added worked straight away and I can now run X at full resolution (what a difference it makes!). Rather annoying it took four goes to get the kernel built. The first was because the Installation Guide’s recommended build instruction fakeroot make-kpkg --initrd --revision=custom.1.0 kernel_image fails because --revision must start with a number. The next two failed when other people turned off the power and the battery died mid-build :shock:.

Thank you all, very much, for your help.
jacobh
 
Posts: 20
Joined: 2011-03-29 23:44

Re: Atom N2600 / Cedar Trail graphics problems and workaroun

Postby Ibidem » 2012-04-21 19:47

jacobh wrote:
Ibidem wrote:If you read the references, you would see that one of the in-kernel drivers has recently (kernel 3.3) had Cedar Trail support added.
However, this module appears to not be built, even in kernel 3.3; this is where I'd recommend building your own kernel (read the HOWTOs, it will help)


Anyway, rebuilding the 3.3 kernel currently in experimental with those modules added worked straight away and I can now run X at full resolution (what a difference it makes!). Rather annoying it took four goes to get the kernel built. The first was because the Installation Guide’s recommended build instruction fakeroot make-kpkg --initrd --revision=custom.1.0 kernel_image fails because --revision must start with a number. The next two failed when other people turned off the power and the battery died mid-build :shock:.

Thank you all, very much, for your help.

Glad it now works.
FYI, the current standard practice is to use
Code: Select all
make; make deb-pkg
The upstream kernel.org version supports building kernel packages natively. This approach is pretty much guaranteed to work if the kernel compiles.
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
Ibidem
 
Posts: 160
Joined: 2010-12-24 18:28

Re: Atom N2600/CedarTrail graphics problems & workarounds?[S

Postby turnip » 2012-04-24 06:45

Finally! I just bought a netbook 2 days ago. Atom 2600 processor. Linux 11.10 is already installed (kernel 3.0).

It seems like you guys have solved the 800x600 resolution problem. ive been searching for a cure since yesterday.

However, im a complete newbie to the linux world. i want my netbook to have linux only.
I cannot fully follow the solution to the problem.

Kindly, make a step by step instructions for youngsters like us. :D

Thanks in advance!
turnip
 
Posts: 3
Joined: 2012-04-24 06:36

Re: Atom N2600/CedarTrail graphics problems & workarounds?[S

Postby turnip » 2012-04-24 07:04

by the way, i happen to use Ubuntu 11.10.
turnip
 
Posts: 3
Joined: 2012-04-24 06:36

Re: Atom N2600/CedarTrail graphics problems & workarounds?[S

Postby jacobh » 2012-04-24 11:45

I’ve had a couple of requests for instructions as to how I got this to work. They are below. Please understand that I am not a kernel hacker and it has been at least 5 years since I last rolled my own kernel. I therefore took an ultra-conservative attitude (i.e. using the Debian kernel sources not the upstream ones; rebuilding the entire kernel and not just the drivers required for my machine &c.) which was probably excessive. Please also understand that I did this by following other how-to guides, in particular the Installer Guide. According to Ibidem this is no longer the Right Way to do it, so corrections are welcome. The requirements will also change as new kernels filter down from upstream.

I am not sure how to get this to work for Ubuntu; perhaps someone can help advise.

The first stage is to add the experimental repository to apt. Edit (as root) /etc/apt/soures.list to add:
Code: Select all
deb http://ftp.uk.debian.org/debian/ experimental main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ experimental main non-free contrib


You then want to set up some pinning preferences so your entire system doesn’t get updated to experimental. If /etc/apt/preferences does not exist, create it with something like:
Code: Select all
Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=experimental
Pin-Priority: 600

NB. If you are currently using stable rather than testing are your main repository, change “testing” to “stable”. If /etc/apt/preferences already exists then simple add a new section for experimental, making sure it has a lower pin-priority than your main repository.

Then update aptitude:
Code: Select all
aptitude update

and check that the pinning works by running
Code: Select all
aptitude upgrade

If aptitude wants to update every package on your system you know something has gone wrong with the pinning!

Then install the packages required to build the kernel, and the kernel source (I think this is the right list):
Code: Select all
aptitude install fakeroot kernel-package qt4-dev-tools qt4-qmake linux-source-3.3


Change to the directory where the kernel source is located and unpack it:
Code: Select all
cd /usr/src
tar xjf  /usr/src/linux-source-3.3.tar.bz2



Enter the source directory:
Code: Select all
cd linux-source-3.3


I then configured the kernel to add the drivers with xconfig which, again, may no longer be a recommended way. Run:
Code: Select all
make xconfig


And, hopefully, the qconfig window will open (it’s a GUI application). Go to Edit -> Search or hit Ctrl + F and search for GMA3600 and click the check tick-box next to it. Then search for GMA600 and click that tick-box too. (You probably don’t need this driver but I built it too, in any case).

Alternatively, if you want to do it by hand, scroll about two-thirds down in the left hand column to Direct Rendering Manager (under Device Drivers -> Graphics support) and click on it. In the top window on the right-hand-side, click on the check-box next to Intel GMA5/600 KMS Framebuffer. Two options should then appear underneath: Intel GMA600 support (Experimental) and Intel GMA3600/3650 support (Experimental). Tick the tick-boxes next to them.

[There is probably a nice way I can reduce this stage to a one-line command, but I am not sure what it is.]

Save and exit the programme.

We then have to work around Debian bug #663474. Edit /usr/share/kernel-package/ruleset/targets/common.mk to change this line (line 67 in my version) from:
Code: Select all
LGUEST_SUBDIR = $(word 1,$(wildcard Documentation/lguest Documentation/virtual/lguest))
to
Code: Select all
LGUEST_SUBDIR = $(word 1,$(wildcard Documentation/lguest Documentation/virtual/lguest tools/lguest))
. We could probably also do this with a soft link, but this worked for me.

We are now ready to build the kernel. Return to the /usr/src/linux-source-3.3 directory and run
Code: Select all
make-kpkg clean
fakeroot make-kpkg --initrd --revision=3.3.custom kernel_image


On a N2600 it will take hours to build the kernel. I recommend leaving the machine (plugged in, not on battery!) overnight to build it.

If the build is successful, we are left with a .deb file for the new kernel in the /usr/src/linux-source-3.3 directory. Install it with:
Code: Select all
cd /usr/src
dpkg -i linux-image-3.3.2_3.3.custom_i386.deb


If you have created an xorg.conf file it may make sense to move it:
Code: Select all
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak


Then reboot. Hopefully the new kernel will have been added to the top of the grub menu. Once it boots up it automagically detects the graphics card and should set the resolution correctly.

If the machine fails to boot on the new kernel, turn it off then on again, select an older kernel from the grub menu and run:
Code: Select all
dpkg -r linux-image-3.3.2
to remove the custom one.
jacobh
 
Posts: 20
Joined: 2011-03-29 23:44

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable