Hand-started Xorg defaults to 720p

Post Reply
User avatar
mad_ady
Posts: 5114
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Hand-started Xorg defaults to 720p

Unread post by mad_ady » Mon Oct 15, 2018 8:23 pm

I'm working on something that requires that I start the Xorg server via xinit instead of lightdm:

Code: Select all

root@c1-right:~# cat /etc/systemd/system/xorg.service 
[Unit]
Description=Xorg on :0
After=network.target

[Service]
Type=simple
Environment=HOME=/root
Environment=XDG_RUNTIME_DIR=/run/user/0
ExecStartPre=-/bin/mkdir /run/user/0
ExecStartPre=-/bin/chmod 700 /run/user/0
ExecStart=/usr/bin/xinit
Restart=on-abnormal

[Install]
WantedBy=multi-user.target
The monitor resolution is set to 1680x1050 via boot.ini and works correctly inside a lightdm-started xorg:

Code: Select all

root@c1-right:~# cat /proc/cmdline
root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro console=tty0 console=ttyS0,115200n8 no_console_suspend fsck.repair=yes vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=1680x1050p60hz m_bpp=32 vout=dvi disableuhs disablehpd=true monitor_onoff=false max_freq=1536 usbhid.quirks=0x0eef:0x0005:0x0004 fsck.repair=yes net.ifnames=0
However, the Xorg I'm starting starts only with 1280x720 and displays artifacts on the side and bottom of the screen:

Code: Select all

root@c1-right:~# DISPLAY=:0 xrandr
Screen 0: minimum 640 x 480, current 1280 x 720, maximum 2048 x 2048
LCD connected primary 1280x720+0+0 0mm x 0mm
   1280x720      60.00* 
root@c1-right:~# DISPLAY=:0 xrandr --output LCD --mode 1680x1050       
xrandr: cannot find mode 1680x1050
root@c1-right:~# cat /etc/X11/xorg.conf 
# X.Org X server configuration file for xfree86-video-mali

Section "Device"
        Identifier      "Mali-Fbdev"
        Driver          "mali"
        Option          "fbdev"         "/dev/fb0"
        Option          "DRI2"            "true"
        Option          "DRI2_PAGE_FLIP"  "false"
        Option          "DRI2_WAIT_VSYNC" "false"
        Option          "UMP_CACHED"      "true"
        Option          "UMP_LOCK"        "false"
        Option          "SWCursor"        "true"
        Option          "HWCursor"        "false"

EndSection

Section "ServerFlags"
        Option          "NoTrapSignals" "true"
        Option          "DontZap"       "false"
        Option          "BlankTime"     "0"
        Option          "StandbyTime"   "0"
        Option          "SuspendTime"   "0"
        Option          "OffTime"       "0"
EndSection

Section "DRI"
        Mode            0666
EndSection
Any ideas where this may get set? I'm using Hardkernel Ubuntu 18.04 image on C1. When I tested with 16.04 I did not run into this issue.

User avatar
mad_ady
Posts: 5114
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Hand-started Xorg defaults to 720p

Unread post by mad_ady » Mon Oct 15, 2018 8:27 pm

And here are the relevant bits from /var/log/Xorg.0.log:

Code: Select all

[   940.278] (II) LoadModule: "mali"
[   940.279] (II) Loading /usr/lib/xorg/modules/drivers/mali_drv.so
[   940.279] (II) Module mali: vendor="X.Org Foundation"
[   940.279]    compiled for 1.19.6, module version = 0.4.2
[   940.279]    ABI class: X.Org Video Driver, version 23.0
[   940.279] (EE) Error: MaliSetup
[   940.279] (EE) Error: MaliIdentify
[   940.280] (II) MALI: driver for Mali Framebuffer: mali
[   940.280] (WW) Falling back to old probe method for mali
[   940.280] (EE) Error: MaliProbe
[   940.280] (EE) Error: MaliHWProbe
[   940.280] (II) MALI(0): using /dev/fb0

[   940.281] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   940.281] (II) MALI(0): [MaliPreInit:1351]: Entering
[   940.281] (II) MALI(0): [MaliGetRec:471]: Entering
[   940.281] (II) MALI(0): [MaliHWInit:1133]: Entering
[   940.281] (II) MALI(0): [MaliHWGetDepth:1165]: Entering
[   940.281] (II) MALI(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[   940.281] (==) MALI(0): Depth 24, (==) framebuffer bpp 32
[   940.281] (==) MALI(0): RGB weight 888
[   940.281] (==) MALI(0): Default visual is TrueColor
[   940.281] (==) MALI(0): Using gamma correction (1.0, 1.0, 1.0)
[   940.281] (II) MALI(0): [MaliHWGetVidmem:1183]: Entering
[   940.281] (II) MALI(0): [MaliHWGetName:1191]: Entering
[   940.281] (II) MALI(0): hardware: OSD FB (video memory: 24576kB)

[   940.281] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[   940.281] (**) MALI(0): Option "HWCursor" "false"
[   940.281] (**) MALI(0): Option "SWCursor" "true"
[   940.281] (**) MALI(0): Option "DRI2" "true"
[   940.282] (**) MALI(0): Option "DRI2_PAGE_FLIP" "false"
[   940.282] (**) MALI(0): Option "DRI2_WAIT_VSYNC" "false"
[   940.282] (**) MALI(0): Option "UMP_CACHED" "true"
[   940.282] (**) MALI(0): Option "UMP_LOCK" "false"
[   940.282] (**) MALI(0): DRI Fullscreen page flip disabled. No support in config file
[   940.282] (**) MALI(0): DRI Fullscreen page flip VSYNC disabled
[   940.282] (**) MALI(0): Use cached UMP memory
[   940.282] (**) MALI(0): Don't use umplock across processes
[   940.282] (EE) MALI(0): [mali_drm_open_master:1326] Error: mali_drm_open_master DRM OPEN (fd: 0xc)

[   940.282] (**) MALI(0): DRI Fullscreen page flip disabled. No support in config file
[   940.282] (**) MALI(0): DRI Fullscreen page flip VSYNC disabled
[   940.282] (**) MALI(0): Use cached UMP memory
[   940.282] (**) MALI(0): Don't use umplock across processes
[   940.282] (II) MALI(0): [MaliHWGetFD:1199]: Entering
[   940.283] (II) MALI(0): [FBDev_crtc_config:672]: Entering
[   940.283] (II) MALI(0): [FBDev_crtc_config:682]: Exiting
[   940.283] (II) MALI(0): Output LCD has no monitor section
[   940.283] (II) MALI(0): Mode 1280 x 720 valid
[   940.283] (II) MALI(0): Printing probed modes for output LCD
[   940.283] (II) MALI(0): Modeline "1280x720"x60.0   65.28  1280 1300 1320 1360  720 740 760 800 (48.0 kHz e)
[   940.283] (II) MALI(0): Output LCD connected
[   940.283] (II) MALI(0): Using sloppy heuristic for initial modes
[   940.283] (II) MALI(0): Output LCD using initial mode 1280x720 +0+0
[   940.283] (II) MALI(0): [MaliHWSetVideoModes:1212]: Entering
[   940.283] (--) MALI(0): Virtual size is 1280x720 (pitch 1280)
[   940.283] (**) MALI(0):  Driver mode "1280x720": 65.3 MHz (scaled from 0.0 MHz), 48.0 kHz, 60.0 Hz
[   940.283] (II) MALI(0): Modeline "1280x720"x60.0   65.28  1280 1300 1320 1360  720 740 760 800 (48.0 kHz e)
[   940.283] (==) MALI(0): DPI set to (96, 96)
[   940.283] (II) Loading sub module "fb"
[   940.283] (II) LoadModule: "fb"
[   940.284] (II) Loading /usr/lib/xorg/modules/libfb.so
[   940.284] (II) Module fb: vendor="X.Org Foundation"
[   940.284]    compiled for 1.19.6, module version = 1.0.0
[   940.285]    ABI class: X.Org ANSI C Emulation, version 0.4
[   940.285] (==) Depth 24 pixmap format is 32 bpp
[   940.285] (II) MALI(0): [MaliScreenInit:1541]: Entering
[   940.285] (EE) MALI(0): [mali_drm_open_master:1326] Error: mali_drm_open_master DRM OPEN (fd: 0xc)

[   940.285] (II) MALI(0): DRI2 version: 1.2
[   940.285] (II) MALI(0): DRI2 version: 1.2

[   940.285] (II) MALI(0): [DRI2] Setup complete
[   940.285] (II) MALI(0): [DRI2]   DRI driver: Mali DRI2
Here's the same log when started via lightdm:

Code: Select all

[  2088.704] (II) LoadModule: "mali"
[  2088.704] (II) Loading /usr/lib/xorg/modules/drivers/mali_drv.so
[  2088.705] (II) Module mali: vendor="X.Org Foundation"
[  2088.705]    compiled for 1.19.6, module version = 0.4.2
[  2088.705]    ABI class: X.Org Video Driver, version 23.0
[  2088.705] (EE) Error: MaliSetup
[  2088.705] (EE) Error: MaliIdentify
[  2088.705] (II) MALI: driver for Mali Framebuffer: mali
[  2088.711] (WW) Falling back to old probe method for mali
[  2088.711] (EE) Error: MaliProbe
[  2088.711] (EE) Error: MaliHWProbe
[  2088.711] (II) MALI(0): using /dev/fb0

[  2088.711] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  2088.711] (II) MALI(0): [MaliPreInit:1351]: Entering
[  2088.711] (II) MALI(0): [MaliGetRec:471]: Entering
[  2088.712] (II) MALI(0): [MaliHWInit:1133]: Entering
[  2088.712] (II) MALI(0): [MaliHWGetDepth:1165]: Entering
[  2088.712] (II) MALI(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[  2088.712] (==) MALI(0): Depth 24, (==) framebuffer bpp 32
[  2088.712] (==) MALI(0): RGB weight 888
[  2088.712] (==) MALI(0): Default visual is TrueColor
[  2088.712] (==) MALI(0): Using gamma correction (1.0, 1.0, 1.0)
[  2088.712] (II) MALI(0): [MaliHWGetVidmem:1183]: Entering
[  2088.712] (II) MALI(0): [MaliHWGetName:1191]: Entering
[  2088.712] (II) MALI(0): hardware: OSD FB (video memory: 24576kB)

[  2088.712] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[  2088.712] (**) MALI(0): Option "HWCursor" "false"
[  2088.712] (**) MALI(0): Option "SWCursor" "true"
[  2088.712] (**) MALI(0): Option "DRI2" "true"
[  2088.712] (**) MALI(0): Option "DRI2_PAGE_FLIP" "false"
[  2088.712] (**) MALI(0): Option "DRI2_WAIT_VSYNC" "false"
[  2088.713] (**) MALI(0): Option "UMP_CACHED" "true"
[  2088.713] (**) MALI(0): Option "UMP_LOCK" "false"
[  2088.713] (**) MALI(0): DRI Fullscreen page flip disabled. No support in config file
[  2088.713] (**) MALI(0): DRI Fullscreen page flip VSYNC disabled
[  2088.713] (**) MALI(0): Use cached UMP memory
[  2088.713] (**) MALI(0): Don't use umplock across processes
[  2088.713] (EE) MALI(0): [mali_drm_open_master:1326] Error: mali_drm_open_master DRM OPEN (fd: 0xc)

[  2088.713] (**) MALI(0): DRI Fullscreen page flip disabled. No support in config file
[  2088.713] (**) MALI(0): DRI Fullscreen page flip VSYNC disabled
[  2088.713] (**) MALI(0): Use cached UMP memory
[  2088.713] (**) MALI(0): Don't use umplock across processes
[  2088.713] (II) MALI(0): [MaliHWGetFD:1199]: Entering
[  2088.713] (II) MALI(0): [FBDev_crtc_config:672]: Entering
[  2088.713] (II) MALI(0): [FBDev_crtc_config:682]: Exiting
[  2088.713] (II) MALI(0): Output LCD has no monitor section
[  2088.714] (II) MALI(0): Mode 1680 x 1050 valid
[  2088.714] (II) MALI(0): Printing probed modes for output LCD
[  2088.714] (II) MALI(0): Modeline "1680x1050"x60.0  119.33  1680 1700 1720 1760  1050 1070 1090 1130 (67.8 kHz e)
[  2088.714] (II) MALI(0): Output LCD connected
[  2088.714] (II) MALI(0): Using sloppy heuristic for initial modes
[  2088.714] (II) MALI(0): Output LCD using initial mode 1680x1050 +0+0
[  2088.714] (II) MALI(0): [MaliHWSetVideoModes:1212]: Entering
[  2088.714] (--) MALI(0): Virtual size is 1680x1050 (pitch 1680)
[  2088.714] (**) MALI(0):  Driver mode "1680x1050": 119.3 MHz (scaled from 0.0 MHz), 67.8 kHz, 60.0 Hz
[  2088.714] (II) MALI(0): Modeline "1680x1050"x60.0  119.33  1680 1700 1720 1760  1050 1070 1090 1130 (67.8 kHz e)
[  2088.714] (==) MALI(0): DPI set to (96, 96)
[  2088.714] (II) Loading sub module "fb"
[  2088.714] (II) LoadModule: "fb"
[  2088.715] (II) Loading /usr/lib/xorg/modules/libfb.so
[  2088.715] (II) Module fb: vendor="X.Org Foundation"
[  2088.715]    compiled for 1.19.6, module version = 1.0.0
[  2088.715]    ABI class: X.Org ANSI C Emulation, version 0.4
[  2088.715] (==) Depth 24 pixmap format is 32 bpp
[  2088.715] (II) MALI(0): [MaliScreenInit:1541]: Entering
[  2088.716] (EE) MALI(0): [mali_drm_open_master:1326] Error: mali_drm_open_master DRM OPEN (fd: 0xc)

[  2088.716] (II) MALI(0): DRI2 version: 1.2
[  2088.716] (II) MALI(0): DRI2 version: 1.2


User avatar
mad_ady
Posts: 5114
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Hand-started Xorg defaults to 720p

Unread post by mad_ady » Mon Oct 15, 2018 8:59 pm

It seems that something changes the underlying /dev/fb0 settings when starting xorg:

Code: Select all

root@c1-right:~# fbset -fb /dev/fb0

mode "1680x1050"
    geometry 1680 1050 1680 2100 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,8/24
endmode

root@c1-right:~# service xorg start
root@c1-right:~# fbset -fb /dev/fb0

mode "1280x720"
    geometry 1280 720 1280 1440 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,8/24
endmode


User avatar
meveric
Posts: 9608
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: Hand-started Xorg defaults to 720p

Unread post by meveric » Mon Oct 15, 2018 9:33 pm

The C1 was quite messy when it came to X11.
I remember that there was a script that was started when lightdm was booted due to the fact that alpha channel was really messed up, but I'm not quite sure, could be that this was before the c1_init.sh was used.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
mad_ady
Posts: 5114
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Hand-started Xorg defaults to 720p

Unread post by mad_ady » Mon Oct 15, 2018 9:52 pm

lightdm is started by /lib/systemd/system/lightdm.service which checks for lightdm's name and then starts it without parameters. I couldn't find anything odroid-specific there... Any ideas where to dig deeper?

User avatar
meveric
Posts: 9608
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: Hand-started Xorg defaults to 720p

Unread post by meveric » Tue Oct 16, 2018 1:24 am

mad_ady wrote:lightdm is started by /lib/systemd/system/lightdm.service which checks for lightdm's name and then starts it without parameters. I couldn't find anything odroid-specific there... Any ideas where to dig deeper?
Once again, I'm not sure if I'm digging at the right end right now, since this is C1 specific bull-sh*t and I never really liked the board for this and other reasons.
But the lightdm hack worked a little bit differently. Similar to initramfs lightdm had a folder where you can put-in scripts or command what should be executed each time lightdm starts (a hooks folder or .d folder or something).
I think it was used to change a kernel parameter similar as it was done on the first C2 images, only if you changed that parameter the desktop was "ok" or else the entire desktop was just "black" due to the Alpha issue on the C1/C2.
On the C2 this was later solved with the fbturbo drivers, which could handle this on their own, but on the C1 this still has to be done.
Not sure if anything else was done besides the alpha hack though....

I checked on my C2 thread where I still have this as a "Developers note:" viewtopic.php?f=138&t=19403
If you scroll down you'll find a short shell script:

Code: Select all

#!/bin/bash
for x in $(cat /proc/cmdline); do
        case ${x} in
                m_bpp=*) export bpp=${x#*=} ;;
        esac
done

if [ "$bpp" = "32" ]; then
        echo d01068b4 0x7fc0 > /sys/kernel/debug/aml_reg/paddr
fi
which was done on the C1 and C2 alike (but I think the values were slightly different for the C1 and C2) and as I said on the C2 this was fixed, but on the C1 this should still be somewhere.
And it was started through lightdm.. That's what I remember, but I'm not sure if it's just the alpha thing that was done via the script or something else as well.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Post Reply

Return to “General Chat”

Who is online

Users browsing this forum: No registered users and 0 guests