{"id":15562371,"url":"https://github.com/longsleep/sunxi-disp-tool","last_synced_at":"2025-04-23T23:08:17.011Z","repository":{"id":57527853,"uuid":"58127374","full_name":"longsleep/sunxi-disp-tool","owner":"longsleep","description":"Userspace utility to set sunxi disp2 HDMI resolution via ioctl","archived":false,"fork":false,"pushed_at":"2017-04-30T20:40:15.000Z","size":23,"stargazers_count":21,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-23T23:07:42.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/longsleep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-05T11:51:01.000Z","updated_at":"2024-03-29T12:40:07.000Z","dependencies_parsed_at":"2022-09-03T22:11:28.741Z","dependency_job_id":null,"html_url":"https://github.com/longsleep/sunxi-disp-tool","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longsleep%2Fsunxi-disp-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longsleep%2Fsunxi-disp-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longsleep%2Fsunxi-disp-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longsleep%2Fsunxi-disp-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longsleep","download_url":"https://codeload.github.com/longsleep/sunxi-disp-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528727,"owners_count":21445516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T16:13:52.459Z","updated_at":"2025-04-23T23:08:16.991Z","avatar_url":"https://github.com/longsleep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sunxi disp tool\n\nThis utility allows to control a sunxi disp2 device from user space. The code\nis organized in Go modules, so it can easily be integrated.\n\n## Usage\n\nMake sure to stop any graphical UI before running this command to make sure\nthat the existing framebuffer can be properly freed and reassigned. Failing\nthis will result in wrong framebuffer size and thus garbled display.\n\n```\nUsage: sunxi-disp-tool [\u003cglobal-options\u003e] \u003ccommand\u003e [\u003cargs\u003e]\nGlobal options:\n  -screen int\n          Screen ID (default 0)\nAvailable commands are:\n  switch   Switch HDMI output mode\n  init     Initialize HDMI output mode from Kernel args\n\n```\n\n### Examples\n\n```bash\nsunxi-disp-tool switch -mode 0xa\nsunxi-disp-tool switch -mode 0x5\nsunxi-disp-tool switch -name 720p\nsunxi-disp-tool switch -name 1080p\nsunxi-disp-tool switch -name 1020x720p60\n```\n\n### Run automatically on boot\n\nOn boards like the Pine64 with `uEnv.txt` support simply add a line to provide\nadditional Kernel arguments.\n\n```bash\ncat \u003c\u003cEOF | sudo tee -a /boot/uEnv.txt\noptargs=disp.screen0_output_mode=720p60\nEOF\n```\n\nYou can use any of the defined known HDMI output name (see below).\n\nAfter doing this, just run `sunxi-disp-tool init` somewhere during boot, eg.\nby adding it to `/etc/rc.local`.\n\nEverything is automatic for Ubuntu Xenial 16.04 arm64 via my Pine64 PPA at\nhttps://launchpad.net/~longsleep/+archive/ubuntu/ubuntu-pine64-flavour-makers\n\nSo on Xenial do something like the following, to install the tool and to have\nit run automatically on boot.\n\n```bash\nsudo apt-add-repository ppa:longsleep/ubuntu-pine64-flavour-makers\nsudo apt-get update \u0026\u0026 sudo apt-get install sunxi-disp-tool\n```\n\nFor other distributions, get the systemd service file from the `debian` folder\nand place it into `/etc/systemd/system`. Do not forget to enable it with\n`systemctl enable sunxi-disp-tool`.\n\n\n## Available HDMI output names\n\nThe following names are supported by this tool, and are mapped to there\ncorresponding output mode number values. These names can either be passed with\nthe `-name` parameter of the `switch` command or via Kernel argument using the\n`init` command.\n\n```\n720p50\n720p60\n720p\n1080i50\n1080i60\n1080p24\n1080p50\n1080p60\n1080p\n2160p24\n2160p25\n2160p30\n2160p\n```\n\nThe values without a frequency all map to the highest supported frequency for\nthe selected vertical solution. The parser also supports formats like\n`1280x720p` and splits every value by `x` to be consistent with other existing\nSunxi documentation.\n\n\n## Available HDMI output modes (-mode parameter of `switch` command)\n\nThe following modes are supported by this tool. If the modes actually work\ndepends on your HDMI device, the Sunxi board and the Kernel.\n\n```\nDISP_TV_MOD_480I             = 0\nDISP_TV_MOD_576I             = 1\nDISP_TV_MOD_480P             = 2\nDISP_TV_MOD_576P             = 3\nDISP_TV_MOD_720P_50HZ        = 4\nDISP_TV_MOD_720P_60HZ        = 5\nDISP_TV_MOD_1080I_50HZ       = 6\nDISP_TV_MOD_1080I_60HZ       = 7\nDISP_TV_MOD_1080P_24HZ       = 8\nDISP_TV_MOD_1080P_50HZ       = 9\nDISP_TV_MOD_1080P_60HZ       = 0xa\nDISP_TV_MOD_1080P_24HZ_3D_FP = 0x17\nDISP_TV_MOD_720P_50HZ_3D_FP  = 0x18\nDISP_TV_MOD_720P_60HZ_3D_FP  = 0x19\nDISP_TV_MOD_1080P_25HZ       = 0x1a\nDISP_TV_MOD_1080P_30HZ       = 0x1b\nDISP_TV_MOD_PAL              = 0xb\nDISP_TV_MOD_PAL_SVIDEO       = 0xc\nDISP_TV_MOD_NTSC             = 0xe\nDISP_TV_MOD_NTSC_SVIDEO      = 0xf\nDISP_TV_MOD_PAL_M            = 0x11\nDISP_TV_MOD_PAL_M_SVIDEO     = 0x12\nDISP_TV_MOD_PAL_NC           = 0x14\nDISP_TV_MOD_PAL_NC_SVIDEO    = 0x15\nDISP_TV_MOD_3840_2160P_30HZ  = 0x1c\nDISP_TV_MOD_3840_2160P_25HZ  = 0x1d\nDISP_TV_MOD_3840_2160P_24HZ  = 0x1e\nDISP_TV_MODE_NUM             = 0x1f\n```\n\n--\nSimon Eisenmann - mailto:simon@longsleep.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongsleep%2Fsunxi-disp-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongsleep%2Fsunxi-disp-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongsleep%2Fsunxi-disp-tool/lists"}