Unable to get screen resolution from xrandr

Post Reply
madmodder123
Posts: 2
Joined: Mon Jan 14, 2019 12:43 pm
languages_spoken: English
ODROIDs: ODROID-XU4
Contact:

Unable to get screen resolution from xrandr

Unread post by madmodder123 » Mon Jan 14, 2019 2:07 pm

Device: ODROID XU4
OS: Odroid Retro Arena Version 1.5.2 (based of retropie 4.4.2)

So I have been working on a python script that gets the screen resolution of the device in use for a music overlay. It was initially developed for the Raspberry Pi, but I want to add ODROID support.
So far when trying to use "xrandr" I have been unable to connect to the display (which is connected by HDMI).
I have been Googling info like crazy and have tried a variety of different methods (xrandr, xdpyinfo, python based code, and more), all of which have been unsuccessful.
When I try the "w" command It doesn't show a display being used:

Code: Select all

pigaming@odroid:~$ w
 05:01:53 up  1:23,  2 users,  load average: 0.03, 0.10, 0.13
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pigaming tty1                      03:38    1:23m  7:14   5:07  /opt/retropie/supplementary/emulationstation/emulationstation
pigaming pts/0    192.168.137.1    04:12    2.00s  0.19s  0.02s w
When I try "xrandr" I get the following:

Code: Select all

pigaming@odroid:~$ xrandr
Can't open display
pigaming@odroid:~$ xrandr -d :0
Can't open display :0
I have tried all the different default display IDs I could find online but nothing seems to be working.

I get the same results when running the command from SSH, a shell script, and a python script.

Any ideas why this isn't working? Or have any alternatives?
Thanks!

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Unable to get screen resolution from xrandr

Unread post by odroid » Mon Jan 14, 2019 2:37 pm

Since the ORA OS uses the framebuffer directly instead of x11, "xrandr" command should not work.
Try "fbset" command to get a resolution information.

madmodder123
Posts: 2
Joined: Mon Jan 14, 2019 12:43 pm
languages_spoken: English
ODROIDs: ODROID-XU4
Contact:

Re: Unable to get screen resolution from xrandr

Unread post by madmodder123 » Mon Jan 14, 2019 2:45 pm

Thanks, that will work :)

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests